Dropdown de Comunas

This commit is contained in:
Juan Pablo Vial
2025-01-17 00:04:55 -03:00
parent bf054c22c2
commit 45e9487b5c

View File

@ -8,6 +8,7 @@ use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use Incoviba\Common\Alias\View; use Incoviba\Common\Alias\View;
use Incoviba\Common\Ideal; use Incoviba\Common\Ideal;
use Incoviba\Repository;
use Incoviba\Service; use Incoviba\Service;
class Facturacion extends Ideal\Controller class Facturacion extends Ideal\Controller
@ -29,6 +30,7 @@ class Facturacion extends Ideal\Controller
Service\Venta $ventaService, Service\Proyecto\Terreno $terrenoService, Service\Venta $ventaService, Service\Proyecto\Terreno $terrenoService,
Service\IPC $ipcService, Service\UF $ufService, Service\IPC $ipcService, Service\UF $ufService,
Service\Venta\Factura $facturasService, Service\Venta\Factura $facturasService,
Repository\Comuna $comunaRepository,
int $venta_id): ResponseInterface int $venta_id): ResponseInterface
{ {
$venta = $ventaService->getById($venta_id); $venta = $ventaService->getById($venta_id);
@ -48,7 +50,8 @@ class Facturacion extends Ideal\Controller
} }
} }
$facturas = $facturasService->getByVenta($venta->id); $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'));
} }
} }