import { Callout } from "zudoku/ui/Callout";

# Payment Application with Open Sales Documents

With 365 business Banking, incoming payments can be applied to **open sales documents** – that is, sales orders and sales invoices that have not been posted yet. The typical case is a customer prepayment that arrives before the document has been invoiced.

Because no customer ledger entry exists at that point, the payment is posted on-account to the customer and the document reference is stored as a **preliminary entry**. When the document is invoiced, the preliminary entry is applied automatically to the newly posted sales invoice.

## Setup

1. Choose **Payment Application Settings** in the search of Microsoft Dynamics 365 Business Central.
2. Enable **Enable Sales Document Matching** so that open sales documents are proposed automatically for incoming payments.
3. Enable **Show Sales Documents in "Apply Manually" page** so that open sales documents appear as proposal lines during manual application.

{/* TODO Screenshot: /assets/images/365-business-banking/payment-appl-settings-sales-documents.en-US.png — Payment Application Settings with both sales document options */}

<Callout type="tip" title="Good to know">
The two options are independent of each other. You can disable the automatic proposal and still offer sales documents for manual application – or the other way round.
</Callout>

## Automatic application

1. Retrieve the bank transactions into a **payment reconciliation journal**.
2. Choose the **Apply Automatically** action.
3. If a statement line references an open sales document, it is applied on-account to the customer of that document. The proposal is rated with the match quality **High - Sales Document**.
4. Review the result and post the reconciliation as usual.

## Manual application

1. Select the line in question and choose **Apply Manually**.
2. On the **Payment Application** page the open sales documents of the customer appear as separate proposal lines with the account type **Sales Order** or **Sales Invoice**.
3. Set the **Applied** toggle for the documents you want.
4. Close the page and post the reconciliation.

{/* TODO Screenshot: /assets/images/365-business-banking/payment-application-sales-documents.en-US.png — Payment Application page with Sales Order / Sales Invoice proposal lines */}

<Callout type="note" title="One customer per payment">
A payment reconciliation line can only settle sales documents of a **single customer**. A sales document also cannot be applied more than once within the same reconciliation.
</Callout>

## Posting and resolution

When the reconciliation is posted, the payment is posted as an **on-account payment to the customer** – the *Sales Order* and *Sales Invoice* account types serve for selection only. At the same time a **preliminary entry** is created for each applied document.

As soon as the sales document is invoiced, the open preliminary entry is applied automatically to the posted sales invoice. When a sales order was applied, this refers to the invoice posted from that order.

## Reviewing preliminary entries

Choose **Preliminary Entries** in the search to review all preliminary entries. The list shows, among other things, the origin, the document, the amount, the amount not yet settled, the match quality, and whether the entry is still open.

<Callout type="info" title="Preliminary entries are kept">
Preliminary entries are never deleted. They are closed once they have been settled in full. You can set the **Manually Verified** field to mark an entry as reviewed.
</Callout>

## See also

- [Bank Account Reconciliation](bank-reconciliation.mdx)
- [Payment Application with Open Sales Documents](features/details/payment-application-open-orders.mdx)
