Facturacion
This commit is contained in:
@ -8,14 +8,18 @@ use Incoviba\Service;
|
||||
|
||||
class Facturacion
|
||||
{
|
||||
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, View $view, Service\Proyecto $proyectoService): ResponseInterface
|
||||
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, View $view,
|
||||
Service\Proyecto $proyectoService): ResponseInterface
|
||||
{
|
||||
$proyectos = $proyectoService->getEscriturando();
|
||||
return $view->render($response, 'ventas.facturacion', compact('proyectos'));
|
||||
}
|
||||
public function show(ServerRequestInterface $request, ResponseInterface $response, View $view, Service\Venta $ventaService, int $venta_id): ResponseInterface
|
||||
public function show(ServerRequestInterface $request, ResponseInterface $response, View $view,
|
||||
Service\Venta $ventaService, Service\Proyecto\Terreno $terrenoService,
|
||||
int $venta_id): ResponseInterface
|
||||
{
|
||||
$venta = $ventaService->getById($venta_id);
|
||||
return $view->render($response, 'ventas.facturacion.show', compact('venta'));
|
||||
$terreno = $terrenoService->valor($venta->proyecto()->id);
|
||||
return $view->render($response, 'ventas.facturacion.show', compact('venta', 'terreno'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user