Skip to content

Commit

Permalink
Merge pull request #1012 from deepikaarora88/Dev-2.0
Browse files Browse the repository at this point in the history
P1 formula round off
  • Loading branch information
deepikaarora88 authored Mar 21, 2024
2 parents 6cc0b7b + 1da5a12 commit 3db347e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 3db347e

Please sign in to comment.