FIX: campos que cambiaron

This commit is contained in:
2020-06-04 11:19:30 -04:00
parent c1d4046c93
commit 6cbc4b4763
3 changed files with 14 additions and 5 deletions

View File

@ -29,7 +29,8 @@ class Bodega extends Producto {
],
[
'label' => 'UF/m²',
'name' => 'uf_m2'
'name' => 'uf_m2',
'suffix' => ' UF/m²'
]
];
array_walk($properties, function(&$item) {

View File

@ -5,6 +5,7 @@ use ProVM\KI\Producto;
class Oficina extends Producto {
protected $properties = [
'sector',
'm2',
'baños',
'privados',
@ -12,7 +13,7 @@ class Oficina extends Producto {
];
public function uf_m2() {
return $this->arriendo / ($this->m2 ?? 1);
return $this->valor / ($this->m2 ?? 1);
}
public function privados() {
if ($this->privados == 0) {
@ -57,7 +58,12 @@ class Oficina extends Producto {
];
$data []= (object) [
'label' => 'UF/m²',
'name' => 'uf_m2'
'name' => 'uf_m2',
'suffix' => ' UF/m²'
];
$data []= (object) [
'label' => 'Sector',
'name' => 'sector'
];
array_walk($data, function(&$item) {
$item->prefix = $item->prefix ?? '';