b2m-utils 0.0.278 → 0.0.280
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 +7 -1
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +7 -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
|
@@ -1357,12 +1357,18 @@ var getCtesFeesResult = function (feesToCalc, cte, allFeesForCalc) {
|
|
|
1357
1357
|
var icmsRate = (cte.icmsIncidence !== undefined && cte.icmsIncidence !== null && !isNaN(+cte.icmsIncidence))
|
|
1358
1358
|
? +(cte.icmsIncidence) / 100
|
|
1359
1359
|
: icmsFee.value || 0;
|
|
1360
|
+
console.log('DEBUG ICMS getCtesFeesResult:', {
|
|
1361
|
+
valuesForIcms: valuesForIcms,
|
|
1362
|
+
icmsRate: icmsRate,
|
|
1363
|
+
totalBeforeIcms: valuesForIcms.reduce(function (sum, val) { return sum + val; }, 0),
|
|
1364
|
+
results: results.map(function (r) { return ({ feeId: r.feeId, total: r.total }); })
|
|
1365
|
+
});
|
|
1360
1366
|
// Usar calculateIcms diretamente
|
|
1361
1367
|
var icmsCalculation = calculateIcms(valuesForIcms, icmsRate);
|
|
1362
1368
|
if (icmsCalculation.isValid && !isNaN(+icmsCalculation.total)) {
|
|
1363
1369
|
results.push({
|
|
1364
1370
|
total: +(icmsCalculation.total).toFixed(2),
|
|
1365
|
-
resultFee: "(".concat(icmsCalculation.totalValueFromAllFees.
|
|
1371
|
+
resultFee: "(".concat(icmsCalculation.totalValueFromAllFees.toLocaleString('pt-BR', { style: 'currency', currency: 'BRL' }), " / ").concat(icmsCalculation.valueToDivide, ") x ").concat(icmsRate, " = ").concat(icmsCalculation.total.toLocaleString('pt-BR', { style: 'currency', currency: 'BRL' })),
|
|
1366
1372
|
feeValue: icmsRate,
|
|
1367
1373
|
feeId: icmsFee.feeId,
|
|
1368
1374
|
});
|
package/build/index.esm.js.gz
CHANGED
|
Binary file
|