Skip to content

Commit

Permalink
pdf related changes
Browse files Browse the repository at this point in the history
  • Loading branch information
snehal-gothe committed Apr 25, 2023
1 parent 5ed4f92 commit 58a6185
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ public DemandHistory getDemandHistory(@Valid DemandCriteria demandCriteria, Requ
List<Demand> demandList = getDemands(demandCriteria, requestInfo);
demands = demandRepository.getDemandHistory(demandCriteria);
List<Demand> demList = demandList.stream().filter(i->(!i.getIsPaymentCompleted().booleanValue())).collect(Collectors.toList());
List<Demand> paymentCompletedDemandList = demandList.stream().filter(i->(i.getIsPaymentCompleted().booleanValue())).collect(Collectors.toList());

BigDecimal advanceAdjustedAmount = BigDecimal.ZERO;
BigDecimal waterCharge = demList.get(demList.size() - 1).getDemandDetails().get(0).getTaxAmount();
Expand All @@ -540,7 +541,7 @@ public DemandHistory getDemandHistory(@Valid DemandCriteria demandCriteria, Requ
}
}
}
if(advanceAdjustedAmount.compareTo(BigDecimal.ZERO) == 0) {
if(paymentCompletedDemandList.size()>0) {
waterCharge = demList.get(demList.size() - 1).getDemandDetails().get(0).getTaxAmount().
subtract(demList.get(demList.size() - 1).getDemandDetails().get(0).getCollectionAmount());
}
Expand Down

0 comments on commit 58a6185

Please sign in to comment.