removed sync master data onload of the pos page
This commit is contained in:
parent
163e3598c7
commit
e86eaf543c
@ -15,13 +15,11 @@ frappe.pages['pos'].refresh = function(wrapper) {
|
|||||||
window.onbeforeunload = function () {
|
window.onbeforeunload = function () {
|
||||||
return wrapper.pos.beforeunload()
|
return wrapper.pos.beforeunload()
|
||||||
}
|
}
|
||||||
wrapper.pos.on_refresh_page()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||||
init: function(wrapper){
|
init: function(wrapper){
|
||||||
this.load = true;
|
|
||||||
this.page = wrapper.page;
|
this.page = wrapper.page;
|
||||||
this.wrapper = $(wrapper).find('.page-content');
|
this.wrapper = $(wrapper).find('.page-content');
|
||||||
this.set_indicator();
|
this.set_indicator();
|
||||||
@ -31,17 +29,6 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
this.si_docs = this.get_doc_from_localstorage();
|
this.si_docs = this.get_doc_from_localstorage();
|
||||||
},
|
},
|
||||||
|
|
||||||
on_refresh_page: function() {
|
|
||||||
var me = this;
|
|
||||||
if(this.load){
|
|
||||||
this.load = false;
|
|
||||||
}else if(this.connection_status){
|
|
||||||
this.onload();
|
|
||||||
}else{
|
|
||||||
this.create_new();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
beforeunload: function(e){
|
beforeunload: function(e){
|
||||||
if(this.connection_status == false && frappe.get_route()[0] == "pos"){
|
if(this.connection_status == false && frappe.get_route()[0] == "pos"){
|
||||||
e = e || window.event;
|
e = e || window.event;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user