Open kousu opened 6 years ago
Good catch! Could you investigate further into the code? I will try to look to.
This behavior is probably fine.
It really has to do with the fact that the first side dish computed is "non-billable" and comes free with the meal.
Ex. an order of 1 Main, 1 Pudding would show up as 2 items. The pudding being "non-billable".
All other addition of side dishes (even if it's just another unit of the same side dish ordered and flagged as "non-billable" are considered EXTRAS and should be billed. As the value of "billable" can only be a TRUE or FALSE value, all extras will have a separate item entry.
Ex. an order of 1 Main, 2 Pudding would show up as 3 items. The first pudding being "non-billable" and the second being "billable"
Does this explain the behavior?
Expected Behaviour
Creating an order should create one row per item group.
Actual Behaviour
It is possible to create, e.g., multiple Puddings. They are not coalesced into a single row on the route sheets or order page.
Steps to reproduce
Create a new order; choose "2" diabetic desserts:
View the order; there are two
Strangely, setting the same value for Diabetic but also adding numbers for the other fields works correctly: