[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

@@ -29,4 +29,21 @@ span, div, td, input, textarea, button, select {
width: 32px;
height: 32px;
margin: -10px auto;
}
/* pos */
.pos-item {
height: 200px;
overflow: hidden;
cursor: pointer;
padding-left: 5px !important;
padding-right: 5px !important;
}
.pos-bill {
padding: 20px 5px;
font-family: Monospace;
border: 1px solid #eee;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

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();
}
},