FIX: Pie cuotas vigentes
This commit is contained in:
@ -83,13 +83,14 @@ class Cuotas
|
||||
});
|
||||
return $view->render($response, 'ventas.pies.cuotas.add', compact('pie', 'venta', 'bancos'));
|
||||
}
|
||||
public function doAdd(ServerRequestInterface $request, ResponseInterface $response, Service\Venta\Pie $pieService, Repository\Venta $ventaRepository, int $pie_id): ResponseInterface
|
||||
public function doAdd(ServerRequestInterface $request, ResponseInterface $response, Service\Venta\Pie $pieService,
|
||||
Repository\Venta $ventaRepository, int $pie_id): ResponseInterface
|
||||
{
|
||||
$body = $request->getParsedBody();
|
||||
$pie = $pieService->getById($pie_id);
|
||||
$venta = $ventaRepository->fetchByPie($pie_id);
|
||||
$total = $pie->cuotas - count($pie->cuotas());
|
||||
$start = count($pie->cuotas());
|
||||
$start = count($pie->cuotas(vigentes: true));
|
||||
$total = $pie->cuotas;
|
||||
for ($i = $start; $i < $total; $i ++) {
|
||||
$data = [
|
||||
'pie' => $pie->id,
|
||||
|
Reference in New Issue
Block a user