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.
Letter | Meaning |
---|---|
C | Current |
D | Day(s) |
W | Week(s) |
M | Month(s) |
Q | Quarter(s) |
Y | Year(s) |
You can construct a date formula in three ways.
The following example shows how to use C, for current, and a time unit.
Expression | Meaning |
---|---|
CW | Current week |
CM | Current month |
The following example shows how to use a number and a time unit. A number cannot be larger than 9999.
Expression | Meaning |
---|---|
10D | 10 days from today |
2W | 2 weeks from today |
The following example shows how to use a time unit and a number.
Expression | Meaning |
---|---|
D10 | The next 10th day of a month |
WD4 | The next 4th day of a week (Thursday) |
The following example shows how you can combine these three forms as needed.
Expression | Meaning |
---|---|
CM+10D | Current month + 10 days |
The following example shows how you can use a minus sign to indicate a date in the past.
Expression | Meaning |
---|---|
-1Y | 1 year ago from today |
So we can easily do the following standard example.
Payment Method | Due Date Calculation | Document Date | Due Date |
Net 10 days | 10D | 8/5/2024 | 8/15/2024 |
Net 14 days | 14D | 8/5/2024 | 8/19/2024 |
Net 15 days | 15D | 8/5/2024 | 8/20/2024 |
1 Month | 1M | 8/5/2024 | 9/5/2024 |
Net 2 days | 2D | 8/5/2024 | 8/7/2024 |
Net 21 days | 21D | 8/5/2024 | 8/26/2024 |
Net 30 days | 30D | 8/5/2024 | 9/4/2024 |
Net 60 days | 60D | 8/5/2024 | 10/4/2024 |
Net 7 days | 7D | 8/5/2024 | 8/12/2024 |
Current Month | CM | 8/5/2024 | 8/31/2024 |
Cash on delivery | 0D | 8/5/2024 | 8/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 Method | Due Date Calculation | Document Date | Due Date |
Cut-off date: 5th every month The payment: End of the month | D6+CM | 8/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+5D | 8/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+10D | 8/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+15D | 8/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+20D | 8/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+25D | 8/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+CM | 8/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+5D | 8/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+10D | 8/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+15D | 8/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+20D | 8/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+25D | 8/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+CM | 8/5/2024 8/6/2024 | 10/31/2024 11/30/2024 |
Cut-off date: 10th every month The payment: End of the month | D11+CM | 8/10/2024 8/11/2024 | 8/31/2024 9/30/2024 |
Cut-off date: 15th every month The payment: End of the month | D16+CM | 8/15/2024 8/16/2024 | 8/31/2024 9/30/2024 |
Cut-off date: 20th every month The payment: End of the month | D21+CM | 8/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+20D | 8/20/2024 8/21/2024 | 11/20/2024 12/20/2024 |
Cut-off date: 25th every month The payment: End of the month | D26+CM | 8/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+5D | 8/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+CM | 8/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+CM | 8/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
コメント