Table Opening
Date Product Qty
01-Oct-2015 A 100
01-Oct-2015 B 120
01-Oct-2015 C 130
01-Oct-2015 D 160
Table Arrival
Date Product Qty
01-Oct-2015 A 10
01-Oct-2015 B 12
01-Oct-2015 C 14
01-Oct-2015 D 16
02-Oct-2015 A 18
02-Oct-2015 B 20
03-Oct-2015 C 22
03-Oct-2015 D 24
Table Issue
Date Product Qty
01-Oct-2015 A 02
01-Oct-2015 B 04
01-Oct-2015 C 06
01-Oct-2015 D 08
01-Oct-2015 A 10
02-Oct-2015 B 12
03-Oct-2015 C 14
03-Oct-2015 D 16
What i need is opening+arrival-issue qty is closing qty
I need closing qty break up for each day?
Last Day closing is next day opening!
Here i will pass from date and to date Say from 01-Oct-2015 to 03-Oct-2015
Output:-
Date Product OpeningQty ArrivedQty IssuedQty ClosingQty
01-Oct-2015 A 100 10 12 098
01-Oct-2015 B 120 12 04 128
01-Oct-2015 C 140 14 06 148
01-Oct-2015 D 160 16 08 168
02-Oct-2015 A 098 18 00 116
02-O ...
Go to the complete details ...