FIX: Cuando no hay cierres asociados
This commit is contained in:
@ -226,11 +226,13 @@ class Unidad extends Model
|
||||
if ($this->is_reservada == null) {
|
||||
$this->is_reservada = false;
|
||||
$cierres = $this->cierres();
|
||||
if ($cierres) {
|
||||
foreach ($cierres as $cierre) {
|
||||
if ($cierre->isVigente()) {
|
||||
$this->is_reservada = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$this->isVendida()) {
|
||||
$this->is_reservada = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user