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