b2m-utils 0.0.273 → 0.0.275

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.js CHANGED
@@ -582,13 +582,10 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
582
582
  switch (fee_1.feeCalculationTypeId) {
583
583
  case exports.FeeCalculationTypeEnum.TOTAL_PERCENTAGE:
584
584
  if (allFees && Array.isArray(allFees) && (allFees === null || allFees === void 0 ? void 0 : allFees.length) > 0) {
585
- var filteredFees = allFees.filter(function (i) { var _a; return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) !== exports.FeeCalculationTypeEnum.TOTAL_PERCENTAGE; });
585
+ var filteredFees = allFees.filter(function (i) { var _a, _b; return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) !== exports.FeeCalculationTypeEnum.TOTAL_PERCENTAGE && ((_b = i.fee) === null || _b === void 0 ? void 0 : _b.parentId) !== fee_1.parentId; });
586
586
  var filteredFeesResults = filterSiblingFees(filteredFees.map(function (it) {
587
587
  return calculateFee(it, cte, allFees, debug, allFeesForCalc);
588
588
  }));
589
- console.log({
590
- filteredFeesResults: filteredFeesResults,
591
- });
592
589
  var totalFromAllFees = filteredFeesResults.map(function (result) {
593
590
  if (result === null || result === void 0 ? void 0 : result.totalToCalc) {
594
591
  return result.totalToCalc;
@@ -1284,9 +1281,6 @@ var getCtesFeesResult = function (feesToCalc, cte, allFeesForCalc) {
1284
1281
  // Separar ICMS das outras fees
1285
1282
  var icmsFee = feesToCalc.find(function (f) { var _a; return ((_a = f.fee) === null || _a === void 0 ? void 0 : _a.id) === exports.FeeEnum.ICMS; });
1286
1283
  var nonIcmsFees = feesToCalc.filter(function (f) { var _a; return ((_a = f.fee) === null || _a === void 0 ? void 0 : _a.id) !== exports.FeeEnum.ICMS; });
1287
- console.log({
1288
- nonIcmsFees: nonIcmsFees,
1289
- });
1290
1284
  var _loop_1 = function (item) {
1291
1285
  var feeTotal = calculateFee(item, cte, feesToCalc, false, allFeesForCalc);
1292
1286
  if (feeTotal === null || feeTotal === void 0 ? void 0 : feeTotal.totalFee) {
package/build/index.js.gz CHANGED
Binary file