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.
- package/build/enums/CarrierDocumentConfigTypeKeyEnum.d.ts +4 -0
- package/build/enums/InputTypeEnum.d.ts +3 -0
- package/build/enums/index.d.ts +2 -0
- package/build/index.esm.js +16 -6
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +15 -5
- package/build/index.js.gz +0 -0
- package/build/index.js.map +1 -1
- package/build/types/CarrierDocument/index.d.ts +2 -0
- package/build/types/CarrierDocumentConfig/index.d.ts +12 -0
- package/build/types/CarrierDocumentConfigType/index.d.ts +17 -0
- package/build/types/index.d.ts +4 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -22,6 +22,12 @@ exports.ApplicationEnum = void 0;
|
|
|
22
22
|
ApplicationEnum[ApplicationEnum["AUDIT"] = 7] = "AUDIT";
|
|
23
23
|
})(exports.ApplicationEnum || (exports.ApplicationEnum = {}));
|
|
24
24
|
|
|
25
|
+
exports.CarrierDocumentConfigTypeKeyEnum = void 0;
|
|
26
|
+
(function (CarrierDocumentConfigTypeKeyEnum) {
|
|
27
|
+
CarrierDocumentConfigTypeKeyEnum["DEFAULT_MODAL"] = "default_modal";
|
|
28
|
+
CarrierDocumentConfigTypeKeyEnum["MULTIMODAL_DEFAULT_MODAL"] = "multimodal_default_modal";
|
|
29
|
+
})(exports.CarrierDocumentConfigTypeKeyEnum || (exports.CarrierDocumentConfigTypeKeyEnum = {}));
|
|
30
|
+
|
|
25
31
|
exports.CountryEnum = void 0;
|
|
26
32
|
(function (CountryEnum) {
|
|
27
33
|
CountryEnum[CountryEnum["BRAZIL"] = 1] = "BRAZIL";
|
|
@@ -182,6 +188,11 @@ exports.ImapHostsEnum = void 0;
|
|
|
182
188
|
ImapHostsEnum["OUTLOOK"] = "OUTLOOK";
|
|
183
189
|
})(exports.ImapHostsEnum || (exports.ImapHostsEnum = {}));
|
|
184
190
|
|
|
191
|
+
exports.InputTypeEnum = void 0;
|
|
192
|
+
(function (InputTypeEnum) {
|
|
193
|
+
InputTypeEnum["RATECARD_MODALS_SELECT"] = "ratecard-modals-select";
|
|
194
|
+
})(exports.InputTypeEnum || (exports.InputTypeEnum = {}));
|
|
195
|
+
|
|
185
196
|
exports.ModalEnum = void 0;
|
|
186
197
|
(function (ModalEnum) {
|
|
187
198
|
ModalEnum[ModalEnum["AIR"] = 1] = "AIR";
|
|
@@ -537,9 +548,9 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
537
548
|
var firstTotal = +totalValueFromAllFees / +valueToDivide;
|
|
538
549
|
var total = +firstTotal * +icmsValue;
|
|
539
550
|
var totalValueFromAllFeesCurrency = convertNumberToCurrency(+totalValueFromAllFees, 'pt-br');
|
|
540
|
-
var
|
|
541
|
-
totalFee = Number(
|
|
542
|
-
totalToCalc = Number(
|
|
551
|
+
var truncatedTo3Decimals = Math.floor(total * 1000) / 1000;
|
|
552
|
+
totalFee = Number(truncatedTo3Decimals.toFixed(2));
|
|
553
|
+
totalToCalc = Number(truncatedTo3Decimals.toFixed(2));
|
|
543
554
|
var resultCurrency = (+totalToCalc).toLocaleString('pt-BR', {
|
|
544
555
|
style: 'currency',
|
|
545
556
|
currency: 'BRL',
|
|
@@ -880,8 +891,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
880
891
|
}
|
|
881
892
|
}
|
|
882
893
|
// totalToCalc = totalFee;
|
|
883
|
-
|
|
884
|
-
totalToCalc = Number(truncatedTo3Decimals.toFixed(2));
|
|
894
|
+
totalToCalc = Math.floor(+totalFee * 100) / 100;
|
|
885
895
|
if (fee_1.parentId) {
|
|
886
896
|
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; });
|
|
887
897
|
if (siblingFees && (siblingFees === null || siblingFees === void 0 ? void 0 : siblingFees.length) > 0) {
|
package/build/index.js.gz
CHANGED
|
Binary file
|