b2m-utils 0.0.272 → 0.0.274
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.esm.js
CHANGED
|
@@ -578,10 +578,13 @@ 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 filteredFees = allFees.filter(function (i) { var _a; return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) !== FeeCalculationTypeEnum.TOTAL_PERCENTAGE; });
|
|
581
|
+
var filteredFees = 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
582
|
var filteredFeesResults = filterSiblingFees(filteredFees.map(function (it) {
|
|
583
583
|
return calculateFee(it, cte, allFees, debug, allFeesForCalc);
|
|
584
584
|
}));
|
|
585
|
+
console.log({
|
|
586
|
+
filteredFeesResults: filteredFeesResults,
|
|
587
|
+
});
|
|
585
588
|
var totalFromAllFees = filteredFeesResults.map(function (result) {
|
|
586
589
|
if (result === null || result === void 0 ? void 0 : result.totalToCalc) {
|
|
587
590
|
return result.totalToCalc;
|
|
@@ -1282,9 +1285,6 @@ var getCtesFeesResult = function (feesToCalc, cte, allFeesForCalc) {
|
|
|
1282
1285
|
});
|
|
1283
1286
|
var _loop_1 = function (item) {
|
|
1284
1287
|
var feeTotal = calculateFee(item, cte, feesToCalc, false, allFeesForCalc);
|
|
1285
|
-
console.log({
|
|
1286
|
-
feeTotal: feeTotal,
|
|
1287
|
-
});
|
|
1288
1288
|
if (feeTotal === null || feeTotal === void 0 ? void 0 : feeTotal.totalFee) {
|
|
1289
1289
|
var totalFee = feeTotal.totalFee, resultFee = feeTotal.resultFee, feeValue = feeTotal.feeValue;
|
|
1290
1290
|
var totalToPush = totalFee;
|
package/build/index.esm.js.gz
CHANGED
|
Binary file
|