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();
|
$propiedad = model(Propiedad::class)->where('unidad_principal', $this->unidadPrincipal()->unidad)->findOne();
|
||||||
if (!$propiedad) {
|
if (!$propiedad) {
|
||||||
$this->promesa = false;
|
$this->promesa = false;
|
||||||
|
return $this->promesa;
|
||||||
}
|
}
|
||||||
$this->promesa = model(Venta::class)->where('propiedad', $propiedad->id)->where('estado', 1)->findOne();
|
$this->promesa = model(Venta::class)->where('propiedad', $propiedad->id)->where('estado', 1)->findOne();
|
||||||
if (!$this->promesa) {
|
if (!$this->promesa) {
|
||||||
$this->promesa = false;
|
$this->promesa = false;
|
||||||
|
return $this->promesa;
|
||||||
}
|
}
|
||||||
if ($this->promesa != null and $this->propietario == 0) {
|
if ($this->promesa != null and $this->propietario == 0) {
|
||||||
$this->propietario = $this->promesa->propietario;
|
$this->propietario = $this->promesa->propietario;
|
||||||
|
Reference in New Issue
Block a user