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.esm.js
CHANGED
|
@@ -371,13 +371,14 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
371
371
|
var firstTotal = +totalValueFromAllFees / +valueToDivide;
|
|
372
372
|
var total = +firstTotal * +value;
|
|
373
373
|
var totalValueFromAllFeesCurrency = convertNumberToCurrency(+totalValueFromAllFees, 'pt-br');
|
|
374
|
-
|
|
374
|
+
totalFee = total;
|
|
375
|
+
var truncatedTo3Decimals = Math.floor(total * 1000) / 1000;
|
|
376
|
+
totalToCalc = Number(truncatedTo3Decimals.toFixed(2));
|
|
377
|
+
var resultCurrency = (+totalToCalc).toLocaleString('pt-BR', {
|
|
375
378
|
style: 'currency',
|
|
376
379
|
currency: 'BRL',
|
|
377
380
|
});
|
|
378
381
|
var result = "(".concat(totalValueFromAllFeesCurrency, " / ").concat(valueToDivide, ") x ").concat(value, " = ").concat(resultCurrency);
|
|
379
|
-
totalFee = total;
|
|
380
|
-
totalToCalc = Number(total.toFixed(2));
|
|
381
382
|
resultFee = result;
|
|
382
383
|
}
|
|
383
384
|
}
|
|
@@ -7067,6 +7068,7 @@ var getFilteredFeesToAudit = function (_a) {
|
|
|
7067
7068
|
return (_b = lane === null || lane === void 0 ? void 0 : lane.RatecardLaneFee) === null || _b === void 0 ? void 0 : _b.filter(function (i) {
|
|
7068
7069
|
var _a, _b, _c, _d, _e;
|
|
7069
7070
|
var defaultConditionalFees = [
|
|
7071
|
+
FeeEnum.SUFRAMA,
|
|
7070
7072
|
FeeEnum.TDA_FREIGHT,
|
|
7071
7073
|
FeeEnum.TDA_MIN,
|
|
7072
7074
|
FeeEnum.TDE_FREIGHT,
|
package/build/index.esm.js.gz
CHANGED
|
Binary file
|