2024-06-18

This commit is contained in:
Juan Pablo Vial
2024-06-18 22:41:03 -04:00
parent 6169089475
commit 390e79ad6d
60 changed files with 3162 additions and 155 deletions

View File

@ -26,9 +26,10 @@ class Facturacion extends Ideal\Controller
* @throws Exception
*/
public function show(ServerRequestInterface $request, ResponseInterface $response, View $view,
Service\Venta $ventaService, Service\Proyecto\Terreno $terrenoService,
Service\IPC $ipcService, Service\UF $ufService,
int $venta_id): ResponseInterface
Service\Venta $ventaService, Service\Proyecto\Terreno $terrenoService,
Service\IPC $ipcService, Service\UF $ufService,
Service\Venta\Factura $facturasService,
int $venta_id): ResponseInterface
{
$venta = $ventaService->getById($venta_id);
$uf = $ufService->get($venta->currentEstado()->fecha);
@ -48,7 +49,8 @@ class Facturacion extends Ideal\Controller
$ipc = $ipcService->get($prevMonthTerreno, $prevMonth);
}
}
$facturas = $facturasService->getByVenta($venta->id);
return $view->render($response, 'ventas.facturacion.show', compact('venta', 'terreno', 'uf', 'ipc'));
return $view->render($response, 'ventas.facturacion.show', compact('venta', 'terreno', 'uf', 'ipc', 'facturas'));
}
}