b2m-utils 0.0.200 → 0.0.203
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 +5 -3
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +5 -3
- package/build/index.js.gz +0 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -375,13 +375,14 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
375
375
|
var firstTotal = +totalValueFromAllFees / +valueToDivide;
|
|
376
376
|
var total = +firstTotal * +value;
|
|
377
377
|
var totalValueFromAllFeesCurrency = convertNumberToCurrency(+totalValueFromAllFees, 'pt-br');
|
|
378
|
-
|
|
378
|
+
totalFee = total;
|
|
379
|
+
var truncatedTo3Decimals = Math.floor(total * 1000) / 1000;
|
|
380
|
+
totalToCalc = Number(truncatedTo3Decimals.toFixed(2));
|
|
381
|
+
var resultCurrency = (+totalToCalc).toLocaleString('pt-BR', {
|
|
379
382
|
style: 'currency',
|
|
380
383
|
currency: 'BRL',
|
|
381
384
|
});
|
|
382
385
|
var result = "(".concat(totalValueFromAllFeesCurrency, " / ").concat(valueToDivide, ") x ").concat(value, " = ").concat(resultCurrency);
|
|
383
|
-
totalFee = total;
|
|
384
|
-
totalToCalc = Number(total.toFixed(2));
|
|
385
386
|
resultFee = result;
|
|
386
387
|
}
|
|
387
388
|
}
|
|
@@ -7071,6 +7072,7 @@ var getFilteredFeesToAudit = function (_a) {
|
|
|
7071
7072
|
return (_b = lane === null || lane === void 0 ? void 0 : lane.RatecardLaneFee) === null || _b === void 0 ? void 0 : _b.filter(function (i) {
|
|
7072
7073
|
var _a, _b, _c, _d, _e;
|
|
7073
7074
|
var defaultConditionalFees = [
|
|
7075
|
+
exports.FeeEnum.SUFRAMA,
|
|
7074
7076
|
exports.FeeEnum.TDA_FREIGHT,
|
|
7075
7077
|
exports.FeeEnum.TDA_MIN,
|
|
7076
7078
|
exports.FeeEnum.TDE_FREIGHT,
|
package/build/index.js.gz
CHANGED
|
Binary file
|