Slim API
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user