diff --git a/common/Alias/Model.php b/common/Alias/Model.php index d604285..3987dd2 100644 --- a/common/Alias/Model.php +++ b/common/Alias/Model.php @@ -37,7 +37,7 @@ class Model extends \Model $this->doLog($user, $action, $changes); } protected function doLog($user, $action, $variables) { - App\Service\Register::log($user, $action, $variables); + \App\Service\Register::log($user, $action, $variables); } public function getId() { diff --git a/src/old/Venta/Cierre.php b/src/old/Venta/Cierre.php index 59d0c47..b2f1971 100644 --- a/src/old/Venta/Cierre.php +++ b/src/old/Venta/Cierre.php @@ -311,9 +311,14 @@ 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; + 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; $this->save();