From 1d77d65af2aca1ada0e53a8079c425e40cc85b35 Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Tue, 13 May 2025 20:18:51 -0400 Subject: [PATCH] Ventas con cuotas pendientes --- app/src/Service/Venta.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/src/Service/Venta.php b/app/src/Service/Venta.php index 69cb741..3fc8539 100644 --- a/app/src/Service/Venta.php +++ b/app/src/Service/Venta.php @@ -175,6 +175,19 @@ class Venta extends Service return $data; } + /** + * @return array + * @throws Read + */ + public function getAllWithCuotaPending(): array + { + try { + return array_map([$this, 'process'],$this->ventaRepository->fetchAllWithCuotaPending()); + } catch (Implement\Exception\EmptyResult $exception) { + throw new Read(__CLASS__, $exception); + } + } + protected function process(Model\Venta $venta): Model\Venta { if ($venta->uf === 0.0) {