[FIX] point_of_sale, pos_restaurant: temporary orders
pos_restaurant creates temporary orders when splitting the bill. This ensures those are never saved to persistent storage. As soon as the user clicks on the pay button, the order is not considered temporary anymore and will be saved. Closes #10767 Fixes #10350 opw-666141
This commit is contained in:
committed by
Nicolas Martinelli
parent
cf8b05a16d
commit
efe263280d
@@ -1526,7 +1526,7 @@ exports.Order = Backbone.Model.extend({
|
||||
return this;
|
||||
},
|
||||
save_to_db: function(){
|
||||
if (!this.init_locked) {
|
||||
if (!this.temporary && !this.init_locked) {
|
||||
this.pos.db.save_unpaid_order(this);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -107,6 +107,7 @@ var SplitbillScreenWidget = screens.ScreenWidget.extend({
|
||||
return;
|
||||
}
|
||||
|
||||
delete neworder.temporary;
|
||||
|
||||
if(full){
|
||||
this.gui.show_screen('payment');
|
||||
|
||||
Reference in New Issue
Block a user