[pos] pos.js included in all selling & purchase cycle
diff --git a/public/js/transaction.js b/public/js/transaction.js
index 58dbc2d..a38e3a7 100644
--- a/public/js/transaction.js
+++ b/public/js/transaction.js
@@ -88,7 +88,11 @@
},
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 @@
// refresh
if(this.pos_active)
this.frm.pos.refresh();
+ this.frm.refresh();
}
},