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) {