Offset customer and supplier balances ​

Some businesses are both your customer and your supplier. ERPNext keeps a Customer and a Supplier as separate records. Common party accounting links the two records with a Party Link, so that ERPNext offsets what they owe you against what you owe them.

How it works ​

When you submit an invoice for the secondary party of the link, ERPNext creates and submits a Journal Entry that:

  1. settles the invoice, so its outstanding amount becomes zero; and
  2. books the same amount as an unallocated advance of the primary party.

You then reconcile the advance with an open invoice of the primary party.

Example: you owe a supplier 1,200 on a Purchase Invoice. The same business buys services from you for 800. The Party Link has Supplier as the primary role and Customer as the secondary role. When you submit the 800 Sales Invoice, ERPNext posts:

Account and partyDebitCredit
Debtors, the customer800
Creditors, the supplier800

The Sales Invoice is settled. After you reconcile the 800 advance with the Purchase Invoice, you owe 400.

WARNING

The setting applies to the whole site, and there is no switch on the invoice. Every submitted invoice of a linked secondary party creates the entry. Turn it on only if your policy allows the offset.

Prerequisites ​

  • The customer and the supplier records stand for the same business.
  • The receivable and payable accounts are set up.

Turn on common party accounting ​

In Accounts Settings, on the Invoice and Billing tab, select Enable Common Party Accounting.

  1. Open the supplier and select Actions > Link with Customer. From a customer, select Actions > Link with Supplier.
  2. Select the matching record.
  3. Open the created Party Link and check the Primary Role, Primary Party, Secondary Role, and Secondary Party.

The direction matters: invoices of the secondary party trigger the entry, and the advance goes to the primary party.

Primary roleSecondary roleInvoice that triggers the entry
SupplierCustomerSales Invoice
CustomerSupplierPurchase Invoice

Reconcile the advance ​

  1. Submit the invoice of the secondary party. Check the generated Journal Entry: company, parties, accounts, and amount.
  2. Open Payment Reconciliation.
  3. Select the company, and the Party Type and Party of the primary party.
  4. Select Get Unreconciled Entries.
  5. Select the open invoice and the generated Journal Entry, then select Allocate.
  6. Check the amount and select Reconcile.

Troubleshooting ​

ProblemWhat to check
The link action is not shownEnable Common Party Accounting is off, or the party is already linked.
No Journal Entry is createdThe invoice must be for the secondary party, and the setting must be on when you submit it. A fully paid invoice creates no entry.
The advance is on the wrong sideCheck the primary and secondary roles of the Party Link.
The advance is missing in Payment ReconciliationSelect the primary party, and check the account and the date range.