← User guide

Advance Invoices — Bank Statement Matching

Matches incoming bank transactions to open advance invoices by the advance number or variable symbol, registers the payment and optionally creates the tax document.

Version19.0.1.1.0
EditionCommunity and Enterprise
LicenceAGPL-3
Requiressale_order_advance_invoice
Extended bysale_order_advance_invoice_payment_match_ee, sale_order_advance_invoice_payment_match_oca

What it is for

An advance invoice from sale_order_advance_invoice has no journal entry until it is paid, so no bank reconciliation, Odoo's or OCA's, can ever propose it for an incoming payment. This module closes that gap. It finds the advance a bank transaction pays and registers the payment exactly as the advance's own Register Payment button would. If you want, it also creates the tax document for the payment.

It is the advance-invoice sibling of the invoice matching in l10n_cssk_payment_symbols: that one matches payments to posted invoices, this one to advance invoices. The two passes are independent.

Setting it up

Accounting → Configuration → Settings, block Advance Invoices — Bank Matching:

Setting What it does
Auto-match bank statements Turns on automatic matching for the company (off by default). The manual wizard works either way.
Tax document on matched payment What happens once a transaction has paid an advance: Leave for manual creation (default), Create as draft, or Create and post. Posting also reconciles the clearing account.

The advance settings of sale_order_advance_invoice must be complete, the Advance Clearing Account above all. The bank journal needs an incoming payment method with an outstanding receipts account.

How a transaction is matched

Only incoming transactions in the company currency are considered. They are compared with the company's advance invoices that are not cancelled and still have something unpaid. If the bank transaction already knows the customer (for example from the account number), only that customer's advances are considered.

The transaction is searched in three tiers, strongest first, and the first tier that finds anything decides:

Tier What is compared When it is applied automatically
Advance number ADV00042 written in the label, the reference or the bank's transaction details the amount does not exceed what is unpaid
Variable symbol the transaction's variable symbol, compared with the digits of the advance number, ignoring leading zeros (42 = 00042) the amount does not exceed what is unpaid
Digits any run of 3 to 10 digits in the label or reference, compared the same way the amount equals what is unpaid

The variable symbol tier needs a variable symbol on the bank transaction. l10n_cssk_payment_symbols reads it out of bank statements. Without that module the tier is skipped.

If a tier finds more than one advance, nothing is matched. An advance number is unique only per issuer, so the pass never guesses. Partial payments are accepted in the first two tiers. A payment larger than what is unpaid is never applied automatically.

Ask your customers to quote the advance number, or its digits as the variable symbol: for ADV00042, the variable symbol 42 or 00042.

What a match does

  1. A customer payment for the transaction's amount and date is created in the bank journal, posted to the Advance Clearing Account, and linked to the advance. A quotation is confirmed.
  2. A bank transaction with no customer gets the advance's customer.
  3. The transaction is reconciled with the payment, so it shows as reconciled.
  4. With Create as draft or Create and post, the tax document for the payment is created as described in sale_order_advance_invoice, and posted with the second option.

Automatic and manual matching

Inside the bank reconciliation

Two add-ons run the same matching as part of a bank reconciliation's own automatic matching, before it. A transaction quoting an advance number cannot then be matched by words to an unrelated document first. Both install themselves when their engine is present, and both honour Auto-match bank statements:

Matched transactions show as reconciled in either widget.

Limitations