Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #743 from egovernments/PFM-5564
Browse files Browse the repository at this point in the history
Pfm 5564
  • Loading branch information
pradeepkumarcm-egov authored Mar 7, 2024
2 parents c930a71 + f046b45 commit fdd4ec9
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,20 @@ private void sendDownloadBillSMSNotification(RequestInfo requestInfo, String ten
messageString = messageString.replace("{ownername}", owner.getName());
messageString = messageString.replace("{Period}", billCycle);
messageString = messageString.replace("{consumerno}", consumerCode);
messageString = messageString.replace("{billamount}", totalamount.toString());
BigDecimal demandAmount= demandDetails.stream()
.map(DemandDetail::getTaxAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal arrears=totalamount.subtract(demandAmount);
if(arrears.compareTo(BigDecimal.ZERO)>0)
{
messageString = messageString.replace("{billamount}", totalamount.toString()+"(includes Rs."+ arrears.toString()+ " arrears)");
}
else
{
messageString = messageString.replace("{billamount}", totalamount.toString());
}
messageString = messageString.replace("{BILL_LINK}", getShortenedUrl(actionLink));

// System.out.println("Demand genaration Message get bill::" + messageString);
// System.out.println("Demand genaration Message get bill::" + messageString);

SMSRequest sms = SMSRequest.builder().mobileNumber(owner.getMobileNumber()).message(messageString).tenantid(tenantId)
.category(Category.TRANSACTION).build();
Expand Down

0 comments on commit fdd4ec9

Please sign in to comment.