diff --git a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java index 9ed9349a3..ebf7d78cc 100644 --- a/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java +++ b/municipal-services/ws-calculator/src/main/java/org/egov/wscalculation/service/DemandService.java @@ -971,10 +971,10 @@ private List updateDemandForCalculation(RequestInfo requestInfo, List billNumbers = fetchBill(demands, waterConnectionRequest.getRequestInfo()); - Long billDate = fetchBillDate(demands,waterConnectionRequest.getRequestInfo()); - billDate =billDate + 1296000000l; - LocalDate billDateLocal = Instant.ofEpochMilli(billDate).atZone(ZoneId.systemDefault()).toLocalDate(); - String paymentDueDate = billDateLocal.format(dateTimeFormatter); +// Long billDate = fetchBillDate(demands,waterConnectionRequest.getRequestInfo()); +// billDate =billDate + 1296000000l; +// LocalDate billDateLocal = Instant.ofEpochMilli(billDate).atZone(ZoneId.systemDefault()).toLocalDate(); +// String paymentDueDate = billDateLocal.format(dateTimeFormatter); /*if(isOnlinePaymentAllowed(requestInfo,tenantId)) { if(fetchTotalBillAmount(demands,requestInfo).signum()> 0) { sendPaymentSMSNotification(requestInfo,tenantId,owner,waterConnectionRequest,property,demandDetails,calculation.getConnectionNo(),demands,true,businessService,billCycle,billNumbers,paymentDueDate); @@ -1326,7 +1326,10 @@ public Long fetchBillDate(List demandResponse, RequestInfo requestInfo) log.error("Fetch Bill Error", ex); } } - return billDate.get(0); + if(!CollectionUtils.isEmpty(billDate)) + return billDate.get(0); + else + return null; } /**