b2m-utils 0.0.281 → 0.0.283
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.esm.js +8 -2
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +8 -2
- package/build/index.js.gz +0 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1285,7 +1285,7 @@ var getCtesFeesResult = function (feesToCalc, cte, allFeesForCalc) {
|
|
|
1285
1285
|
var results = [];
|
|
1286
1286
|
// Separar fees por tipo: normais, TOTAL_PERCENTAGE e ICMS
|
|
1287
1287
|
var icmsFee = feesToCalc.find(function (f) { var _a; return ((_a = f.fee) === null || _a === void 0 ? void 0 : _a.id) === exports.FeeEnum.ICMS || f.feeId === exports.FeeEnum.ICMS; });
|
|
1288
|
-
var totalPercentageFees = feesToCalc.filter(function (f) { var _a; return ((_a = f.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) === exports.FeeCalculationTypeEnum.TOTAL_PERCENTAGE; });
|
|
1288
|
+
var totalPercentageFees = feesToCalc.filter(function (f) { var _a, _b; return ((_a = f.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) === exports.FeeCalculationTypeEnum.TOTAL_PERCENTAGE && ((_b = f.fee) === null || _b === void 0 ? void 0 : _b.id) !== exports.FeeEnum.ICMS && f.feeId !== exports.FeeEnum.ICMS; });
|
|
1289
1289
|
var normalFees = feesToCalc.filter(function (f) {
|
|
1290
1290
|
var _a, _b;
|
|
1291
1291
|
return ((_a = f.fee) === null || _a === void 0 ? void 0 : _a.id) !== exports.FeeEnum.ICMS &&
|
|
@@ -1306,7 +1306,13 @@ var getCtesFeesResult = function (feesToCalc, cte, allFeesForCalc) {
|
|
|
1306
1306
|
var totalToPush = totalFee;
|
|
1307
1307
|
if ((_b = item.fee) === null || _b === void 0 ? void 0 : _b.parentId) {
|
|
1308
1308
|
var fee_1 = item.fee;
|
|
1309
|
-
var siblingFees = feesToCalc === null || feesToCalc === void 0 ? void 0 : feesToCalc.filter(function (i) {
|
|
1309
|
+
var siblingFees = feesToCalc === null || feesToCalc === void 0 ? void 0 : feesToCalc.filter(function (i) {
|
|
1310
|
+
var _a, _b, _c;
|
|
1311
|
+
return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.parentId) === fee_1.parentId &&
|
|
1312
|
+
((_b = i.fee) === null || _b === void 0 ? void 0 : _b.id) !== fee_1.id &&
|
|
1313
|
+
((_c = i.fee) === null || _c === void 0 ? void 0 : _c.id) !== exports.FeeEnum.ICMS &&
|
|
1314
|
+
i.feeId !== exports.FeeEnum.ICMS;
|
|
1315
|
+
});
|
|
1310
1316
|
if (siblingFees && (siblingFees === null || siblingFees === void 0 ? void 0 : siblingFees.length) > 0) {
|
|
1311
1317
|
var siblingFeesResults = [];
|
|
1312
1318
|
for (var _f = 0, siblingFees_1 = siblingFees; _f < siblingFees_1.length; _f++) {
|
package/build/index.js.gz
CHANGED
|
Binary file
|