Ok, I've been having this crazy problem that sounds simple, but when you put it through testing. It all looks good until that one scenario destroys the whole code.
What I'm trying to do is develop and IF STATEMENT that meets this criteria:
Interval
sale1
sale2
sale3
Start Date
11-1-05
12-2-05
12-23-05
End Date
12-1-05
12-31-05
12-31-05
Price
10
20
30
count
101
0
0
Max
101
102
103
with the above value the
currentprice = 20
As you can see I have 3 different sale intervals with different starting dates.
Each interval also has a max count. Once the max has been reached the price goes up one level disregarding the starting date of the next level.
Any IDEAS appreciated.Code:This is what I have so far to measure for dates currentdate = now() IF currentdate > date1 THEN currentprice = 10 IF currentdate > date2 THEN currentprice = 20 IF currentdate > date3 THEN currentprice = 30 END IF END IF END IF This is what I have so far to measure for count/max. IF count1 < max1 THEN currentprice = 10 IF count2 < max2 THEN currentprice = 20 IF count3 < max3 THEN currentprice = 30 END IF END IF END IF They both work independently. (((I just don't know how to combine the two correctly.)))


Reply With Quote
Bookmarks