Fecha cuota

This commit is contained in:
Juan Pablo Vial
2024-03-26 16:41:33 -03:00
parent 7b8d44e8c8
commit 86406bf027
6 changed files with 65 additions and 18 deletions

View File

@ -98,7 +98,6 @@ class Ventas
return $view->render($response, 'ventas.add', compact('regiones', 'proyectos'));
}
public function cuotas(ServerRequestInterface $request, ResponseInterface $response, Service\Venta $ventaService,
Repository\Venta $ventaRepository,
View $view, int $venta_id): ResponseInterface
{
$venta = $ventaService->getById($venta_id);
@ -112,6 +111,11 @@ class Ventas
$asociadas []= $ventaService->getByPie($asociado->id);
}
}
if (count($venta->formaPago()->pie->asociados()) > 0) {
foreach ($venta->formaPago()->pie->asociados() as $asociado) {
$asociadas []= $ventaService->getByPie($asociado->id);
}
}
return $view->render($response, 'ventas.pies.cuotas', compact('venta', 'asociadas'));
}
public function escriturar(ServerRequestInterface $request, ResponseInterface $response, Service\Venta $ventaService,