22 lines
831 B
PHP
22 lines
831 B
PHP
|
<?php
|
||
|
namespace Incoviba\Controller\Ventas;
|
||
|
|
||
|
use Psr\Http\Message\ResponseInterface;
|
||
|
use Psr\Http\Message\ServerRequestInterface;
|
||
|
use Incoviba\Common\Alias\View;
|
||
|
use Incoviba\Service;
|
||
|
|
||
|
class Facturacion
|
||
|
{
|
||
|
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
|
||
|
{
|
||
|
$venta = $ventaService->getById($venta_id);
|
||
|
return $view->render($response, 'ventas.facturacion.show', compact('venta'));
|
||
|
}
|
||
|
}
|