5009

Grace Days on Payment Terms

event-subscriber
payment-terms
due-date
posting
table-extension

Grace Days on Payment Terms

Finance has negotiated goodwill "grace days" with some customers: the invoice officially falls due per the agreed payment terms, but collections will not chase it until a few extra days have passed. They want receivables to reflect that reality — the customer ledger should carry the extended due date — while every document keeps showing the official one. The due date rule lives in base application code you cannot modify; extend it from the outside.

Requirements

  1. Create a table extension for the Payment Terms table with a field named "Grace Days" of type Integer.
  2. When a sales invoice is posted and its payment terms carry "Grace Days" greater than zero, the resulting Cust. Ledger Entry must get a "Due Date" exactly that many calendar days after the standard due date. The standard due date is what Business Central computes on its own: the document date plus the payment terms' "Due Date Calculation" — including when that calculation is empty, in which case the standard due date is the document date itself.
The rest of the statement and 3 hints Unlock with Pro
ALBusiness Central 28.5
Pro
Pro problem

Solve it with Pro

You’re reading the opening of the statement. Pro unlocks the whole problem:

  • The full statement
  • Starter code in the browser editor
  • 5 grading tests, run on Business Central 28.5
  • 3 hints
  • The reference solution

Pro also opens all 92 Pro problems and lifts the daily limits on compile checks and submissions.

$10 / month
or $100 / year
Upgrade
This problem is part of Pro
Pro unlocks the full statement, tests, hints and solution. The code editor works on a computer.
Upgrade