forked from elmau/empresa-libre
Hide or show controls for warehouses
This commit is contained in:
parent
f2af10c2df
commit
896be35e3b
|
@ -517,13 +517,23 @@ function get_config_values(opt){
|
||||||
$$('lst_pac').setValue(values[key])
|
$$('lst_pac').setValue(values[key])
|
||||||
}else{
|
}else{
|
||||||
$$(key).setValue(values[key])
|
$$(key).setValue(values[key])
|
||||||
if(key=='chk_config_leyendas_fiscales'){
|
const chk_obj = [
|
||||||
|
'chk_config_leyendas_fiscales',
|
||||||
|
'chk_llevar_inventario',
|
||||||
|
'chk_multi_stock',
|
||||||
|
]
|
||||||
|
if(chk_obj.indexOf(key) > 0){
|
||||||
admin_config_other_options(key)
|
admin_config_other_options(key)
|
||||||
}else if(key=='chk_multi_stock'){
|
|
||||||
if($$(key).getValue()){
|
|
||||||
$$('chk_multi_stock').enable()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
//~ if(key=='chk_config_leyendas_fiscales'){
|
||||||
|
//~ admin_config_other_options(key)
|
||||||
|
//~ }else if(key=='chk_llevar_inventario'){
|
||||||
|
//~ admin_config_other_options(key)
|
||||||
|
//~ }else if(key=='chk_multi_stock'){
|
||||||
|
//~ if($$(key).getValue()){
|
||||||
|
//~ $$('chk_multi_stock').enable()
|
||||||
|
//~ }
|
||||||
|
//~ }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -2494,7 +2504,6 @@ function opt_make_pdf_from_on_change(new_value, old_value){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2514,6 +2523,23 @@ function admin_config_other_options(id){
|
||||||
$$('chk_multi_stock').disable()
|
$$('chk_multi_stock').disable()
|
||||||
disable_config_option('chk_multi_stock')
|
disable_config_option('chk_multi_stock')
|
||||||
}
|
}
|
||||||
|
}else if(id=='chk_multi_stock'){
|
||||||
|
set_visible_wharehouse(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function set_visible_wharehouse(value){
|
||||||
|
if(value){
|
||||||
|
//~ $$('template_add_wharehouse').show()
|
||||||
|
$$('txt_add_wharehouse').show()
|
||||||
|
$$('cmd_add_wharehouse').show()
|
||||||
|
$$('grid_warehouse').show()
|
||||||
|
}else{
|
||||||
|
//~ $$('template_add_wharehouse').hide()
|
||||||
|
$$('txt_add_wharehouse').hide()
|
||||||
|
$$('cmd_add_wharehouse').hide()
|
||||||
|
$$('grid_warehouse').hide()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -800,7 +800,7 @@ var options_admin_products = [
|
||||||
{cols: [{maxWidth: 30}, {view: 'checkbox', id: 'chk_multi_stock', labelWidth: 15,
|
{cols: [{maxWidth: 30}, {view: 'checkbox', id: 'chk_multi_stock', labelWidth: 15,
|
||||||
labelRight: 'Multialmacen', disabled: true}]},
|
labelRight: 'Multialmacen', disabled: true}]},
|
||||||
{cols: [{maxWidth: 30}, {rows: [
|
{cols: [{maxWidth: 30}, {rows: [
|
||||||
{template: 'Agregar Almacen', type: 'section'},
|
{template: 'Agregar Almacen', type: 'section', id: 'template_add_wharehouse'},
|
||||||
{cols: [
|
{cols: [
|
||||||
{view: 'text', id: 'txt_add_wharehouse', label: 'Nombre: ',
|
{view: 'text', id: 'txt_add_wharehouse', label: 'Nombre: ',
|
||||||
labelPosition: 'left', required: true},
|
labelPosition: 'left', required: true},
|
||||||
|
|
Loading…
Reference in New Issue