FIX: campos que cambiaron
This commit is contained in:
@ -187,8 +187,10 @@
|
||||
$(this).find('input').val(('0' + (a.getMonth() + 1)).slice(-2) + '/' + a.getFullYear())
|
||||
}
|
||||
})
|
||||
@if (isset($producto->entrega))
|
||||
var entrega = new Date('{{str_pad(implode('-', array_reverse(explode('/', $producto->entrega))), 7, '20', STR_PAD_LEFT)}}-01T01:00')
|
||||
$('.calendar').calendar('set date', entrega)
|
||||
@endif
|
||||
},
|
||||
changeSegmento: () => {
|
||||
var segmento = $('#segmento').dropdown('get value')
|
||||
|
@ -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) {
|
||||
|
@ -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 ?? '';
|
||||
|
Reference in New Issue
Block a user