b2m-utils 0.0.275 → 0.0.277
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 +8 -3
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +8 -3
- 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
|
@@ -578,9 +578,9 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
578
578
|
switch (fee_1.feeCalculationTypeId) {
|
|
579
579
|
case FeeCalculationTypeEnum.TOTAL_PERCENTAGE:
|
|
580
580
|
if (allFees && Array.isArray(allFees) && (allFees === null || allFees === void 0 ? void 0 : allFees.length) > 0) {
|
|
581
|
-
var
|
|
582
|
-
var filteredFeesResults = filterSiblingFees(
|
|
583
|
-
return calculateFee(it, cte,
|
|
581
|
+
var filteredFees_1 = allFees.filter(function (i) { var _a, _b; return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) !== FeeCalculationTypeEnum.TOTAL_PERCENTAGE && ((_b = i.fee) === null || _b === void 0 ? void 0 : _b.parentId) !== fee_1.parentId; });
|
|
582
|
+
var filteredFeesResults = filterSiblingFees(filteredFees_1.map(function (it) {
|
|
583
|
+
return calculateFee(it, cte, filteredFees_1, debug, allFeesForCalc);
|
|
584
584
|
}));
|
|
585
585
|
var totalFromAllFees = filteredFeesResults.map(function (result) {
|
|
586
586
|
if (result === null || result === void 0 ? void 0 : result.totalToCalc) {
|
|
@@ -588,6 +588,11 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
588
588
|
}
|
|
589
589
|
return 0;
|
|
590
590
|
});
|
|
591
|
+
console.log({
|
|
592
|
+
filteredFees: filteredFees_1,
|
|
593
|
+
filteredFeesResults: filteredFeesResults,
|
|
594
|
+
totalFromAllFees: totalFromAllFees,
|
|
595
|
+
});
|
|
591
596
|
if (totalFromAllFees && (totalFromAllFees === null || totalFromAllFees === void 0 ? void 0 : totalFromAllFees.length) > 0) {
|
|
592
597
|
var totalValueFromAllFees = totalFromAllFees.filter(function (i) { return !isNaN(+i) && +i > 0; }).reduce(function (previous, current) {
|
|
593
598
|
if (!isNaN(+previous) && !isNaN(+current)) {
|
package/build/index.esm.js.gz
CHANGED
|
Binary file
|