Cuando existen cuotas asociadas a algun pie distintas al pie asociado

This commit is contained in:
Juan Pablo Vial
2024-10-01 17:35:23 -03:00
parent 37015f7e95
commit b9c2972fe9

View File

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