rollythadikkaran
Programmer
I have a table with following fields
date -> date of transaction
rec_iss -> to indiacate the receipt or Issue transaction.
quantity ->quantity
prodid -> product Id.
I required to generate a stock register for a specific period (from startdate to enddate) so that opening balance to be worked out till the startdate (if rec_iss = "R" then opbal = opbal + quantity else opbal = opbal - quantity) and it should be the first line in the report. Then the remaing records to be printed as shown below.
date rec_iss Quantity
1/1/05 R 10
2/1/05 R 15
4/1/05 I 5
5/1/05 R 3
5/1/05 I 2
if i ask the report from 2/1/05 to 5/1/05 then it should be as follows.
Date OpBal Receipt Issue ClBalance
2/1/05 10 15 25
4/1/05 25 5 20
5/1/05 20 03 23
5/1/05 23 2 21
I tried this in many ways..but could not succeed..So please help me...
Regards,
Rolly
date -> date of transaction
rec_iss -> to indiacate the receipt or Issue transaction.
quantity ->quantity
prodid -> product Id.
I required to generate a stock register for a specific period (from startdate to enddate) so that opening balance to be worked out till the startdate (if rec_iss = "R" then opbal = opbal + quantity else opbal = opbal - quantity) and it should be the first line in the report. Then the remaing records to be printed as shown below.
date rec_iss Quantity
1/1/05 R 10
2/1/05 R 15
4/1/05 I 5
5/1/05 R 3
5/1/05 I 2
if i ask the report from 2/1/05 to 5/1/05 then it should be as follows.
Date OpBal Receipt Issue ClBalance
2/1/05 10 15 25
4/1/05 25 5 20
5/1/05 20 03 23
5/1/05 23 2 21
I tried this in many ways..but could not succeed..So please help me...
Regards,
Rolly