Centros de Costos
This commit is contained in:
24
app/src/Controller/CentrosCostos.php
Normal file
24
app/src/Controller/CentrosCostos.php
Normal 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'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user