Ventas con cuotas pendientes

This commit is contained in:
Juan Pablo Vial
2025-05-13 20:18:51 -04:00
parent 0f0c81e283
commit 1d77d65af2

View File

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