I have a point of sale solution and i have also a stock module attached to the solution.
Basically the main function will process each item sold from the Point of sale screen whatever the quantity and will reduce the stock quantity on the stock layout after complete the transaction.
Also if ever i want to delete the complete sale i would like a script to re-update the stock quantity and delete the transaction.
I am unable to perform this task and it was much harder than I thought.
I have attached an example of my solution for your touch.
I would also request if it could make it simple as possible.