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 58a6185 commit d9ab6b4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ 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 @@ -541,7 +540,7 @@ public DemandHistory getDemandHistory(@Valid DemandCriteria demandCriteria, Requ
}
}
}
if(paymentCompletedDemandList.size()>0) {
if(demList.size() == 1) {
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 d9ab6b4

Please sign in to comment.