From 45e9487b5c01c97f56ae24e7bc18e626486baac2 Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Fri, 17 Jan 2025 00:04:55 -0300 Subject: [PATCH] Dropdown de Comunas --- app/src/Controller/Ventas/Facturacion.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/Controller/Ventas/Facturacion.php b/app/src/Controller/Ventas/Facturacion.php index 39ccccb..1563277 100644 --- a/app/src/Controller/Ventas/Facturacion.php +++ b/app/src/Controller/Ventas/Facturacion.php @@ -8,6 +8,7 @@ use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Incoviba\Common\Alias\View; use Incoviba\Common\Ideal; +use Incoviba\Repository; use Incoviba\Service; class Facturacion extends Ideal\Controller @@ -29,6 +30,7 @@ class Facturacion extends Ideal\Controller Service\Venta $ventaService, Service\Proyecto\Terreno $terrenoService, Service\IPC $ipcService, Service\UF $ufService, Service\Venta\Factura $facturasService, + Repository\Comuna $comunaRepository, int $venta_id): ResponseInterface { $venta = $ventaService->getById($venta_id); @@ -48,7 +50,8 @@ class Facturacion extends Ideal\Controller } } $facturas = $facturasService->getByVenta($venta->id); + $comunas = $comunaRepository->fetchAll('descripcion'); - return $view->render($response, 'ventas.facturacion.show', compact('venta', 'terreno', 'uf', 'ipc', 'facturas')); + return $view->render($response, 'ventas.facturacion.show', compact('venta', 'terreno', 'uf', 'ipc', 'facturas', 'comunas')); } }