FIX: no retornaba en falso

This commit is contained in:
2019-12-30 11:38:33 -03:00
parent 0d96047b8f
commit ddca9155a2

View File

@ -312,10 +312,12 @@ class Cierre extends Model
$propiedad = model(Propiedad::class)->where('unidad_principal', $this->unidadPrincipal()->unidad)->findOne();
if (!$propiedad) {
$this->promesa = false;
return $this->promesa;
}
$this->promesa = model(Venta::class)->where('propiedad', $propiedad->id)->where('estado', 1)->findOne();
if (!$this->promesa) {
$this->promesa = false;
return $this->promesa;
}
if ($this->promesa != null and $this->propietario == 0) {
$this->propietario = $this->promesa->propietario;