FIX: Venta cargada sin formaPago

This commit is contained in:
Juan Pablo Vial
2024-03-15 13:09:58 -03:00
parent 9c335fd350
commit 7385225a2e

View File

@ -6,14 +6,15 @@ use Psr\Http\Message\ServerRequestInterface;
use Incoviba\Common\Alias\View; use Incoviba\Common\Alias\View;
use Incoviba\Common\Ideal\Controller; use Incoviba\Common\Ideal\Controller;
use Incoviba\Repository; use Incoviba\Repository;
use Incoviba\Service;
class Creditos extends Controller class Creditos extends Controller
{ {
public function show(ServerRequestInterface $request, ResponseInterface $response, View $view, public function show(ServerRequestInterface $request, ResponseInterface $response, View $view,
Repository\Venta $ventaRepository, Repository\Banco $bancoRepository, Service\Venta $ventaService, Repository\Banco $bancoRepository,
int $venta_id): ResponseInterface int $venta_id): ResponseInterface
{ {
$venta = $ventaRepository->fetchById($venta_id); $venta = $ventaService->getById($venta_id);
$bancos = $bancoRepository->fetchAll('nombre'); $bancos = $bancoRepository->fetchAll('nombre');
return $view->render($response, 'ventas.creditos', compact('venta', 'bancos')); return $view->render($response, 'ventas.creditos', compact('venta', 'bancos'));
} }