Skip to content
  • There are no suggestions because the search field is empty.

PROCESSING PURCHASE DOCUMENTS WITH RETAINAGE

How to Process Purchase Documents with Retainage

Purchase Invoice with Retainage

After creating a purchase invoice and entering the "Vendor No.", two retainage-related fields are automatically populated in the invoice header from the Vendor Card:

  • "Retainage %" — the percentage of the invoice amount to be held back as retainage.
  • "Retainage Terms Code" — the payment terms code that determines when the retainage is due to be released.

The invoice header also contains the optional field "Retainage Project No." This allows you to attribute the retainage on the invoice to a specific project, regardless of any project numbers entered on the individual invoice lines. When this field is populated, the system retrieves "Retainage %" and "Retainage Terms Code" from the Project Card rather than the Vendor Card.

The field "Retainage Due Date" represents the initial estimated date on which the retainage should be released. It is calculated automatically as the "Document Date" plus the term defined in the Payment Terms record referenced by the "Retainage Terms Code". For example, a document date of January 26th with a 3-month term produces a Retainage Due Date of April 26th. This date can be changed manually if needed.

Creating Retainage Lines

After entering the invoice lines, run the action "Create Retainage Line(s)" from the invoice ribbon. This action analyzes the regular (non-retainage) purchase lines and creates retainage lines automatically based on the tax combinations present.

The results of running this action are as follows:

  • One retainage line is created for each unique combination of Tax Liable / Tax Area Code / Tax Group Code found in the regular purchase lines.
  • The Tax LiableTax Area Code, and Tax Group Code fields on each retainage line are populated with the values from the corresponding tax combination.
  • The "Direct Unit Cost" on each retainage line is calculated as a negative percentage of the total "Line Amount Excl. Tax" for all regular purchase lines sharing that tax combination. The percentage is taken from the "Retainage %" field in the header. The amount is negative because retainage is a deduction from the amount owed to the vendor.

Example (Retainage % = 10):

  • Tax combination 1: –1 × (784.00 + 470.40) × 10% = –125.44
  • Tax combination 2: –1 × (294.00 + 548.80) × 10% = –84.28

Note — Manual Retainage Lines

You can also create retainage lines manually by entering a negative value in the "Direct Unit Cost Excl. Tax" field and setting the "Retainage" flag to Yes on that line. The "Retainage" column is only editable when "Allow Manual Retainage Lines" in "Purchases & Payables Setup" is set to Yes.

 

Posting a Purchase Invoice with Retainage Lines

When you post a purchase invoice that contains retainage lines, the system produces entries in two places: the standard Vendor Ledger and the Retainage sub-ledger.

Vendor Ledger Entries

To view the Vendor Ledger Entries for the posted invoice, open the "Vendor Card" for the relevant vendor and navigate to Vendor Ledger Entries using the action in the ribbon or the related information menu. The entry for the posted invoice will include the following retainage extension fields alongside the standard ledger fields:

  • "Gross Amount Inc. Ret." — the full invoice amount before retainage is deducted.
  • "Ret. Amount" — the total retainage amount withheld, excluding tax.
  • "Ret. Amount Incl. Tax" — the total retainage amount withheld, including tax.
  • "Remaining Ret. Amount" — the portion of retainage that has not yet been released, excluding tax.
  • "Remaining Ret. Amount Incl. Tax" — the portion of retainage that has not yet been released, including tax.
  • "Project No." and "Project Description" — populated when a Retainage Project No. was specified on the invoice.

Vendor Retainage Entries

In addition to the standard Vendor Ledger Entry, the system creates a Vendor Retainage Entry — a specialized sub-ledger record used to store and manage retainage tracking independently of the main accounts payable ledger.

To view these records, open the "Vendor Card" for the relevant vendor and choose the action "Vendor Retainage Entries". The list shows one entry per posted document that carried retainage, along with key fields such as remaining retainage amounts and open/closed status.

To drill into the tax-level detail for a specific entry, select that record and press "Detail Entries". This opens the "Detail Vendor Retainage Entry" page, which shows one record for each tax combination (Tax Liable, Tax Area Code, Tax Group Code) that was present on the original invoice. These detail records are used when applying or releasing retainage, since the amounts for each tax combination must match between the applied documents.

To update the "Retainage Due Date" on a Vendor Retainage Entry after posting, select the entry and run the action "Change Due Date". A pop-up window will appear prompting you to enter the new date. Press "OK" to confirm the change.

Excluding Purchase Lines from Retainage Calculations

When running the "Create Retainage Lines" action, the system calculates retainage across all regular purchase lines by default. You can exclude specific lines from this calculation by setting the "Exclude from Calculations" checkbox to Yes on those lines before running the action. Lines marked this way will be ignored when the retainage amounts are computed.

This field does not appear on the purchase line by default and must be added using the Personalization feature in Business Central.

If the purchase line type is G/L AccountItem, or Resource, the "Exclude from Calculations" field is automatically pre-populated based on the "Exclude from Retainage Payables Calculations" setting on the corresponding G/L Account Card, Item Card, or Resource Card. This allows certain account types or items to be systematically excluded from retainage without manual intervention on each document.

This exclusion functionality is available on the following document types:

  • Purchase Invoice
  • Purchase Order
  • Purchase Credit Memo
  • Purchase Return Order

Purchase Order with Retainage

Populating Retainage Fields from the Vendor Record

After creating a purchase order and entering the "Vendor No.", the fields "Retainage %" and "Retainage Terms Code" are automatically populated in the order header from the Vendor Card, in the same way as on a Purchase Invoice.

The order header also contains the optional field "Retainage Project No.", which works identically to the same field on the Purchase Invoice — when populated, retainage percentage and terms are sourced from the Project Card instead of the Vendor Card, and retainage is attributed to that project regardless of project numbers on the order lines.

The "Retainage Due Date" on a purchase order defines the due date that will be assigned to the retainage on the invoice generated when the order is posted with option "Invoice" or "Receive and Invoice". It is initially calculated as "Document Date" + the term from the "Retainage Terms Code".

 

Important

Because a purchase order may be invoiced in multiple stages, always review and update the "Retainage Due Date" in the order header before each posting. Each posting creates a separate invoice with its own retainage entry, and the due date at the time of posting is the one recorded on that entry.

 

Creating Retainage Lines

If a purchase order is subject to retainage, you must create retainage lines before each posting with option "Invoice" or "Receive and Invoice". Run the action "Create Retainage Line(s)" from the order ribbon.

The logic for creating retainage lines on a purchase order differs slightly from a purchase invoice because only the quantities being invoiced in the current posting are included in the calculation — not the full order quantity. The results are as follows:

  • One retainage line is created for each unique tax combination of Tax Liable / Tax Area Code / Tax Group Code found in the regular (non-retainage) purchase lines.
  • The tax fields on each retainage line are populated from the corresponding combination.
  • The "Direct Unit Cost" on each retainage line is calculated using the following formula, applied separately per tax combination:

Direct Unit Cost = –1 × SUM(Direct Unit Cost × Quantity to Invoice × (100% – Line Discount%) / 100%) × Retainage% / 100%

Example (Retainage % = 10, Line Discount % = 2):

  • Tax combination 1: –1 × (100.00 × 2 × 98% + 120.00 × 2 × 98%) × 10% = –43.12
  • Tax combination 2: –1 × (60.00 × 2 × 98% + 80.00 × 2 × 98%) × 10% = –27.44

Posting a Purchase Order with Retainage Lines

Posting a purchase order that contains retainage lines using option "Receive and Invoice" or "Invoice" produces the same results as posting a purchase invoice with retainage:

  • The Vendor Ledger Entry for the posted invoice shows values in the retainage fields: "Ret. Amount""Ret. Amount Incl. Tax""Remaining Ret. Amount", and "Remaining Ret. Amount Incl. Tax".
  • A new record is created in the Vendor Retainage Entry sub-ledger.
  • A new record is created in the Detailed Vendor Retainage Entry child sub-ledger, with one detail record per tax combination.

Creating Retainage Lines in a Purchase Order for a Second Time

When a purchase order is invoiced in multiple stages, you will need to create new retainage lines each time before posting. After the first posting, the previously created retainage lines will have been consumed. To prepare for the next posting, follow these steps:

  1. Re-open the purchase order. If the order status is Released, use the "Reopen" action to return it to an editable state.
  2. In the order header, update the "Vendor Invoice No." to match the vendor's invoice for this delivery, and review and update the "Retainage Due Date" as appropriate for this invoicing.
  3. On each purchase line, enter the "Quantity to Receive" and "Quantity to Invoice" for this posting. Only these quantities will be included in the retainage calculation.
  4. Run the action "Create Retainage Line(s)". New retainage lines will be created using the same logic as the first time, but calculated only on the quantities being invoiced in this posting.
  5. Post the order with option "Receive and Invoice" or "Invoice".

Each posting creates a separate Vendor Ledger Entry and a separate Vendor Retainage Entry, allowing retainage to be tracked and released independently for each invoice generated from the same order.

Purchase Credit Memo with Retainage

After creating a purchase credit memo and entering the "Vendor No.", the fields "Retainage %" and "Retainage Terms Code" are automatically populated in the credit memo header from the Vendor Card. The "Retainage Due Date" field is hidden by default on credit memos and is set equal to the "Document Date".

Creating Retainage Lines

The action "Create Retainage Line(s)" works the same way on a purchase credit memo as it does on a purchase invoice. After entering the credit memo lines, run the action from the ribbon. The system will create retainage lines — one per tax combination — with negative Direct Unit Costs proportional to the "Retainage %". Because a credit memo reverses a liability, the net effect of the retainage lines on a credit memo offsets the retainage that was originally withheld on the corresponding invoice.

Purchase Credit Memo Populated Using "Copy Document"

When you need to reverse a posted purchase invoice that included retainage, the recommended approach is to create a new purchase credit memo and populate it from the posted invoice using the action "Copy Document". This ensures that the retainage lines are carried over correctly.

To do this, create a new purchase credit memo, then run "Copy Document" from the ribbon. In the dialog, set "Document Type" to Posted Invoice and select the "Document No." of the invoice you wish to reverse. When the copy is complete, all lines from the posted invoice — including the original retainage lines — will appear on the credit memo.

When you post the credit memo, the system automatically applies the retainage on the credit memo to the retainage on the original invoice. Both documents will show as closed in the Vendor Retainage Entries page, with their "Remaining Ret. Amount" reduced to zero.

Creating Retainage Lines for Multiple Purchase Documents

Rather than opening individual documents one by one, you can create retainage lines across a batch of purchase documents at once. This is done from the list pages for each document type. The action "Create Retainage Lines" is available on the following pages:

  • Purchase Invoices
  • Purchase Credit Memos
  • Purchase Orders
  • Purchase Return Orders

To use this feature, navigate to the relevant list page, select the documents you wish to process using the checkboxes on the left side of the list, and then run the action "Create Retainage Lines" from the ribbon. The system will process each selected document in sequence and create retainage lines where applicable.

The routine will skip a document if any of the following conditions are true:

  • There is no invoiceable amount on the document.
  • The document already contains retainage lines — existing lines are not recalculated or duplicated.
  • The "Retainage %" is not specified in the document header.
  • The "Retainage Terms Code" is not specified in the document header (this condition applies to invoices and orders; it is not checked for credit memos).

To quickly identify which documents already have retainage lines — and the value of those lines — a "Retainage Amount" column has been added to each of these list pages. The amounts shown in this column exclude taxes. Documents showing a non-zero retainage amount already have retainage lines and will be skipped if included in a batch action.

Note

The application works for the system's "Base" (domestic) currency only. For this reason, we developed two versions available on Microsoft AppSource: