diff --git a/src/old/Venta/Cierre.php b/src/old/Venta/Cierre.php index 59d0c47..4c75ad9 100644 --- a/src/old/Venta/Cierre.php +++ b/src/old/Venta/Cierre.php @@ -311,9 +311,12 @@ class Cierre extends Model if ($this->promesa == null) { $propiedad = model(Propiedad::class)->where('unidad_principal', $this->unidadPrincipal()->unidad)->findOne(); if (!$propiedad) { - return false; + $this->promesa = false; } $this->promesa = model(Venta::class)->where('propiedad', $propiedad->id)->where('estado', 1)->findOne(); + if (!$this->promesa) { + $this->promesa = false; + } if ($this->promesa != null and $this->propietario == 0) { $this->propietario = $this->promesa->propietario; $this->save();