Please anyone who has a sample code for this need:
I got two related tables: inventory and inventory_movement.
A form of 'inventory_movement' is for the user to enter items to be either 'Out for use', 'Returned' and 'Non-returnable'.
I need to decrease the item 'quantity' from the main table 'inventory' once the table form of 'inventory_movement' is submitted only for 'Out for use' and 'Non-returnable' otherwise to increase.
I've tried with some sample PHP codes but still not working. Please if you could help me to solve the above to update 'quantity' of 'inventory' table using onAfterprocess.
Thanks a lot in advance.
I got two related tables: inventory and inventory_movement.
A form of 'inventory_movement' is for the user to enter items to be either 'Out for use', 'Returned' and 'Non-returnable'.
I need to decrease the item 'quantity' from the main table 'inventory' once the table form of 'inventory_movement' is submitted only for 'Out for use' and 'Non-returnable' otherwise to increase.
I've tried with some sample PHP codes but still not working. Please if you could help me to solve the above to update 'quantity' of 'inventory' table using onAfterprocess.
Thanks a lot in advance.