FIX: Edit Pago sin "valor"

This commit is contained in:
Juan Pablo Vial
2024-11-29 18:09:55 -03:00
parent f5add0b4c5
commit 44f32d9e5f
2 changed files with 5 additions and 3 deletions

View File

@ -153,7 +153,9 @@ class Pago
$data['uf'] = $this->ufService->get(new DateTimeImmutable($data['fecha']));
}
$filteredData = $this->pagoRepository->filterData($data);
$filteredData['valor'] = round($this->valorService->clean($filteredData['valor']));
if (array_key_exists('valor', $filteredData)) {
$filteredData['valor'] = round($this->valorService->clean($filteredData['valor']));
}
$pago = $this->pagoRepository->edit($pago, $filteredData);
$pago->currentEstado = $this->estadoPagoRepository->fetchCurrentByPago($pago->id);
return $pago;