b2m-utils 0.0.291 → 0.0.292
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 +11 -2
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +11 -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
|
@@ -1008,8 +1008,17 @@ var calculateIcms = function (totalFromAllFees, icmsRate) {
|
|
|
1008
1008
|
var calculateTotalPercentageFees = function (allFees, cte, allFeesForCalc) {
|
|
1009
1009
|
var results = new Map();
|
|
1010
1010
|
// Separar fees em dois grupos
|
|
1011
|
-
|
|
1012
|
-
var
|
|
1011
|
+
// IMPORTANTE: ICMS não deve ser calculado aqui, ele tem tratamento especial no calculateFee
|
|
1012
|
+
var nonPercentageFees = allFees.filter(function (i) {
|
|
1013
|
+
var _a, _b;
|
|
1014
|
+
return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) !== exports.FeeCalculationTypeEnum.TOTAL_PERCENTAGE &&
|
|
1015
|
+
((_b = i.fee) === null || _b === void 0 ? void 0 : _b.id) !== exports.FeeEnum.ICMS;
|
|
1016
|
+
});
|
|
1017
|
+
var percentageFees = allFees.filter(function (i) {
|
|
1018
|
+
var _a, _b;
|
|
1019
|
+
return ((_a = i.fee) === null || _a === void 0 ? void 0 : _a.feeCalculationTypeId) === exports.FeeCalculationTypeEnum.TOTAL_PERCENTAGE &&
|
|
1020
|
+
((_b = i.fee) === null || _b === void 0 ? void 0 : _b.id) !== exports.FeeEnum.ICMS;
|
|
1021
|
+
});
|
|
1013
1022
|
// Se não houver fees percentuais, retornar vazio
|
|
1014
1023
|
if (percentageFees.length === 0) {
|
|
1015
1024
|
return results;
|
package/build/index.js.gz
CHANGED
|
Binary file
|