#### Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Options

# payment terms / due date formula

Member Posts: 6
edited 2014-03-20
Hi, this is my first post. Let's see if it works...

One of our clients has the following payment term: due date = posting date + 45 days, where payment will be effected on the 15th of the month after the 45 days will be over.

How can I get a due date formula in NAV5.0 that will calculate the payment date instead of the due date? Is it even possible to fix a "hard" payment date?

BR

Maurice

• Options
Member Posts: 884
Check code on OnValidate trigger of "Payment Term Code" field in Sales Header(36).
• Options
Member Posts: 6
Hi Vijay,

I can't find the OnValidate trigger, could you help? Is it in the C/AL?

Thanks,

Maurice
• Options
Member Posts: 5,063
Words are confusing... :oops:

Can you list an example?

Let's say I invoice you today (6/8/10). What should be the resulting due date? And what do you mean by Payment Date? Do you mean it'll be automatically paid on a date defined?
• Options
Member Posts: 6
Example:

sales invoice date (posting date) = June 8, 2010
due date = invoice date + 45 days = June 8, 2010 + 45 days = July 23, 2010
effective payment date = next time it's the 15th of a month = August 15, 2010
In this case effective payment term is 68 days(!), but this changes of course with the posting date.

I would like to calculate automatically in NAV the effective payment date instead of the due date, as I do not want to summon my client earlier than his effective payment date (he wont pay earlier than that anyway).

Thanks.
• Options
Member Posts: 5,063
• Options
Member Posts: 7,142
didn't get a chance to fire up my date calculator

http://www.mibuso.com/dlinfo.asp?FileID=514
• Options
Member Posts: 6
Hi all,

thanks for your support. The given formula solves many dates, but not all:

sales invoice date (posting date) = June 30, 2010
due date = invoice date + 45 days = June 30, 2010 + 45 days = August 14, 2010
effective payment date = next time it's the 15th of a month = August 15, 2010

Using the date formula, I would get June 30 + 45D = August 14 + 1M = September 14 - CM = September 1 + 15D = September 16, so one entire month later. Is there a possibility to conditionally generate the right date? For example:

If due date < 15th of a month then due date = 15th of a month else due date = 15th of the next month
• Options
Member Posts: 6
That's what I thought, too bad Thanks all!
• Options
Member Posts: 380
Not so fast. You can set up an if by first deducting the no. of days. This formula should do it:
-15D+45D+CM+15D (maybe -14D+45D+CM+15D, that depends on <15th or <=15th).
Frank Dickschat
FD Consulting
• Options
Member Posts: 8
Hi,
To get "the next 15th" of a month - use D15 keyword. Or any dates term (D,M,Y,W) prior to number to get the next date.

For example:
date1 := 2013 January 14
date2 := 2013 January 16

CALCDATE(<D15>,date1) will return January 15th
CALCDATE(<D15>,date2) returns February 15th

I'm sure you can do the rest. Well, at least that's how it work in NAV2009;

What I'm looking for is the term like:
exactly 75 days if the invoice is issued before 15th of any month, and 60 days if it's issued after 15th of a month..

Any ideas how to construct that?
Any help is appreciated. Thanks.
• Options
Member Posts: 89
Sorry to rescue this old post.

I'm also looking for something similar, It would be great to do this withoud code modifications.

My requirement is:

- If the invoice date day is between the 1st and the 15th, Due date is next month's 10th day.
- If the invoice date day is between the 16th and the 31st, Due date is next month's 20th day.

Any ideas?
• Options
Member Posts: 639
Not without coding...