FIX: edit payments

This commit is contained in:
Juan Pablo Vial
2025-11-25 13:22:52 -03:00
parent c9056451eb
commit 5f348e954e
6 changed files with 50 additions and 13 deletions

View File

@ -56,7 +56,11 @@ class Credito extends Ideal\Service
} catch (DateMalformedStringException) {
$fecha = new DateTimeImmutable();
}
$uf = $this->valorService->clean($data['uf']) ?? $this->moneyService->getUF($fecha);
if (array_key_exists('uf', $data)) {
$uf = $this->valorService->clean($data['uf']) ?? $this->moneyService->getUF($fecha);
} else {
$uf = $this->moneyService->getUF($fecha);
}
try {
$tipoPago = $this->tipoPagoRepository->fetchByDescripcion('carta de resguardo');
} catch (EmptyResult $exception) {