From c9fcc057929eefc36d416493e6adfb18c442dff4 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 8 Feb 2012 10:46:27 +0530 Subject: [PATCH] Allow IS POS to be set as default from customize form view --- .../doctype/receivable_voucher/receivable_voucher.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js index dcd522ba63..b8789b304f 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js +++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js @@ -21,13 +21,14 @@ cur_frm.cscript.onload = function(doc,dt,dn) { if(!doc.currency && sys_defaults.currency) set_multiple(dt,dn,{currency:sys_defaults.currency}); if(!doc.price_list_currency) set_multiple(dt, dn, {price_list_currency: doc.currency, plc_conversion_rate: 1}); - //for previously created sales invoice, set required field related to pos - if(doc.is_pos ==1) cur_frm.cscript.is_pos(doc, dt, dn); - - hide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']); + hide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory', 'customer_group']); // defined in sales_common.js cur_frm.cscript.update_item_details(doc, cdt, cdn); + + //for previously created sales invoice, set required field related to pos + if(doc.is_pos ==1) cur_frm.cscript.is_pos(doc, dt, dn); + } }