diff --git a/incoviba/modelos/src/old/Venta/Unidad.php b/incoviba/modelos/src/old/Venta/Unidad.php index bfed43b..1079ff5 100644 --- a/incoviba/modelos/src/old/Venta/Unidad.php +++ b/incoviba/modelos/src/old/Venta/Unidad.php @@ -225,7 +225,13 @@ class Unidad extends Model public function isReservada() { if ($this->is_reservada == null) { $this->is_reservada = false; - if (!$this->isVendida() and $this->cierres() !== false) { + $cierres = $this->cierres(); + foreach ($cierres as $cierre) { + if ($cierre->isVigente()) { + $this->is_reservada = true; + } + } + if (!$this->isVendida()) { $this->is_reservada = true; } }