b2m-utils 0.0.263 → 0.0.264
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.esm.js +4 -5
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +4 -5
- package/build/index.js.gz +0 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -544,9 +544,9 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
544
544
|
var firstTotal = +totalValueFromAllFees / +valueToDivide;
|
|
545
545
|
var total = +firstTotal * +icmsValue;
|
|
546
546
|
var totalValueFromAllFeesCurrency = convertNumberToCurrency(+totalValueFromAllFees, 'pt-br');
|
|
547
|
-
var
|
|
548
|
-
totalFee = Number(
|
|
549
|
-
totalToCalc = Number(
|
|
547
|
+
var truncatedTo3Decimals = Math.floor(total * 1000) / 1000;
|
|
548
|
+
totalFee = Number(truncatedTo3Decimals.toFixed(2));
|
|
549
|
+
totalToCalc = Number(truncatedTo3Decimals.toFixed(2));
|
|
550
550
|
var resultCurrency = (+totalToCalc).toLocaleString('pt-BR', {
|
|
551
551
|
style: 'currency',
|
|
552
552
|
currency: 'BRL',
|
|
@@ -887,8 +887,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
889
|
// totalToCalc = totalFee;
|
|
890
|
-
|
|
891
|
-
totalToCalc = Number(truncatedTo3Decimals.toFixed(2));
|
|
890
|
+
totalToCalc = Math.floor(+totalFee * 100) / 100;
|
|
892
891
|
if (fee_1.parentId) {
|
|
893
892
|
var siblingFees = allFees === null || allFees === void 0 ? void 0 : allFees.filter(function (i) { var _a, _b; return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.parentId) === fee_1.parentId && ((_b = i.fee) === null || _b === void 0 ? void 0 : _b.id) !== fee_1.id; });
|
|
894
893
|
if (siblingFees && (siblingFees === null || siblingFees === void 0 ? void 0 : siblingFees.length) > 0) {
|
package/build/index.esm.js.gz
CHANGED
|
Binary file
|