The quantity_on_hand field (inventory table) must be automatic deducted.
The quantity_on_hand(Inventory table) value must be automatic deducted after the item of one order was shipped.
For example, the user created an order and select the items (inventories) to be distributed.
once the user "Shipped the items"
the status change
and the quantity_on_hand of the items should be 450 and 150, and not 500 and 200 grams.
The constraints for the auto-deduction are:
- Inventory.quantity_on_hand_unit_code = Inventory_maintenance_policy.Distribution_unit_code
- Inventory.form_type_code = Inventory_maintenance_policy.distribution_default_form_code
- Inventory.is_auto_deducted = Inventory_maintenance_policy.is_auto_deducted =
Yes