Skip to content

Commit

Permalink
Al redondear montos según su moneda se considera el separador decimal…
Browse files Browse the repository at this point in the history
… y de miles de la moneda para formatear el monto.
  • Loading branch information
estebandelaf committed Jan 18, 2025
1 parent 28a1951 commit c542963
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ protected function createHandlers(): array
)->findBy(['glosa' => $codigo]);
$moneda = ($result[0] ?? null)->getMoneda() ?? Moneda::XXX;
$num = round((float) $num, $moneda->getDecimales());
return number_format($num, $moneda->getDecimales(), ',', '.');
return number_format(
$num,
$moneda->getDecimales(),
$moneda->getSeparadorDecimal(),
$moneda->getSeparadorMiles(),
);
},
];
}
Expand Down

0 comments on commit c542963

Please sign in to comment.