b2m-utils 0.0.197 → 0.0.198

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.
@@ -437,7 +437,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
437
437
  style: 'currency',
438
438
  currency: 'BRL',
439
439
  });
440
- var result_2 = "".concat(fractions, " fra\u00E7\u00F5es x ").concat(valueCurrency_1).concat(redeliveryInfo_2, " = ").concat(resultCurrency_2);
440
+ var result_2 = "".concat(cte.taxedWeight, " kg = ").concat(fractions, " fra\u00E7\u00F5es x ").concat(valueCurrency_1).concat(redeliveryInfo_2, " = ").concat(resultCurrency_2);
441
441
  totalFee = total_2;
442
442
  resultFee = result_2;
443
443
  }
@@ -512,7 +512,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
512
512
  // Calcula baseado na taxa do intervalo mais alto que tem maxWeight
513
513
  var total_4 = +highestIntervalFee.value;
514
514
  // Calcular diferença de peso
515
- var weightDifference = Math.ceil(((cte === null || cte === void 0 ? void 0 : cte.taxedWeight) || 0) - (highestIntervalFee.maxWeight || 0));
515
+ var weightDifference = Number((((cte === null || cte === void 0 ? void 0 : cte.taxedWeight) || 0) - (highestIntervalFee.maxWeight || 0)).toFixed(2));
516
516
  // Calcular valor adicional pela diferença de peso
517
517
  var additionalValue = weightDifference * +ratecardLaneFee.value;
518
518
  // Somar ao total
@@ -528,7 +528,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
528
528
  style: 'currency',
529
529
  currency: 'BRL',
530
530
  });
531
- var result_4 = "".concat(valueCurrency_2, " + ").concat(weightDifference, " kg x ").concat(convertNumberToCurrency(+ratecardLaneFee.value, 'pt-br')).concat(redeliveryInfo_4, " = ").concat(resultCurrency_4);
531
+ 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);
532
532
  totalFee = total_4;
533
533
  resultFee = result_4;
534
534
  }
Binary file