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

Commit

Permalink
PFM-5564
Browse files Browse the repository at this point in the history
  • Loading branch information
Saloni-eGov committed Mar 7, 2024
1 parent ed7239b commit 3ca6518
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,21 @@ 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());
// 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 3ca6518

Please sign in to comment.