Merge branch 'develop'
This commit is contained in:
@ -37,7 +37,7 @@ class Model extends \Model
|
|||||||
$this->doLog($user, $action, $changes);
|
$this->doLog($user, $action, $changes);
|
||||||
}
|
}
|
||||||
protected function doLog($user, $action, $variables) {
|
protected function doLog($user, $action, $variables) {
|
||||||
App\Service\Register::log($user, $action, $variables);
|
\App\Service\Register::log($user, $action, $variables);
|
||||||
}
|
}
|
||||||
public function getId()
|
public function getId()
|
||||||
{
|
{
|
||||||
|
@ -311,9 +311,14 @@ class Cierre extends Model
|
|||||||
if ($this->promesa == null) {
|
if ($this->promesa == null) {
|
||||||
$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) {
|
||||||
return 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) {
|
||||||
|
$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;
|
||||||
$this->save();
|
$this->save();
|
||||||
|
Reference in New Issue
Block a user