From 6c0a1a9674eeb3289e7d4a32a80de12ba1080b06 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 23 Aug 2013 19:30:44 +0530 Subject: [PATCH] [fix] [minor] temporarily disabled pos view --- accounts/doctype/sales_invoice/pos.js | 2 +- accounts/doctype/sales_invoice/sales_invoice.js | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/accounts/doctype/sales_invoice/pos.js b/accounts/doctype/sales_invoice/pos.js index 126b88745c..1bd6de1030 100644 --- a/accounts/doctype/sales_invoice/pos.js +++ b/accounts/doctype/sales_invoice/pos.js @@ -288,7 +288,7 @@ erpnext.POS = Class.extend({ ', { description: d.description, tax_amount: format_currency(d.tax_amount, me.frm.doc.price_list_currency) - })).appendTo(".tax-table tbody") + })).appendTo(".tax-table tbody"); }); // set totals diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js index 5d11ecbecb..109d9f8a07 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.js +++ b/accounts/doctype/sales_invoice/sales_invoice.js @@ -26,9 +26,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte } } - if(this.frm.doc.is_pos && this.frm.doc.docstatus===0) { - cur_frm.cscript.toggle_pos(true); - } + cur_frm.cscript.toggle_pos(true); }, refresh: function(doc, dt, dn) { @@ -94,10 +92,10 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte }); }); - if (cint(sys_defaults.fs_pos_view)===1) + if(cint(sys_defaults.fs_pos_view)===1) cur_frm.cscript.pos_btn(); - setTimeout(function() { cur_frm.$pos_btn.click(); }, 1000); + // setTimeout(function() { cur_frm.$pos_btn.click(); }, 1000); } else { // hide shown pos for submitted records @@ -125,6 +123,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte }, toggle_pos: function(show) { + if(cint(sys_defaults.fs_pos_view)===0) return; + if(!(this.frm.doc.is_pos && this.frm.doc.docstatus===0)) return; + if (!this.frm.doc.selling_price_list) msgprint(wn._("Please select Price List")) else {