openfoodnetwork icon indicating copy to clipboard operation
openfoodnetwork copied to clipboard

[BO Orders] Decreasing the quantity of an item does not update enterprise fees (per item)

Open drummer83 opened this issue 1 year ago • 2 comments

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

  1. Set up an order cycle with an enterprise fee per line item (the behavior can't be seen for fees per order).
  2. Create a back office order for this order cycle.
  3. Decrease the quantity of a line item and look at the fees section: it's not updated, the order total is incorrect.
  4. Click 'Update and recalculate fees': the fee value is now updated.
  5. 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. image

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

drummer83 avatar Feb 14 '24 23:02 drummer83

Hello @drummer83 ,

May I work on this issue ?

cyrillefr avatar Mar 01 '24 10:03 cyrillefr

Sure, thanks again @cyrillefr !

sigmundpetersen avatar Mar 01 '24 11:03 sigmundpetersen