b2m-utils 0.0.189 → 0.0.191

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.
@@ -12,5 +12,7 @@ export declare enum FeeEnum {
12
12
  COLLECT_COMMODITY_VALUE = 136,
13
13
  TDA_MIN = 141,
14
14
  TDA_FREIGHT = 142,
15
- COLLECT = 151
15
+ COLLECT = 151,
16
+ COLLECT_PERCENTAGE_TOTAL = 152,
17
+ COLLECT_REVERSE_PERCENTAGE_TOTAL = 153
16
18
  }
@@ -146,6 +146,8 @@ var FeeEnum;
146
146
  FeeEnum[FeeEnum["TDA_MIN"] = 141] = "TDA_MIN";
147
147
  FeeEnum[FeeEnum["TDA_FREIGHT"] = 142] = "TDA_FREIGHT";
148
148
  FeeEnum[FeeEnum["COLLECT"] = 151] = "COLLECT";
149
+ FeeEnum[FeeEnum["COLLECT_PERCENTAGE_TOTAL"] = 152] = "COLLECT_PERCENTAGE_TOTAL";
150
+ FeeEnum[FeeEnum["COLLECT_REVERSE_PERCENTAGE_TOTAL"] = 153] = "COLLECT_REVERSE_PERCENTAGE_TOTAL";
149
151
  })(FeeEnum || (FeeEnum = {}));
150
152
 
151
153
  var FreightRegionEnum;
@@ -405,7 +407,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
405
407
  else {
406
408
  return 0;
407
409
  }
408
- });
410
+ }, 0);
409
411
  if (totalValueFromAllFees && !isNaN(+totalValueFromAllFees)) {
410
412
  var valueToMultiply = (1 - value);
411
413
  var total_1 = +totalValueFromAllFees * (valueToMultiply / 100);
@@ -7139,9 +7141,6 @@ var getLaneFromRatecard = function (cte) {
7139
7141
  var directLane = ratecard.RatecardLane.find(function (i) {
7140
7142
  return i.cityOriginId === cityOriginId && i.ufDestination === destinationUf && i.ratecardRegionId === destinationRatecardRegionId;
7141
7143
  });
7142
- console.log({
7143
- directLane: directLane,
7144
- });
7145
7144
  if (directLane) {
7146
7145
  return directLane;
7147
7146
  }
@@ -7154,9 +7153,6 @@ var getLaneFromRatecard = function (cte) {
7154
7153
  var reverseLane = ratecard.RatecardLane.find(function (i) {
7155
7154
  return i.cityOriginId === (cityDestination === null || cityDestination === void 0 ? void 0 : cityDestination.id) && i.ufDestination === originUf_1 && i.ratecardRegionId === originRatecardRegionId_1;
7156
7155
  });
7157
- console.log({
7158
- reverseLane: reverseLane,
7159
- });
7160
7156
  if (reverseLane) {
7161
7157
  return reverseLane;
7162
7158
  }
Binary file