openfoodnetwork
openfoodnetwork copied to clipboard
[BO Orders] Decreasing the quantity of an item does not update enterprise fees (per item)
Description
This was observed when testing #12116 .
When creating or editing an order in the back office, the enterprise fees are not updated if the quantity of a line item is decreased. The user needs to click 'Update and recalculate fees' to do so. The enterprise fee is applied if the quantity of a line item is increased. That makes me think that this is a bug and not a feature.
Expected Behavior
When decreasing the quantity of a line item, the enterprise fee should be updated accordingly.
Actual Behaviour
When decreasing the quantity of a line item, the enterprise fee is not updated.
Steps to Reproduce
- Set up an order cycle with an enterprise fee per line item (the behavior can't be seen for fees per order).
- Create a back office order for this order cycle.
- Decrease the quantity of a line item and look at the fees section: it's not updated, the order total is incorrect.
- Click 'Update and recalculate fees': the fee value is now updated.
- Increase the quantity of a line item and check again: fees are updated immediately.
Animated Gif/Screenshot
Below you can see an example where the quantity was reduced from 3 to 2. There is a fee of 5 $ per item applied.
Workaround
Click 'Update and recalculate fees'.
Severity
bug-s4: it's annoying, but you can use it
Your Environment
- Version used:
- Browser name and version:
- Operating System and version (desktop or mobile):
Possible Fix
Hello @drummer83 ,
May I work on this issue ?
Sure, thanks again @cyrillefr !