Editar credito

This commit is contained in:
Juan Pablo Vial
2024-02-15 18:57:56 -03:00
parent 1621d6fe30
commit 51cabee824
10 changed files with 383 additions and 15 deletions

View File

@ -0,0 +1,20 @@
<?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;
class Creditos extends Controller
{
public function show(ServerRequestInterface $request, ResponseInterface $response, View $view,
Repository\Venta $ventaRepository, Repository\Banco $bancoRepository,
int $venta_id): ResponseInterface
{
$venta = $ventaRepository->fetchById($venta_id);
$bancos = $bancoRepository->fetchAll('nombre');
return $view->render($response, 'ventas.creditos', compact('venta', 'bancos'));
}
}