[FIX] pos_restaurant: transferring order to a table already containing order
Before this, transferring an order to a table which already contains an order triggered the change on the order already on the table, Not the newly transferred order. This fixes that by instead explicitly calling save_to_db() on the transferred order instead.
This commit is contained in:
committed by
Joren Van Onder
parent
17c257211c
commit
dad1e37825
@@ -784,13 +784,12 @@ models.PosModel = models.PosModel.extend({
|
||||
this.set_order(null);
|
||||
} else if (this.order_to_transfer_to_different_table) {
|
||||
this.order_to_transfer_to_different_table.table = table;
|
||||
this.order_to_transfer_to_different_table.save_to_db();
|
||||
this.order_to_transfer_to_different_table = null;
|
||||
|
||||
// set this table
|
||||
this.set_table(table);
|
||||
|
||||
// trigger a change so the table change gets stored in localStorage
|
||||
this.get_order().trigger('change', this.get_order());
|
||||
} else {
|
||||
this.table = table;
|
||||
var orders = this.get_order_list();
|
||||
|
||||
Reference in New Issue
Block a user