Restructura contabilidad
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
<?php
|
||||
namespace Incoviba\Controller\Ventas;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Incoviba\Common\Alias\View;
|
||||
use Incoviba\Common\Ideal\Controller;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
class Creditos extends Controller
|
||||
{
|
||||
public function show(ServerRequestInterface $request, ResponseInterface $response, View $view,
|
||||
Service\Venta $ventaService, Repository\Banco $bancoRepository,
|
||||
Service\Venta $ventaService, Repository\Contabilidad\Banco $bancoRepository,
|
||||
int $venta_id): ResponseInterface
|
||||
{
|
||||
$venta = $ventaService->getById($venta_id);
|
||||
|
@ -2,13 +2,13 @@
|
||||
namespace Incoviba\Controller\Ventas;
|
||||
|
||||
use DateTimeImmutable;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Common\Alias\View;
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
use Incoviba\Model;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service;
|
||||
use Incoviba\Model;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
class Cuotas
|
||||
{
|
||||
@ -73,12 +73,12 @@ class Cuotas
|
||||
$response->getBody()->write(json_encode($output));
|
||||
return $response->withHeader('Content-Type', 'application/json');
|
||||
}
|
||||
public function add(ServerRequestInterface $request, ResponseInterface $response, Service\Venta\Pie $pieService, Repository\Venta $ventaRepository, Repository\Banco $bancoRepository, View $view, int $pie_id): ResponseInterface
|
||||
public function add(ServerRequestInterface $request, ResponseInterface $response, Service\Venta\Pie $pieService, Repository\Venta $ventaRepository, Repository\Contabilidad\Banco $bancoRepository, View $view, int $pie_id): ResponseInterface
|
||||
{
|
||||
$pie = $pieService->getById($pie_id);
|
||||
$venta = $ventaRepository->fetchByPie($pie_id);
|
||||
$bancos = $bancoRepository->fetchAll();
|
||||
usort($bancos, function(Model\Banco $a, Model\Banco $b) {
|
||||
usort($bancos, function(Model\Contabilidad\Banco $a, Model\Contabilidad\Banco $b) {
|
||||
return strcmp($a->nombre, $b->nombre);
|
||||
});
|
||||
return $view->render($response, 'ventas.pies.cuotas.add', compact('pie', 'venta', 'bancos'));
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace Incoviba\Controller\Ventas;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Incoviba\Common\Alias\View;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
class Escrituras
|
||||
{
|
||||
@ -22,8 +22,8 @@ class Escrituras
|
||||
return $view->render($response, 'ventas.escrituras.informe', compact('venta'));
|
||||
}
|
||||
public function add(ServerRequestInterface $request, ResponseInterface $response, View $view,
|
||||
Service\Venta $ventaService, Repository\Banco $bancoRepository,
|
||||
int $venta_id): ResponseInterface
|
||||
Service\Venta $ventaService, Repository\Contabilidad\Banco $bancoRepository,
|
||||
int $venta_id): ResponseInterface
|
||||
{
|
||||
$venta = $ventaService->getById($venta_id);
|
||||
$bancos = $bancoRepository->fetchAll('nombre');
|
||||
|
@ -1,21 +1,21 @@
|
||||
<?php
|
||||
namespace Incoviba\Controller\Ventas;
|
||||
|
||||
use Incoviba\Common\Alias\View;
|
||||
use Incoviba\Model;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Incoviba\Common\Alias\View;
|
||||
use Incoviba\Service;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Model;
|
||||
|
||||
class Pies
|
||||
{
|
||||
public function cuotas(ServerRequestInterface $request, ResponseInterface $response, Service\Venta\Pie $pieService, Repository\Venta $ventaRepository, Repository\Banco $bancoRepository, View $view, int $pie_id): ResponseInterface
|
||||
public function cuotas(ServerRequestInterface $request, ResponseInterface $response, Service\Venta\Pie $pieService, Repository\Venta $ventaRepository, Repository\Contabilidad\Banco $bancoRepository, View $view, int $pie_id): ResponseInterface
|
||||
{
|
||||
$pie = $pieService->getById($pie_id);
|
||||
$venta = $ventaRepository->fetchByPie($pie_id);
|
||||
$bancos = $bancoRepository->fetchAll();
|
||||
usort($bancos, function(Model\Banco $a, Model\Banco $b) {
|
||||
usort($bancos, function(Model\Contabilidad\Banco $a, Model\Contabilidad\Banco $b) {
|
||||
return strcmp($a->nombre, $b->nombre);
|
||||
});
|
||||
return $view->render($response, 'ventas.pies.cuotas', compact('pie', 'venta', 'bancos'));
|
||||
|
Reference in New Issue
Block a user