Cuotas con detalle de UF y de Pies asociados
This commit is contained in:
@ -98,10 +98,21 @@ 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);
|
||||
return $view->render($response, 'ventas.pies.cuotas', compact('venta'));
|
||||
$asociadas = [];
|
||||
if (isset($venta->formaPago()->pie->asociado)) {
|
||||
$asociadas []= $ventaService->getByPie($venta->formaPago()->pie->asociado->id);
|
||||
foreach ($venta->formaPago()->pie->asociado->asociados() as $asociado) {
|
||||
if ($venta->formaPago()->pie->id === $asociado->id) {
|
||||
continue;
|
||||
}
|
||||
$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,
|
||||
Repository\Contabilidad\Banco $bancoRepository, View $view, int $venta_id): ResponseInterface
|
||||
|
Reference in New Issue
Block a user