b2m-utils 0.0.292 → 0.0.293

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.
@@ -1022,11 +1022,13 @@ var calculateTotalPercentageFees = function (allFees, cte, allFeesForCalc) {
1022
1022
  console.log("\n\uD83D\uDD04 Calculando ".concat(percentageFees.length, " fees TOTAL_PERCENTAGE de forma iterativa"));
1023
1023
  console.log("\uD83D\uDCCB Fees: ".concat(percentageFees.map(function (f) { var _a; return "".concat((_a = f.fee) === null || _a === void 0 ? void 0 : _a.name, " (").concat(f.value, "%)"); }).join(', ')));
1024
1024
  // Calcular fees não-percentuais (base fixa)
1025
+ console.log("\uD83D\uDCCB Fees n\u00E3o-percentuais: ".concat(nonPercentageFees.map(function (f) { var _a; return "".concat((_a = f.fee) === null || _a === void 0 ? void 0 : _a.name); }).join(', ')));
1025
1026
  var nonPercentageResults = filterSiblingFees(nonPercentageFees.map(function (it) {
1026
1027
  return calculateFee(it, cte, allFees, false, allFeesForCalc);
1027
1028
  }));
1028
1029
  var baseNonPercentage = nonPercentageResults.reduce(function (sum, r) { return sum + (r.totalToCalc || 0); }, 0);
1029
1030
  console.log("\uD83D\uDCCA Base n\u00E3o-percentual: R$ ".concat(baseNonPercentage.toFixed(2)));
1031
+ console.log("\uD83D\uDCCA Detalhamento: ".concat(nonPercentageResults.map(function (r) { var _a, _b; return "".concat((_a = r.fee) === null || _a === void 0 ? void 0 : _a.name, "=").concat((_b = r.totalToCalc) === null || _b === void 0 ? void 0 : _b.toFixed(2)); }).join(', ')));
1030
1032
  // Calcular fees percentuais iterativamente até convergir
1031
1033
  var maxIterations = 10;
1032
1034
  var tolerance = 0.01; // Tolerância de 1 centavo
Binary file