b2m-utils 0.0.197 → 0.0.199

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
@@ -441,7 +441,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
441
441
  style: 'currency',
442
442
  currency: 'BRL',
443
443
  });
444
- var result_2 = "".concat(fractions, " fra\u00E7\u00F5es x ").concat(valueCurrency_1).concat(redeliveryInfo_2, " = ").concat(resultCurrency_2);
444
+ var result_2 = "".concat(cte.taxedWeight, " kg = ").concat(fractions, " fra\u00E7\u00F5es x ").concat(valueCurrency_1).concat(redeliveryInfo_2, " = ").concat(resultCurrency_2);
445
445
  totalFee = total_2;
446
446
  resultFee = result_2;
447
447
  }
@@ -516,7 +516,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
516
516
  // Calcula baseado na taxa do intervalo mais alto que tem maxWeight
517
517
  var total_4 = +highestIntervalFee.value;
518
518
  // Calcular diferença de peso
519
- var weightDifference = Math.ceil(((cte === null || cte === void 0 ? void 0 : cte.taxedWeight) || 0) - (highestIntervalFee.maxWeight || 0));
519
+ var weightDifference = Number((((cte === null || cte === void 0 ? void 0 : cte.taxedWeight) || 0) - (highestIntervalFee.maxWeight || 0)).toFixed(2));
520
520
  // Calcular valor adicional pela diferença de peso
521
521
  var additionalValue = weightDifference * +ratecardLaneFee.value;
522
522
  // Somar ao total
@@ -532,7 +532,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
532
532
  style: 'currency',
533
533
  currency: 'BRL',
534
534
  });
535
- var result_4 = "".concat(valueCurrency_2, " + ").concat(weightDifference, " kg x ").concat(convertNumberToCurrency(+ratecardLaneFee.value, 'pt-br')).concat(redeliveryInfo_4, " = ").concat(resultCurrency_4);
535
+ var result_4 = "".concat(cte.taxedWeight, " kg = ").concat(valueCurrency_2, " + ").concat(weightDifference, " kg x ").concat(convertNumberToCurrency(+ratecardLaneFee.value, 'pt-br')).concat(redeliveryInfo_4, " = ").concat(resultCurrency_4);
536
536
  totalFee = total_4;
537
537
  resultFee = result_4;
538
538
  }
package/build/index.js.gz CHANGED
Binary file