diff --git a/municipal-services/bpa-calculator/src/main/java/org/egov/bpa/calculator/services/CalculationService.java b/municipal-services/bpa-calculator/src/main/java/org/egov/bpa/calculator/services/CalculationService.java index 457777f1c14..5c1c0e92833 100644 --- a/municipal-services/bpa-calculator/src/main/java/org/egov/bpa/calculator/services/CalculationService.java +++ b/municipal-services/bpa-calculator/src/main/java/org/egov/bpa/calculator/services/CalculationService.java @@ -1,11 +1,13 @@ package org.egov.bpa.calculator.services; import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; + import org.egov.bpa.calculator.config.BPACalculatorConfig; import org.egov.bpa.calculator.kafka.broker.BPACalculatorProducer; import org.egov.bpa.calculator.utils.BPACalculatorConstants; @@ -168,8 +170,8 @@ else if (calulationCriteria.getFeeType().equalsIgnoreCase(BPACalculatorConstants BigDecimal boundayWallLength=new BigDecimal(node.get("boundaryWallLength")); BigDecimal area=new BigDecimal(node.get("area")); - totalTax=boundayWallLength.multiply(BigDecimal.valueOf(2.5)).add(area.multiply(BigDecimal.valueOf(9)).multiply(BigDecimal.valueOf(2.5))); - estimate.setEstimateAmount(totalTax.abs()); + totalTax=boundayWallLength.multiply(BigDecimal.valueOf(2.5)).add(area.multiply(BigDecimal.valueOf(2.5))); + estimate.setEstimateAmount(totalTax.setScale(0, RoundingMode.HALF_UP)); estimate.setCategory(Category.FEE); String taxHeadCode = utils.getTaxHeadCode(calulationCriteria.getBpa().getBusinessService(), calulationCriteria.getFeeType());