[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:
Joren Van Onder
2016-02-04 11:50:21 +01:00
committed by Nicolas Martinelli
parent cf8b05a16d
commit efe263280d
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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');