This commit is contained in:
2021-03-25 23:33:37 -03:00
parent cd1ee7d446
commit 8fe357cc95
16 changed files with 216 additions and 58 deletions

View File

@ -181,13 +181,15 @@ class Unidad extends Model
public function isVendida() {
if ($this->is_vendidad == null) {
$this->is_vendida = false;
$p = $this->propiedad();
if ($p) {
$v = $p->venta();
if ($v) {
$this->is_vendida = true;
try {
$p = $this->propiedad();
if ($p) {
$v = $p->venta();
if ($v) {
$this->is_vendida = true;
}
}
}
} catch(\Exception $e) {}
}
return $this->is_vendida;
}