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