OpenCart 1.5.x and 2.x versions, when editing a product in the background, there is a setting to reduce the inventory (subtract) option, and if selected, will reduce the inventory quantity when processed in subsequent orders.
The mechanism for reducing inventory quantity differs depending on the OpenCart version.
In the OpenCart 2.x series version, the reduction in inventory quantity is handled by the model file of the following path.
catalog/model/checkout/order.php
If Current order status was not processing or complete but new status was processing or complete then commence completing The order
Reduce inventory If the current order status is not in the in process or completed state, but is to be replaced with a status of in process or completed
The trigger event for this action is the site background Change Order status of "processing (in process)" or "complete (completed)".
OpenCart 2.x system Commodity quantity inventory reduction logic