b2m-utils 0.0.262 → 0.0.264

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.
@@ -0,0 +1,4 @@
1
+ export declare enum CarrierDocumentConfigTypeKeyEnum {
2
+ DEFAULT_MODAL = "default_modal",
3
+ MULTIMODAL_DEFAULT_MODAL = "multimodal_default_modal"
4
+ }
@@ -0,0 +1,3 @@
1
+ export declare enum InputTypeEnum {
2
+ RATECARD_MODALS_SELECT = "ratecard-modals-select"
3
+ }
@@ -1,5 +1,6 @@
1
1
  export * from './ApplicationColumnNameEnum';
2
2
  export * from './ApplicationEnum';
3
+ export * from './CarrierDocumentConfigTypeKeyEnum';
3
4
  export * from './CountryEnum';
4
5
  export * from './CteStatusEnum';
5
6
  export * from './CteVehicleTypeEnum';
@@ -13,6 +14,7 @@ export * from './FeeCategoryEnum';
13
14
  export * from './FeeEnum';
14
15
  export * from './FreightRegionEnum';
15
16
  export * from './ImapHostsEnum';
17
+ export * from './InputTypeEnum';
16
18
  export * from './ModalEnum';
17
19
  export * from './NotificationTypeEnum';
18
20
  export * from './PermissionEnum';
@@ -18,6 +18,12 @@ var ApplicationEnum;
18
18
  ApplicationEnum[ApplicationEnum["AUDIT"] = 7] = "AUDIT";
19
19
  })(ApplicationEnum || (ApplicationEnum = {}));
20
20
 
21
+ var CarrierDocumentConfigTypeKeyEnum;
22
+ (function (CarrierDocumentConfigTypeKeyEnum) {
23
+ CarrierDocumentConfigTypeKeyEnum["DEFAULT_MODAL"] = "default_modal";
24
+ CarrierDocumentConfigTypeKeyEnum["MULTIMODAL_DEFAULT_MODAL"] = "multimodal_default_modal";
25
+ })(CarrierDocumentConfigTypeKeyEnum || (CarrierDocumentConfigTypeKeyEnum = {}));
26
+
21
27
  var CountryEnum;
22
28
  (function (CountryEnum) {
23
29
  CountryEnum[CountryEnum["BRAZIL"] = 1] = "BRAZIL";
@@ -178,6 +184,11 @@ var ImapHostsEnum;
178
184
  ImapHostsEnum["OUTLOOK"] = "OUTLOOK";
179
185
  })(ImapHostsEnum || (ImapHostsEnum = {}));
180
186
 
187
+ var InputTypeEnum;
188
+ (function (InputTypeEnum) {
189
+ InputTypeEnum["RATECARD_MODALS_SELECT"] = "ratecard-modals-select";
190
+ })(InputTypeEnum || (InputTypeEnum = {}));
191
+
181
192
  var ModalEnum;
182
193
  (function (ModalEnum) {
183
194
  ModalEnum[ModalEnum["AIR"] = 1] = "AIR";
@@ -533,9 +544,9 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
533
544
  var firstTotal = +totalValueFromAllFees / +valueToDivide;
534
545
  var total = +firstTotal * +icmsValue;
535
546
  var totalValueFromAllFeesCurrency = convertNumberToCurrency(+totalValueFromAllFees, 'pt-br');
536
- var truncatedTo3Decimals_1 = Math.floor(total * 1000) / 1000;
537
- totalFee = Number(truncatedTo3Decimals_1.toFixed(2));
538
- totalToCalc = Number(truncatedTo3Decimals_1.toFixed(2));
547
+ var truncatedTo3Decimals = Math.floor(total * 1000) / 1000;
548
+ totalFee = Number(truncatedTo3Decimals.toFixed(2));
549
+ totalToCalc = Number(truncatedTo3Decimals.toFixed(2));
539
550
  var resultCurrency = (+totalToCalc).toLocaleString('pt-BR', {
540
551
  style: 'currency',
541
552
  currency: 'BRL',
@@ -876,8 +887,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
876
887
  }
877
888
  }
878
889
  // totalToCalc = totalFee;
879
- var truncatedTo3Decimals = Math.floor(+totalFee * 1000) / 1000;
880
- totalToCalc = Number(truncatedTo3Decimals.toFixed(2));
890
+ totalToCalc = Math.floor(+totalFee * 100) / 100;
881
891
  if (fee_1.parentId) {
882
892
  var siblingFees = allFees === null || allFees === void 0 ? void 0 : allFees.filter(function (i) { var _a, _b; return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.parentId) === fee_1.parentId && ((_b = i.fee) === null || _b === void 0 ? void 0 : _b.id) !== fee_1.id; });
883
893
  if (siblingFees && (siblingFees === null || siblingFees === void 0 ? void 0 : siblingFees.length) > 0) {
@@ -7819,5 +7829,5 @@ var setFormattedDatesInObjects = function (objectFormat) { return __awaiter(void
7819
7829
  });
7820
7830
  }); };
7821
7831
 
7822
- export { ApplicationColumnNameEnum, ApplicationEnum, CountryEnum, CteStatusEnum, CteVehicleTypeEnum, CurrencyEnum, DocumentTypeEnum, DomainConfigurationEnum, DomainTypeEnum, EXPORT_CTE_COLUMN_LABELS, ExportCteColumn, FeeCalculationTypeEnum, FeeCategoryEnum, FeeEnum, FreightRegionEnum, ImapHostsEnum, ModalEnum, NotificationTypeEnum, PermissionEnum, RatecardConditionalFeeTypeEnum, RatecardFeeConfigKeyEnum, RatecardFeeConfigTypeEnum, RatecardModalEnum, SlaRegionEnum, SpotStatusEnum, TrackProcessProviderTypeEnum, applyRedeliveryMultiplier, calculateFee, calculateIcms, convertNumberToCurrency, filterSiblingFees, formatDateString, getAllFeesForCalculation, getAuditTotalFromCte, getConfigurationFromDomain, getContractFromFreight, getContractRouteFromFreight, getCookies, getCteDateRange, getCteLane, getCteLaneFeesTotal, getCtesFeesResult, getDataFromToken, getFilteredFeesToAudit, getFormattedFreightPlaceName, getLaneFeesToCalc, getLaneFromRatecard, getNormalizedCityName, getRatecardFromCte, getRouteDeliveryTimeFromFreight, getRouteOnTimeFromFreight, normalizeString, setFormattedDatesInObjects, verifyConditionalFee, verifyDefaultFees };
7832
+ export { ApplicationColumnNameEnum, ApplicationEnum, CarrierDocumentConfigTypeKeyEnum, CountryEnum, CteStatusEnum, CteVehicleTypeEnum, CurrencyEnum, DocumentTypeEnum, DomainConfigurationEnum, DomainTypeEnum, EXPORT_CTE_COLUMN_LABELS, ExportCteColumn, FeeCalculationTypeEnum, FeeCategoryEnum, FeeEnum, FreightRegionEnum, ImapHostsEnum, InputTypeEnum, ModalEnum, NotificationTypeEnum, PermissionEnum, RatecardConditionalFeeTypeEnum, RatecardFeeConfigKeyEnum, RatecardFeeConfigTypeEnum, RatecardModalEnum, SlaRegionEnum, SpotStatusEnum, TrackProcessProviderTypeEnum, applyRedeliveryMultiplier, calculateFee, calculateIcms, convertNumberToCurrency, filterSiblingFees, formatDateString, getAllFeesForCalculation, getAuditTotalFromCte, getConfigurationFromDomain, getContractFromFreight, getContractRouteFromFreight, getCookies, getCteDateRange, getCteLane, getCteLaneFeesTotal, getCtesFeesResult, getDataFromToken, getFilteredFeesToAudit, getFormattedFreightPlaceName, getLaneFeesToCalc, getLaneFromRatecard, getNormalizedCityName, getRatecardFromCte, getRouteDeliveryTimeFromFreight, getRouteOnTimeFromFreight, normalizeString, setFormattedDatesInObjects, verifyConditionalFee, verifyDefaultFees };
7823
7833
  //# sourceMappingURL=index.esm.js.map
Binary file