[pos] pos.js included in all selling & purchase cycle

This commit is contained in:
Akhilesh Darjee
2013-09-18 18:35:12 +05:30
parent a550e7443f
commit f83576bf9c
12 changed files with 78 additions and 50 deletions

View File

@@ -88,7 +88,11 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
},
toggle_pos: function(show) {
if (!this.frm.doc.selling_price_list)
// Check whether it is Selling or Buying cycle
var price_list = wn.meta.has_field(cur_frm.doc.doctype, "selling_price_list") ?
this.frm.doc.selling_price_list : this.frm.doc.buying_price_list;
if (!price_list)
msgprint(wn._("Please select Price List"))
else {
if((show===true && this.pos_active) || (show===false && !this.pos_active)) return;
@@ -106,6 +110,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
// refresh
if(this.pos_active)
this.frm.pos.refresh();
this.frm.refresh();
}
},