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.
package/build/index.js CHANGED
@@ -1026,11 +1026,13 @@ var calculateTotalPercentageFees = function (allFees, cte, allFeesForCalc) {
1026
1026
  console.log("\n\uD83D\uDD04 Calculando ".concat(percentageFees.length, " fees TOTAL_PERCENTAGE de forma iterativa"));
1027
1027
  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(', ')));
1028
1028
  // Calcular fees não-percentuais (base fixa)
1029
+ 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(', ')));
1029
1030
  var nonPercentageResults = filterSiblingFees(nonPercentageFees.map(function (it) {
1030
1031
  return calculateFee(it, cte, allFees, false, allFeesForCalc);
1031
1032
  }));
1032
1033
  var baseNonPercentage = nonPercentageResults.reduce(function (sum, r) { return sum + (r.totalToCalc || 0); }, 0);
1033
1034
  console.log("\uD83D\uDCCA Base n\u00E3o-percentual: R$ ".concat(baseNonPercentage.toFixed(2)));
1035
+ 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(', ')));
1034
1036
  // Calcular fees percentuais iterativamente até convergir
1035
1037
  var maxIterations = 10;
1036
1038
  var tolerance = 0.01; // Tolerância de 1 centavo
package/build/index.js.gz CHANGED
Binary file