Sorry to intefere but,
@RainLover please tell me if I'm wrong, in your sample, based on Allen Browne's code, stock take is a manual operation. You have to manually input the desired date for the procedure to calculate stock in hand.
What if we had over 200 different products, multiple...