Only compare Teller and Cashier endDate if its not null

This commit is contained in:
Terence Denzil Monteiro
2018-02-06 20:42:32 +05:30
parent 8e7bd01ed4
commit e13616b0e9
@@ -95,8 +95,9 @@ public class CashierTransactionDataValidator {
*/
if (fromDate.isBefore(tellerFromDate)
|| endDate.isBefore(tellerFromDate)
|| (tellerEndDate != null && fromDate.isAfter(tellerEndDate) || endDate
.isAfter(tellerEndDate))) {
|| (tellerEndDate != null &&
(fromDate.isAfter(tellerEndDate)
|| endDate.isAfter(tellerEndDate)))) {
throw new CashierDateRangeOutOfTellerDateRangeException();
}
/**