b2m-utils 0.0.253 → 0.0.255
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 +4 -1
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +4 -1
- package/build/index.js.gz +0 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -485,7 +485,7 @@ var calculateFee = function (ratecardLaneFee, cte, allFees, debug, allFeesForCal
|
|
|
485
485
|
switch (fee_1.feeCalculationTypeId) {
|
|
486
486
|
case FeeCalculationTypeEnum.TOTAL_PERCENTAGE:
|
|
487
487
|
if (allFees && Array.isArray(allFees) && (allFees === null || allFees === void 0 ? void 0 : allFees.length) > 0) {
|
|
488
|
-
var filteredFees = allFees.filter(function (i) { var _a; return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) !== FeeCalculationTypeEnum.TOTAL_PERCENTAGE; });
|
|
488
|
+
var filteredFees = filterSiblingFees(allFees).filter(function (i) { var _a; return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) !== FeeCalculationTypeEnum.TOTAL_PERCENTAGE; });
|
|
489
489
|
var totalFromAllFees = filteredFees.map(function (it) {
|
|
490
490
|
var result = calculateFee(it, cte, allFees, debug, allFeesForCalc);
|
|
491
491
|
if (result === null || result === void 0 ? void 0 : result.totalToCalc) {
|
|
@@ -1182,6 +1182,9 @@ var getCtesFeesResult = function (feesToCalc, cte, allFeesForCalc) {
|
|
|
1182
1182
|
var item = nonIcmsFees_1[_i];
|
|
1183
1183
|
_loop_1(item);
|
|
1184
1184
|
}
|
|
1185
|
+
console.log("CALC TOTAL", {
|
|
1186
|
+
results: results,
|
|
1187
|
+
});
|
|
1185
1188
|
// SEGUNDA PASSADA: Calcular ICMS com base nos resultados já filtrados
|
|
1186
1189
|
if (icmsFee) {
|
|
1187
1190
|
// Coletar apenas os valores das fees que realmente contam (total > 0)
|
package/build/index.esm.js.gz
CHANGED
|
Binary file
|