When someone orders an item in my shop, the status is changed to "Payment pending". After we got the money, the status is changed to "Payment received". After the item is sent, the status is changed to "Sent".
My question is: The quantitiy of an item should decrease by one as soon as the order is submitted. And it should stay afterwards.
Example:
Someone orders Item A. The status is "Payment pending", the quantity of iteam A decreases from 10 to 9. After the payment is received, the status is changed to "Payment received", the quantity has to stay at 9. After the item is sent, the status is changed to "Sent", the quantity has to stay at 9.
How do I do that?