Centros de Costos

This commit is contained in:
2024-01-09 23:35:35 -03:00
parent 74b3bb42ea
commit a66b549a8c
18 changed files with 725 additions and 0 deletions

View File

@ -0,0 +1,24 @@
<?php
namespace Incoviba\Controller;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Incoviba\Repository;
use Incoviba\Common\Alias\View;
class CentrosCostos
{
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, View $view,
Repository\CentroCosto $centroCostoRepository,
Repository\TipoCentro $tipoCentroRepository,
Repository\CategoriaCentro $categoriaCentroRepository,
Repository\TipoCuenta $tipoCuentaRepository): ResponseInterface
{
$centrosCostos = $centroCostoRepository->fetchAll();
$tiposCentros = $tipoCentroRepository->fetchAll();
$categorias = $categoriaCentroRepository->fetchAll('descripcion');
$tiposCuentas = $tipoCuentaRepository->fetchAll();
return $view->render($response, 'contabilidad.centros_costos', compact('centrosCostos',
'tiposCentros', 'categorias', 'tiposCuentas'));
}
}