Order Status - Stock Control

Good evening.



I’m trying to take a closer look at the stock with the options combinations, but I’m having a lot of trouble when it comes to the Incresing/Decreasing when changing order status.



My actual order status are:



0. Waiting

  1. Open
  2. Ordered to warehouse
  3. Processed
  4. Sent
  5. Completed

    X. Backordered

    XX. Cancelled



    I have it set this way because it is quite common to see people make fake orders or multiple orders because they failed doing somethin. So, I get some “0. Waiting” orders, and then only change one of them to “1. Open”, and they receive the first email.



    So, I’ve modified the cs-cart DB so that, when somebody makes an order and it turns to “0. Waiting”, no effect on the stock is made and the the stock will decrease when I change it to “1. Open”. With this I avoid an option combination from running out of stock with fake or multiple orders. However it doesn’t work, when changed to “1. Open”, the stock doesn’t decrease.



    However, if I turn it to cancelled it increases and then to open, it decreases. So, it only decreases when it has before increased.



    Summarising, if the initial stock is 4:



    —> Waiting (4) —> Open (4-should be 3) —> Cancelled (5) —> Open (4-now it works).



    How can I make it so that the stock decreases when I change from Waiting to Open?



    Best regards.