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 #858 from egovernments/ISTE-259
Browse files Browse the repository at this point in the history
ISTE-259: Added chnage to not allow WS_TIME_PEnalty with Zero
  • Loading branch information
pradeepkumarcm-egov authored Jul 15, 2024
2 parents 3595034 + e20c0d0 commit 0c33d77
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1544,13 +1544,15 @@ public List<DemandDetail> addTimePenalty(Integer rate, String type, String SubTy
BigDecimal tax = netPayableAmountWithouttax.multiply(taxPercentage.divide(WSCalculationConstant.HUNDRED));
//round off to next higest number
tax = roundOffTax(tax);
DemandDetail timeDemandDetail = DemandDetail.builder().demandId(demand.getId())
.taxHeadMasterCode(WSCalculationConstant.WS_TIME_PENALTY)
.taxAmount(tax)
.collectionAmount(BigDecimal.ZERO)
.tenantId(demand.getTenantId()).build();

demandDetailList.add(timeDemandDetail);
if(tax.compareTo(BigDecimal.ZERO) > 0) {
DemandDetail timeDemandDetail = DemandDetail.builder().demandId(demand.getId())
.taxHeadMasterCode(WSCalculationConstant.WS_TIME_PENALTY)
.taxAmount(tax)
.collectionAmount(BigDecimal.ZERO)
.tenantId(demand.getTenantId()).build();

demandDetailList.add(timeDemandDetail);
}
}
}
}
Expand Down

0 comments on commit 0c33d77

Please sign in to comment.