b2m-utils 0.0.242 → 0.0.243

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.
@@ -1,6 +1,6 @@
1
- import { Cte, Ratecard, RatecardLane } from "../../types";
1
+ import { Cte, Ratecard, RatecardLane, RatecardLaneFee } from "../../types";
2
2
  export declare const getFilteredFeesToAudit: ({ lane, ratecard, cte, }: {
3
3
  lane: RatecardLane;
4
4
  ratecard: Ratecard;
5
5
  cte: Cte;
6
- }) => import("../../types").RatecardLaneFee[] | undefined;
6
+ }) => RatecardLaneFee[] | undefined;
@@ -979,6 +979,28 @@ var getFilteredFeesToAudit = function (_a) {
979
979
  }
980
980
  return true;
981
981
  });
982
+ // Garantir que ICMS sempre esteja presente
983
+ var hasIcms = uniqueFees === null || uniqueFees === void 0 ? void 0 : uniqueFees.some(function (fee) { return fee.feeId === FeeEnum.ICMS; });
984
+ if (!hasIcms) {
985
+ // Adicionar ICMS com valor 0 se não existir
986
+ uniqueFees === null || uniqueFees === void 0 ? void 0 : uniqueFees.push({
987
+ id: 0,
988
+ laneId: lane.id,
989
+ feeId: FeeEnum.ICMS,
990
+ value: 0,
991
+ currencyId: null,
992
+ minKm: null,
993
+ maxKm: null,
994
+ minWeight: null,
995
+ maxWeight: null,
996
+ vehicleTypeId: null,
997
+ fee: {
998
+ id: FeeEnum.ICMS,
999
+ name: 'ICMS',
1000
+ parentId: null,
1001
+ },
1002
+ });
1003
+ }
982
1004
  return uniqueFees;
983
1005
  };
984
1006
 
Binary file