Thursday, June 30, 2016
1 change
Resolved issues and error corrections
Kitchen tickets in the restaurant point of sale now print items in the same order shown on the screen. This helps kitchen staff correctly match main dishes with sides for each guest and reduces preparation mistakes.
Original PR description
When the kitchen ticket is printed, the order lines appear jumbled in
comparison to what is displayed on the PoS interface. This is an issue
since the kitchen cannot link main and side dishes for a given guest.
For example, the following order:
- Steak
- Fries
- Salmon
- Pasta
- Chicken
- Salad
On the kitchen ticket, this could appear as:
- Salmon
- Salad
- Chicken
- Steak
- Fries
- Pasta
The order actually depends on the product id.
The fix is to use the order line id instead of the product id in the
resume dictionary. Although a dictionary is an unordered collection,
most browsers keep the dictionary ordered. For example:
```
var a = {"18": "18", "1": "1", "21": "21", "14": "14"};
for(var i in a) { console.log(i) };
1
14
18
21
```
opw-680796