25 lines
1.0 KiB
PHP
25 lines
1.0 KiB
PHP
|
<?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'));
|
||
|
}
|
||
|
}
|