b2m-utils 0.0.190 → 0.0.192
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 +3 -6
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +3 -6
- 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
|
@@ -389,11 +389,8 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
389
389
|
switch (fee_1.feeCalculationTypeId) {
|
|
390
390
|
case FeeCalculationTypeEnum.TOTAL_PERCENTAGE:
|
|
391
391
|
if (allFees && Array.isArray(allFees) && (allFees === null || allFees === void 0 ? void 0 : allFees.length) > 0) {
|
|
392
|
-
var totalFromAllFees = allFees.filter(function (i) { var _a; return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) !== FeeCalculationTypeEnum.TOTAL_PERCENTAGE; }).map(function () {
|
|
393
|
-
|
|
394
|
-
var result = {
|
|
395
|
-
totalToCalc: 0,
|
|
396
|
-
};
|
|
392
|
+
var totalFromAllFees = allFees.filter(function (i) { var _a; return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) !== FeeCalculationTypeEnum.TOTAL_PERCENTAGE; }).map(function (it) {
|
|
393
|
+
var result = calculateFee(it, cte, allFees, debug, allFeesForCalc);
|
|
397
394
|
if (result === null || result === void 0 ? void 0 : result.totalToCalc) {
|
|
398
395
|
return result.totalToCalc;
|
|
399
396
|
}
|
|
@@ -407,7 +404,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
407
404
|
else {
|
|
408
405
|
return 0;
|
|
409
406
|
}
|
|
410
|
-
});
|
|
407
|
+
}, 0);
|
|
411
408
|
if (totalValueFromAllFees && !isNaN(+totalValueFromAllFees)) {
|
|
412
409
|
var valueToMultiply = (1 - value);
|
|
413
410
|
var total_1 = +totalValueFromAllFees * (valueToMultiply / 100);
|
package/build/index.esm.js.gz
CHANGED
|
Binary file
|