Skip to content

Commit

Permalink
Merge pull request #293 from odisha-muktasoft/PFM-5803-FIX-1
Browse files Browse the repository at this point in the history
PFM-5803 : updated the logic for rounding off in measures
  • Loading branch information
Tulika-eGov authored Mar 13, 2024
2 parents 3cbd1e2 + 51500d5 commit b266f1d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const MeasureCard = React.memo(({ columns, fields = [], register, setValue, tabl
if (initialValue(element)) {
calculatedValue = 0;
}
state[findIndex].noOfunit = calculatedValue ? (Math.ceil(calculatedValue * 10000) / 10000).toFixed(4) : 0;
state[findIndex].noOfunit = calculatedValue ? ((calculatedValue.toFixed(5).slice(-1) === '5') ? (Math.ceil(calculatedValue * 10000) / 10000).toFixed(4) : calculatedValue.toFixed(4)) : 0;
if(mode === "CREATE") state[findIndex]["numItems"] = calculatedValue;
state[findIndex].rowAmount = unitRate * calculatedValue || 0;

Expand Down

0 comments on commit b266f1d

Please sign in to comment.