Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Nobody is there who can solve my problem, or its impossible to do it.
I am restating the problem again:
I have tables:
FiscalCalendar:
Month | Quarter |
---|---|
Jan | Q4 |
Feb | Q4 |
Mar | Q4 |
Apr | Q1 |
May | Q1 |
Jun | Q1 |
Jul | Q2 |
Aug | Q2 |
Sep | Q2 |
Oct | Q3 |
Nov | Q3 |
Dec | Q3 |
StockSummary:
ProductCode | ProductName | Sizes | Month | Year | PrimarySales | SecondarySales |
---|---|---|---|---|---|---|
X050 | ProductA | S | Jul | 2012 | 143 | 56 |
X050 | ProductA | S | Aug | 2012 | 128 | 67 |
X050 | ProductA | S | Sep | 2012 | 155 | 44 |
Y100 | ProductB | M | Jul | 2012 | 232 | 55 |
Y100 | ProductB | M | Aug | 2012 | 545 | 45 |
Y100 | ProductB | M | Sep | 2012 | 897 | 42 |
Z150 | ProductC | L | Jul | 2012 | 334 | 57 |
Z150 | ProductC | L | Aug | 2012 | 122 | 87 |
Z150 | ProductC | L | Sep | 2012 | 86 | 298 |
Z150 | ProductC | L | Oct | 2012 | 97 | 15 |
OpeningSales:
ProductCode | Month | Year | OpningSales |
---|---|---|---|
X050 | Apr | 2012 | 1000 |
Y100 | Apr | 2012 | 1100 |
Z150 | Apr | 2012 | 1200 |
Problem:
1. ClosingSales = (OpeningSales+PrimarySales) - SecondarySales
2. ClosingSales (March) = OpeningSales (April)
ClosingSales(April, 2012) = OpeningSales(May, 2012)
& so on.
...........................................................................
...........................................................................
& also,
ClosingSales (Mar, 2013) = OpeningSales (April, 2013)
& so on.
................................................................................
.................................................................................
I mean it should behave like this.
Regards,
Gaurav Malhotra
Can anybody plz help me with this stock
GRN - GI = Closing
closing + GRN = next month opening
againg Opening -GI = closing for same month
I can't understand exacly, what you want. please explain it in detail plus attach a qvw file.