From 936fd2d1e18f8b1cd818b0c1bd33f8a51c130d56 Mon Sep 17 00:00:00 2001 From: Aldarien Date: Mon, 18 Mar 2024 18:06:32 +0000 Subject: [PATCH] Cuota vacia --- app/src/Service/Venta/Cuota.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/Service/Venta/Cuota.php b/app/src/Service/Venta/Cuota.php index 8f022ca..9735701 100644 --- a/app/src/Service/Venta/Cuota.php +++ b/app/src/Service/Venta/Cuota.php @@ -75,10 +75,11 @@ class Cuota } public function getByPie(int $pie_id): array { - return $this->cuotaRepository->fetchByPie($pie_id); - /*return array_filter($this->cuotaRepository->fetchByPie($pie_id), function(Model\Venta\Cuota $cuota) { - return !in_array($cuota->pago->currentEstado->tipoEstadoPago->descripcion, ['anulado']); - });*/ + try { + return $this->cuotaRepository->fetchByPie($pie_id); + } catch (EmptyResult) { + return []; + } } public function getVigenteByPie(int $pie_id): array {