UF/m² pasa a ser un campo
This commit is contained in:
@ -9,11 +9,21 @@ class Bodega extends Producto {
|
|||||||
'tamaño',
|
'tamaño',
|
||||||
'oficina',
|
'oficina',
|
||||||
'superficie',
|
'superficie',
|
||||||
'arriendo'
|
'arriendo',
|
||||||
|
'uf_m2'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function uf_m2() {
|
/*public function uf_m2() {
|
||||||
return $this->arriendo / ($this->superficie ?? 1);
|
return $this->arriendo / ($this->superficie ?? 1);
|
||||||
|
}*/
|
||||||
|
public function getProperties(): array {
|
||||||
|
$properties = parent::getProperties();
|
||||||
|
foreach ($properties as &$property) {
|
||||||
|
if ($property->name == 'uf_m2') {
|
||||||
|
$property->labe = 'UF/m²';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $properties;
|
||||||
}
|
}
|
||||||
public function getFicha(): array {
|
public function getFicha(): array {
|
||||||
$properties = [
|
$properties = [
|
||||||
|
@ -10,12 +10,13 @@ class Oficina extends Producto {
|
|||||||
'm2',
|
'm2',
|
||||||
'baños',
|
'baños',
|
||||||
'privados',
|
'privados',
|
||||||
'gastos'
|
'gastos',
|
||||||
|
'uf_m2'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function uf_m2() {
|
/*public function uf_m2() {
|
||||||
return $this->valor / ($this->m2 ?? 1);
|
return $this->valor / ($this->m2 ?? 1);
|
||||||
}
|
}*/
|
||||||
public function privados() {
|
public function privados() {
|
||||||
if ($this->privados == 0) {
|
if ($this->privados == 0) {
|
||||||
return 'planta libre';
|
return 'planta libre';
|
||||||
@ -29,6 +30,15 @@ class Oficina extends Producto {
|
|||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
public function getProperties(): array {
|
||||||
|
$properties = parent::getProperties();
|
||||||
|
foreach ($properties as &$property) {
|
||||||
|
if ($property->name == 'uf_m2') {
|
||||||
|
$property->labe = 'UF/m²';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $properties;
|
||||||
|
}
|
||||||
public function getFicha(): array {
|
public function getFicha(): array {
|
||||||
$properties = [
|
$properties = [
|
||||||
[
|
[
|
||||||
|
Reference in New Issue
Block a user