b2m-utils 0.0.204 → 0.0.206
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 -1
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +5 -1
- 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
|
@@ -372,7 +372,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
372
372
|
var total = +firstTotal * +value;
|
|
373
373
|
var totalValueFromAllFeesCurrency = convertNumberToCurrency(+totalValueFromAllFees, 'pt-br');
|
|
374
374
|
var truncatedTo3Decimals = Math.floor(total * 1000) / 1000;
|
|
375
|
-
totalFee = truncatedTo3Decimals;
|
|
375
|
+
totalFee = Number(truncatedTo3Decimals.toFixed(2));
|
|
376
376
|
totalToCalc = Number(truncatedTo3Decimals.toFixed(2));
|
|
377
377
|
var resultCurrency = (+totalToCalc).toLocaleString('pt-BR', {
|
|
378
378
|
style: 'currency',
|
|
@@ -509,6 +509,10 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
509
509
|
feesWithMaxWeight === null || feesWithMaxWeight === void 0 ? void 0 : feesWithMaxWeight.sort(function (a, b) { return b.maxWeight - a.maxWeight; });
|
|
510
510
|
// Pegar o primeiro (maior maxWeight)
|
|
511
511
|
var highestIntervalFee = feesWithMaxWeight === null || feesWithMaxWeight === void 0 ? void 0 : feesWithMaxWeight[0];
|
|
512
|
+
console.log({
|
|
513
|
+
feesWithMaxWeight: feesWithMaxWeight,
|
|
514
|
+
highestIntervalFee: highestIntervalFee,
|
|
515
|
+
});
|
|
512
516
|
if (highestIntervalFee) {
|
|
513
517
|
// Calcula baseado na taxa do intervalo mais alto que tem maxWeight
|
|
514
518
|
var total_4 = +highestIntervalFee.value;
|
package/build/index.esm.js.gz
CHANGED
|
Binary file
|