FIX: Mostrar pie con cuotas vigentes

This commit is contained in:
Juan Pablo Vial
2024-02-28 10:37:51 -03:00
parent 02dcc950f4
commit fc9788a1cd
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@
<a href="{{$urls->base}}/venta/{{$venta->id}}/pie/cuotas">
<span data-tooltip="Pagadas">{{count($pie->cuotas(true))}}</span>/{{$pie->cuotas}}
</a>
@if (count($pie->cuotas()) < $pie->cuotas)
@if (count($pie->cuotas(false, true)) < $pie->cuotas)
<a href="{{$urls->base}}/ventas/pie/{{$pie->id}}/cuotas/add">
<i class="plus icon"></i>
</a>

View File

@ -18,7 +18,7 @@ class Pie extends Model
public function cuotas(bool $pagadas = false, bool $vigentes = false): array
{
if ($this->asociado !== null) {
return $this->asociado->cuotas($pagadas);
return $this->asociado->cuotas($pagadas, $vigentes);
}
if (!$pagadas and !$vigentes) {
return $this->cuotasArray;