mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
[pos] pos.js included in all selling & purchase cycle
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user