FIX: Mostrar pie con cuotas vigentes
This commit is contained in:
@ -16,7 +16,7 @@
|
|||||||
<a href="{{$urls->base}}/venta/{{$venta->id}}/pie/cuotas">
|
<a href="{{$urls->base}}/venta/{{$venta->id}}/pie/cuotas">
|
||||||
<span data-tooltip="Pagadas">{{count($pie->cuotas(true))}}</span>/{{$pie->cuotas}}
|
<span data-tooltip="Pagadas">{{count($pie->cuotas(true))}}</span>/{{$pie->cuotas}}
|
||||||
</a>
|
</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">
|
<a href="{{$urls->base}}/ventas/pie/{{$pie->id}}/cuotas/add">
|
||||||
<i class="plus icon"></i>
|
<i class="plus icon"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -18,7 +18,7 @@ class Pie extends Model
|
|||||||
public function cuotas(bool $pagadas = false, bool $vigentes = false): array
|
public function cuotas(bool $pagadas = false, bool $vigentes = false): array
|
||||||
{
|
{
|
||||||
if ($this->asociado !== null) {
|
if ($this->asociado !== null) {
|
||||||
return $this->asociado->cuotas($pagadas);
|
return $this->asociado->cuotas($pagadas, $vigentes);
|
||||||
}
|
}
|
||||||
if (!$pagadas and !$vigentes) {
|
if (!$pagadas and !$vigentes) {
|
||||||
return $this->cuotasArray;
|
return $this->cuotasArray;
|
||||||
|
Reference in New Issue
Block a user