Merge branch 'develop'

This commit is contained in:
2019-12-30 12:18:21 -03:00
2 changed files with 7 additions and 2 deletions

View File

@ -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()
{

View File

@ -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();