remove toggling SO and DN field in SI based on pos

This commit is contained in:
Nabin Hait 2015-05-12 15:24:55 +05:30
parent 4b9b92ba2f
commit 2d76825936

View File

@ -218,17 +218,13 @@ cur_frm.cscript.hide_fields = function(doc) {
par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received', par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received',
'advances', 'sales_partner', 'commission_rate', 'total_commission', 'advances', 'from_date', 'to_date']; 'advances', 'sales_partner', 'commission_rate', 'total_commission', 'advances', 'from_date', 'to_date'];
item_flds_normal = ['sales_order', 'delivery_note']
if(cint(doc.is_pos) == 1) { if(cint(doc.is_pos) == 1) {
hide_field(par_flds); hide_field(par_flds);
cur_frm.fields_dict['items'].grid.set_column_disp(item_flds_normal, false);
} else { } else {
for (i in par_flds) { for (i in par_flds) {
var docfield = frappe.meta.docfield_map[doc.doctype][par_flds[i]]; var docfield = frappe.meta.docfield_map[doc.doctype][par_flds[i]];
if(!docfield.hidden) unhide_field(par_flds[i]); if(!docfield.hidden) unhide_field(par_flds[i]);
} }
cur_frm.fields_dict['items'].grid.set_column_disp(item_flds_normal, true);
} }
item_flds_stock = ['serial_no', 'batch_no', 'actual_qty', 'expense_account', 'warehouse', 'expense_account', 'warehouse'] item_flds_stock = ['serial_no', 'batch_no', 'actual_qty', 'expense_account', 'warehouse', 'expense_account', 'warehouse']