Agregar y editar abono cuotas.

This commit is contained in:
Juan Pablo Vial
2024-11-28 17:12:35 -03:00
parent 4f0a56c711
commit f4b8634cb4
10 changed files with 114 additions and 12 deletions

View File

@ -12,6 +12,7 @@ class Cuotas
{
public function __invoke(ServerRequestInterface $request, ResponseInterface $response,
Service\Venta $ventaService,
Repository\Venta\TipoEstadoPago $estadoPagoRepository,
Repository\Venta\Abono\Cuota $cuotaRepository, View $view, int $venta_id): ResponseInterface
{
$venta = null;
@ -22,6 +23,10 @@ class Cuotas
try {
$cuotas = $cuotaRepository->fetchByVenta($venta_id);
} catch (EmptyResult $e) {}
return $view->render($response, 'ventas.escrituras.abono.cuotas', compact('venta', 'cuotas'));
$estados = [];
try {
$estados = $estadoPagoRepository->fetchAll();
} catch (EmptyResult $e) {}
return $view->render($response, 'ventas.escrituras.abono.cuotas', compact('venta', 'cuotas', 'estados'));
}
}