FIX: no retornaba en falso
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user