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')); } }