0-30 days Past Due Invoice Formula Not Working, Help !

D

Dave Elliott

The code below works fine as long as the customer is 30,60, or 90 days past
due, But if they are not past 30 days, it does not work It still adds in the
30 day per centage (2%). Also here is code for 30 days , 60 days, and 90
days. In case I did something wrong with it.
0-30: IIf([DaysPastDue]<0,CCur([Order Amount]*0.02),0) 30 Day Code
0-60: IIf([DaysPastDue]<-31,CCur([Order Amount])*0.03) 60 Day Code
0-90: IIf([DaysPastDue]<-61,CCur([Order Amount])*0.04) 90 Day Code

The code below adds up the everything. What am I doing wrong ?




=IIf([DaysPastDue]<-61,CCur([Order
Amount]*1.04),IIf([DaysPastDue]<-31,CCur([Order
Amount]*1.03),IIf([DaysPastDue]<0,CCur([Order Amount]*1.02),0)))
 
V

Van T. Dinh

See comments in line.

--
HTH
Van T. Dinh
MVP (Access)



Dave Elliott said:
The code below works fine as long as the customer is 30,60, or 90 days past
due, But if they are not past 30 days, it does not work It still adds in the
30 day per centage (2%). Also here is code for 30 days , 60 days, and 90
days. In case I did something wrong with it.
0-30: IIf([DaysPastDue]<0,CCur([Order Amount]*0.02),0) 30 Day Code
0-60: IIf([DaysPastDue]<-31,CCur([Order Amount])*0.03) 60 Day Code
0-90: IIf([DaysPastDue]<-61,CCur([Order Amount])*0.04) 90 Day Code

The code below adds up the everything. What am I doing wrong ?




=IIf([DaysPastDue]<-61,CCur([Order
Amount]*1.04),IIf([DaysPastDue]<-31,CCur([Order
Amount]*1.03),IIf([DaysPastDue]<0,CCur([Order Amount]*1.02),0)))
What is your formula for DaysPastDue? Are you expecting negative
DaysPastDue?

I normally work on positive DaysPastDue (more logical with the name
DaysPastDue). In this case, the expression should be:

= IIf( [DaysPastDue] < 30, [Order Amount],
IIf( [DaysPastDue] < 60, CCur([Order Amount]*1.02),
IIf( [DaysPastDue] < 90, CCur([Order Amount]*1.03),
CCur([Order Amount]*1.04) ) ) )

If you are using 30 days OR LESS, 60 days OR LESS, 90 days OR LESS and MORE
THAN 90 days, add equal sign after each less than sign. Accounting systems
often use 30-days, 60-days and 90-days but they actually mean 4 divisions 30
days OR LESS, 60 days OR LESS, 90 days OR LESS and MORE THAN 90 days!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top