Hi, I’m new to the forum and trying to think through the design of my inventory management app.
If the available inventory for Product A is currently 1000 units and a customer places an order for 200 units of Product A, we will reduce Product A’s available inventory to 800 units.
But if the customer changes their original order quantity to 250 units (as they can edit pending orders), what would be the simplest way to update the available inventory quantity for changes to their original order quantity?
Do I need to create a state called ‘Original order’ that holds their original quantity of 200 units and then update Product A’s available inventory by the difference between the newly entered quantity and the ‘Original order’ state’s quantity (+50)?
I’m probably overthinking this but I couldn’t find any existing forum topics on making changes to existing order quantities other than in increments of 1 (using button clicks).
Thanks in advance for your help!