Match Invoices Action

The Match Invoices action automatically finds and links invoices that meet specific criteria, distributing the payment amount across them.

This works similarly to the process used in Parse Bank Statement.

Key Rules and Settings

  • Matching rules are defined in Matching Settings.

  • Only invoices with the same currency as the payment can be matched automatically (the ‘Allow Invoices with other Currencies’ setting does not apply here).

  • The matching priority is controlled by the ‘Automatic Payment-Invoice Matching Mode’ in the Accounting Module from the admin panel.

Matching Modes

The ‘Automatic Payment-Invoice Matching Mode’ setting determines how the system selects invoices during auto-matching. Two configuration options are available:

  1. Invoice with Closest Amount
    Matches invoices whose original amount (not the debt) is closest to the payment.

  2. Earliest Unpaid Invoice
    The system prioritizes the oldest unpaid invoice first.

Matching Process

Step-by-Step Logic

  1. Counterparty Filtering Check

    • If Filter by Counterparty is enabled but the payment's Counterparty field is empty, auto-matching is skipped.

  2. Extended Counterparty List

    • If Filter by Counterparty is enabled, the system uses the counterparty’s client list (see: Contact Settings action → Invoices tab → Clients field).

  3. Invoice Search Order (Based on Counterparty)
    Invoices are searched in the following order:

    • First: invoices where the Payer is the same as the payment's Counterparty.

    • Next: invoices where clients of the payment’s counterparty are listed as Clients.

    • Last: invoices where the Counterparty itself is listed as Client.

  4. Matching Invoices Until Payment Is Fully Allocated
    Matching continues until the full payment amount is distributed (balance = 0).

  5. Invoice Search Criteria

    • Only invoices with the opposite direction to the payment are considered (‘Allow operations with same direction’ setting applies only to manual filters).

      • Incoming payment → match with outgoing invoices.

      • Outgoing payment → match with incoming invoices.

    • Account Role Rules

      • Incoming invoices:
        Account Holder = Payer or Client.
        Counterparty = Issued By.

      • Outgoing invoices:
        Account Holder = Issued By.
        Counterparty = Payer or Client.

    • If no counterparty is defined (and counterparty filtering is off), only the Account Holder is used for matching.

    • Only invoices with status Unpaid or Partly Paid are matched.

      • If ‘Allow Invoices in Draft Status’ is enabled, Draft invoices are also included.

    • If ‘Filter by Invoice Debt’ setting is enabled, invoices are matched only if their debt falls within the acceptable range:

    InvoiceDebt∈[PaymentAmt×(1−Deviation100);PaymentAmt×(1+Deviation100)]Invoice Debt \in [PaymentAmt × (1 - \frac{Deviation}{100}); PaymentAmt × (1 + \frac{Deviation}{100})]

    • From all valid invoices, the one best fitting the selected priority (closest amount or earliest date) is chosen first.