b2m-utils 0.0.193 → 0.0.195
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 +4 -4
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +4 -4
- package/build/index.js.gz +0 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -430,11 +430,11 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
430
430
|
});
|
|
431
431
|
if (totalFromAllFees && (totalFromAllFees === null || totalFromAllFees === void 0 ? void 0 : totalFromAllFees.length) > 0) {
|
|
432
432
|
var totalValueFromAllFees = totalFromAllFees.filter(function (i) { return !isNaN(+i) && +i > 0; }).reduce(function (previous, current) {
|
|
433
|
-
if (
|
|
433
|
+
if (!isNaN(+previous) && !isNaN(+current)) {
|
|
434
434
|
return +previous + +current;
|
|
435
435
|
}
|
|
436
436
|
else {
|
|
437
|
-
return
|
|
437
|
+
return previous;
|
|
438
438
|
}
|
|
439
439
|
}, 0);
|
|
440
440
|
console.log('💰 TOTAL_PERCENTAGE - Valor total calculado:', {
|
|
@@ -442,8 +442,8 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
442
442
|
validValues: totalFromAllFees.filter(function (i) { return !isNaN(+i) && +i > 0; })
|
|
443
443
|
});
|
|
444
444
|
if (totalValueFromAllFees && !isNaN(+totalValueFromAllFees)) {
|
|
445
|
-
var valueToMultiply = (
|
|
446
|
-
var total_1 = +totalValueFromAllFees *
|
|
445
|
+
var valueToMultiply = (+value / 100);
|
|
446
|
+
var total_1 = +totalValueFromAllFees * valueToMultiply;
|
|
447
447
|
console.log('🧮 TOTAL_PERCENTAGE - Cálculo final:', {
|
|
448
448
|
totalValueFromAllFees: totalValueFromAllFees,
|
|
449
449
|
valueToMultiply: valueToMultiply,
|
package/build/index.js.gz
CHANGED
|
Binary file
|