Dynamics 365 Business Central: About complex Due Date Calculations

Dynamics 365 Business Central

Hi, Readers.
Last week we briefly discussed how to get Start Date and End Date (Period) of the week/month/quarter/year (Includes last and next) from a given date, and today I would like to continue discussing questions about dates, complex Due Date Calculations.

Due date in Business Central is the date when something is due to be paid. You can find this field in Sales Documents, Purchase Documents, Service Documents, etc. For example, on the Sales Order page.

Due Date
Specifies when the related sales invoice must be paid.

The Due Date will also be displayed in the Customer Ledger Entries and will be displayed in red if the date has passed.

This is calculated based on the currently set Work Date.

And it is important to note that the Due Date is calculated by default based on the Document Date and Payment Terms Code, not the Posting Date.

table 36 “Sales Header”:

The calculation formula is set in Due Date Calculation field on the Payment Terms page.

Due Date Calculation
Specifies a formula that determines how to calculate the due date, for example, when you create an invoice.

As for how to use the date formula, you can refer to the instructions in MS Learn below.
Work with Calendar Dates and Times -> Use Date Formulas: The date formula can contain a maximum of 20 characters, both numbers and letters. You can use the following letters, which are abbreviations for calendar units.

LetterMeaning
CCurrent
DDay(s)
WWeek(s)
MMonth(s)
QQuarter(s)
YYear(s)

You can construct a date formula in three ways.
The following example shows how to use C, for current, and a time unit.

ExpressionMeaning
CWCurrent week
CMCurrent month

The following example shows how to use a number and a time unit. A number cannot be larger than 9999.

ExpressionMeaning
10D10 days from today
2W2 weeks from today

The following example shows how to use a time unit and a number.

ExpressionMeaning
D10The next 10th day of a month
WD4The next 4th day of a week (Thursday)

The following example shows how you can combine these three forms as needed.

ExpressionMeaning
CM+10DCurrent month + 10 days

The following example shows how you can use a minus sign to indicate a date in the past.

ExpressionMeaning
-1Y1 year ago from today

So we can easily do the following standard example.

Payment MethodDue Date CalculationDocument DateDue Date
Net 10 days10D8/5/20248/15/2024
Net 14 days14D8/5/20248/19/2024
Net 15 days15D8/5/20248/20/2024
1 Month1M8/5/20249/5/2024
Net 2 days2D8/5/20248/7/2024
Net 21 days21D8/5/20248/26/2024
Net 30 days30D8/5/20249/4/2024
Net 60 days60D8/5/202410/4/2024
Net 7 days7D8/5/20248/12/2024
Current MonthCM8/5/20248/31/2024
Cash on delivery0D8/5/20248/5/2024

Let’s look at something a little more complicated.

As far as I know, there is almost no concept of payment cut-off date for the current month in Europe and America, for example, Cut-off date: 5th every month, The payment: End of the month. Invoices before the 6th of the current month will be paid by the end of the month, and invoices after the 6th of the current month will be paid by the end of the next month, which is very common in countries such as Japan and China. Of course, this can also be done in Business Central.

8/5/2024:

8/6/2024:

More examples:

Payment MethodDue Date CalculationDocument DateDue Date
Cut-off date: 5th every month
The payment: End of the month
D6+CM8/5/2024
8/6/2024
8/31/2024
9/30/2024
Cut-off date: 5th every month
The payment: 5th of the following month
D6+CM+5D8/5/2024
8/6/2024
9/5/2024
10/5/2024
Cut-off date: 5th every month
The payment: 10th of the following month
D6+CM+10D8/5/2024
8/6/2024
9/10/2024
10/10/2024
Cut-off date: 5th every month
The payment: 15th of the following month
D6+CM+15D8/5/2024
8/6/2024
9/15/2024
10/15/2024
Cut-off date: 5th every month
The payment: 20th of the following month
D6+CM+20D8/5/2024
8/6/2024
9/20/2024
10/20/2024
Cut-off date: 5th every month
The payment: 25th of the following month
D6+CM+25D8/5/2024
8/6/2024
9/25/2024
10/25/2024
Cut-off date: 5th every month
The payment: End of the following month
D6+1M+CM8/5/2024
8/6/2024
9/30/2024
10/31/2024
Cut-off date: 5th every month
The payment: 5th of the month after next
D6+1M+CM+5D8/5/2024
8/6/2024
10/5/2024
11/5/2024
Cut-off date: 5th every month
The payment: 10th of the month after next
D6+1M+CM+10D8/5/2024
8/6/2024
10/10/2024
11/10/2024
Cut-off date: 5th every month
The payment: 15th of the month after next
D6+1M+CM+15D8/5/2024
8/6/2024
10/15/2024
11/15/2024
Cut-off date: 5th every month
The payment: 20th of the month after next
D6+1M+CM+20D8/5/2024
8/6/2024
10/20/2024
11/20/2024
Cut-off date: 5th every month
The payment: 25th of the month after next
D6+1M+CM+25D8/5/2024
8/6/2024
10/25/2024
11/25/2024
Cut-off date: 5th every month
The payment: End of the month after next
D6+2M+CM8/5/2024
8/6/2024
10/31/2024
11/30/2024
Cut-off date: 10th every month
The payment: End of the month
D11+CM8/10/2024
8/11/2024
8/31/2024
9/30/2024
Cut-off date: 15th every month
The payment: End of the month
D16+CM8/15/2024
8/16/2024
8/31/2024
9/30/2024
Cut-off date: 20th every month
The payment: End of the month
D21+CM8/20/2024
8/21/2024
8/31/2024
9/30/2024
Cut-off date: 20th every month
The payment: 20th of 3 months later
D21+2M+CM+20D8/20/2024
8/21/2024
11/20/2024
12/20/2024
Cut-off date: 25th every month
The payment: End of the month
D26+CM8/25/2024
8/26/2024
8/31/2024
9/30/2024
Cut-off date: 25th every month
The payment: 5th of the following month
D26+CM+5D8/25/2024
8/26/2024
9/5/2024
10/5/2024
Cut-off date: End of every month
The payment: End of the month
CM+CM8/31/2024
9/1/2024
8/31/2024
9/30/2024
Cut-off date: End of every month
The payment: End of the month after next
CM+2M+CM8/31/2024
9/1/2024
10/31/2024
11/30/2024

The above table covers almost all the examples, hope it can give you some help.
Give it a try!!!😁

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL