Leveraging ERPNext's Three-Way-Check in Sales and Purchasing Cycles

ERPNext offers a largely consistent pattern of cross-checking data in the sales and purchasing cycles. To use the purchasing cycle as an example:

  • A Purchase Order is a record of the items you intend to purchase from your supplier (what you've asked for). If an advance is required, this document serves as a reference for that but otherwise it is not connected to any Stock Ledger entries or General Ledger entries.
  • A Purchase Receipt is a record of the items the supplier has delivered. It serves as the source document for the Stock Ledger entries that place these items into inventory and for the General Ledger entries that reflect the value of those items.
  • A Purchase Invoice is a record of the items (prices/rates plus associated tax and charges) that make up the payable to the Supplier.
  • Payment Entries are outside of the three-way-check since they do not reconcile to any document other than the Purchase Invoice and are unaware of any level of pricing, quantity or itemization. For inventoriable goods, they serve as an accounting summarization of the cost accounting.

What's ordered

What's received

What's billed

Purchase Order

Purchase Receipt

Purchase Invoice

Each of these documents has alternative workflows that can make them more flexible and/or more complex, but it's best to start by understanding their core responsibilities and how they relate to each other.

Simple Purchasing Cycle Example

In an example of a business-to-business transaction, an example company is going to purchase fruit from a wholesale fruit supplier in another part of the country. They place a Purchase Order (PO) for five boxes. These items arrive, exactly as ordered at their distribution facility and are formally received and placed into inventory at that time with a Purchase Receipt (PR). A paper invoice was included in shipment and the receiving team put it in the inbox of their bookkeeper, who entered it the next day as a Purchase Invoice (PI). The invoice has no discrepancies with the shipment and the company has Net 30 payment terms with this specific supplier. A Payment Entry (PE) will be created when they print the check and mail it to this supplier. In this series of events, there is no deviation from the simplest form of the purchasing cycle provided by ERPNext.

$100/ 5 Boxes

$100/ 5 Boxes

Purchase Order

Purchase Invoice

Purchase Receipt

Purchase Receipt

AccountStock LedgerDebitCredit
Inventory on Hand+5 @ $20.00$100.00
Inventory Received But Not Billed$100.00

Purchase Invoice

AccountStock LedgerDebitCredit
Inventory Received But Not Billed$100.00
Accounts Payable$100.00

Mismatches between Purchase Order, Purchase Receipt and Purchase Invoice

In a similar transaction the next week, the company sent a PO to a supplier for five boxes at the same price as the previous week. When the items arrive a few days later, there are four boxes (of the same dimensions and weight as the previous week), which the company immediately receives. The invoice included indicates a new price of $21/box and a handwritten note that they had a limited supply and could only sell four boxes. In the wholesale fruit industry this isn't an unusual occurrence and ERPNext's tools automatically adjust for this new value. (For more details on how this change in price is passed on to the company's customers, see the chapter on Pricing Rules.) The Purchase Order is closed to record that they don't expect to receive any more items against it. The payable and remittance are created the same as the previous week but with the updated price.

This example shows the capability of ERPNext's three-way-check to appropriately handle mismatches. "What was asked for" does not match "what was received", nor "how much was invoiced". Forcing these documents to match when they disagree with the facts, is not desirable. Neither is changing the Purchase Order to reflect the price and quantity received as it evaporates the record of how much the company asked for and the price they expected to pay. It also isn't discoverable when the companys wants to do future analysis on a supplier's ability to deliver according to their requirements.

$100/ 5 Boxes

$84/ 4 Boxes

Purchase Order

Purchase Receipt

Purchase Invoice

Purchase Receipt

AccountStock LedgerDebitCredit
Inventory on Hand+4 @ $21.00$84.00
Inventory Received But Not Billed$84.00

Purchase Invoice

AccountStock LedgerDebitCredit
Inventory Received But Not Billed$84.00
Accounts Payable$84.00

Adjusted price

The subsequent week the company again places an order for five boxes to the supplier at $20/box, which matches the supplier's latest published price list. Five boxes arrive a few days later but it is clear that the fruit inside one box has been frozen during transport and is ruined. The other four boxes look to have saleable fruit but are suspect based on the proximity to the ruined box. The manager calls the supplier to explain the situation. Their pricing agreement with the supplier reflects the landed price of the product so she is able to negotiate a price of $18/box for the four boxes and a credit for $28 (one box at $20 plus the difference from the newly negotiated rate). The company receives four boxes at $18/box. They close the Purchase Order to record that they don't expect to receive any more items against it. The Purchase Invoice is entered as billed, along with a Credit Note for the $28 the supplier has agreed to apply to the next order.

$100/ 5 Boxes

$72/ 4 Boxes

$100/ 5 Boxes

$28 Cr

Purchase Order

Purchase Receipt

Purchase Invoice

Payment Entry

Credit Note

Purchase Receipt

AccountStock LedgerDebitCredit
Inventory on Hand+4 @ $18.00$72.00
Inventory Received But Not Billed$72.00

Purchase Invoice

AccountStock LedgerDebitCredit
Inventory Received But Not Billed$72.00
Accounts Payable$72.00

Credit Note (via Purchase Invoice)

AccountStock LedgerDebitCredit
Accounts Payable$28.00
Purchase Returns$28.00

Many-to-many Matching

During the hectic week before Christmas, the company's purchasing team placed three separate Purchase Orders for Cloudberries to meet anticipated holiday demand:

  • Monday: PO-00001 for 100 boxes at $20/box
  • Tuesday: PO-00002 for 50 boxes at $20/box
  • Wednesday: PO-00003 for 75 boxes at $20/box

It is appropriate that these Purchase Orders are not consolidated into a single Purchase Order - at the time they were executed, each of them correctly represented the facts of business and the demand for Cloudberries that the team anticipated. ERPNext allows for linking between Purchase Orders, Purchase Receipts and Purchase Invoices to the same Supplier - this link happens at the "Item" level (Purchase Order Item, Purchase Receipt Item, Purchase Invoice Item).

The first shipment arrived Wednesday containing all 100 boxes from PO-00001 plus half of PO-00002's order (25 boxes). On Friday, the company received another shipment with the remaining 25 boxes from PO-00002 and all 75 boxes from PO-00003. With that supplier's payment terms approaching, the company processed a single Purchase Invoice for both receipts.

100 boxes

25 boxes

25 boxes

125 boxes total

75 boxes

100 boxes total

PO-00001

Purchase Receipt 1

PO-00002

Purchase Receipt 2

Purchase Invoice

PO-00003

Purchase Receipt 1 (Wednesday)

AccountStock LedgerDebitCredit
Inventory on Hand+125 @ $20.00$2,500.00
Inventory Received But Not Billed$2,500.00

Purchase Receipt 2 (Friday)

AccountStock LedgerDebitCredit
Inventory on Hand+100 @ $20.00$2,000.00
Inventory Received But Not Billed$2,000.00

Purchase Invoice

AccountStock LedgerDebitCredit
Inventory Received But Not Billed$4,500.00
Accounts Payable$4,500.00

The three-way-check provided by ERPNext helps to keep a record of the differences between the Purchase Order, Purchase Receipt and Purchase Invoice. It is tempting to modify the PO in two cases where the company did not receive exactly what they asked for, but this allows to understand how often and what impact this supplier's business practices have on the company's, as well as establish a baseline for what is "normal", at least among the company's suppliers.

Three Way Check in Request for Quotation and Supplier Quotation

The company's pallet jack is on its last legs and they've decide to upgrade to an new electric model. There are three nearby suppliers that offer this kind of equipment and carry brands that the company is comfortable servicing themselves. They have created a new item in ERPNext that is a placeholder for this asset and will add additional details after they've made the purchase.

They create a Request for Quotation with this placeholder item and list the three suppliers. One supplier doesn't respond. The second supplier sends back a quote listing two electric pallet jacks along with a specification sheet for each. The one listed for $3,800 (model 4500) has a 50°F operating temperature, which won't work well in a warehouse with a lof of refrigerated space. The second pallet jack (model number 8300) is listed for $5,100 and seems like a better fit based on the included specifications. They enter this information in the Supplier Quotation.

The third supplier sends back a quote for the same pallet jack (model number 8300). Their price is $6,000 and includes a warranty. The company asks them to re-quote it without a warranty. They respond with a price of $5,500. Based on price, they decide to go with the Supplier 2. They negotiate a price of $5,000 with free delivery and issue a PO to reflect that. Both of these responses are captured in a Supplier Quotation.

Electric pallet jack

Electric pallet jack

Electric pallet jack

Model 4500 / $3800

Model 8300 / $5100

Model 8300 + Warranty / $6000

Model 8300 / $5500

Model 8300 + delivery / $5000

Request for Quotation

Supplier 1

Supplier 2

Supplier 3

Supplier Quotation

Supplier Quotation

Supplier Quotation

Purchase Order

In this process the company leverages a three-way-check between what they would like quoted (RFQ), what they are being quoted (Supplier Quotation) and what they are ordering (PO). Each change in the story is documented with another document.

Sales Cycle Examples

Just as ERPNext provides a three-way-check in purchasing between Purchase Order, Purchase Receipt, and Purchase Invoice, it offers a parallel structure in sales between Sales Order, Delivery Note, and Sales Invoice. The following scenario shows how this works in the Chelsea Fruit Company distribution example, using the Cloudberry product:

Most Basic Flow

The company receives a Sales Order from a regular customer for 100 boxes of Cloudberries at $25/box. They deliver all boxes from their warehouse, creating a Delivery Note. The Sales Invoice is generated the following day after confirming all details of the delivery. The customer pays according to their standard Net 30 terms via bank transfer, which the company records as a Payment Entry.

$2,500 / 100 boxes

$2,500 / 100 boxes

$2,500 / 100 boxes

Sales Order

Delivery Note

Sales Invoice

Payment Entry

When Chelsea Fruit Company delivers the Cloudberries from their warehouse via the Delivery Note, ERPNext creates these entries:

AccountStock LedgerDebitCredit
Cost of Goods Sold$1,500.00
Inventory on Hand-100 @ $15.00$1,500.00

When they create the Sales Invoice, ERPNext generates these entries:

AccountStock LedgerDebitCredit
Accounts Receivable$2,500.00
Sales$2,500.00

In another transaction, they receive a Sales Order for 200 boxes. When the warehouse team goes to fulfill this order, they discover that 20 boxes show signs of handling damage. The warehouse team creates a Delivery Note for 180 boxes, and the sales team adjusts the Sales Invoice accordingly. In this case, the Sales Order is closed to indicate the company won't be delivering the remaining quantity.

$5,000 / 200 boxes

$4,500 / 180 boxes

$4,500 / 180 boxes

-20 boxes

Sales Order

Delivery Note

Sales Invoice

Payment Entry

Stock Reconciliation

Stock Ledger

The resulting Stock and General Ledger entries look like this for the Delivery Note:

AccountStock LedgerDebitCredit
Cost of Goods Sold$2,700.00
Inventory on Hand-180 @ $15.00$2,700.00

And the Sales Invoice:

AccountStock LedgerDebitCredit
Accounts Receivable$4,500.00
Sales$4,500.00

And disposition of the damaged goods via a Stock Reconciliation:

AccountStock LedgerDebitCredit
Stock Adjustment$300.00
Inventory on Hand-20 @ $15.00$300.00

The three-way-check between Sales Order (what was ordered), Delivery Note (what was shipped), and Sales Invoice (what was billed) helps maintain accurate records of any discrepancies between ordered quantities and actual deliveries, while the Stock Ledger and General Ledger entries provide a complete audit trail of both the movement of goods and the corresponding financial transactions.

Credit Note Example

In a third transaction example, a customer places a Sales Order for 200 boxes. The team delivers all 200 boxes and creates a Sales Invoice. However, when the customer's receiving team inspects the delivery, they find that 15 boxes were damaged in transit. After reviewing photos of the damage, the company agrees to credit them for the damaged boxes and issue a Credit Note for $375 (15 boxes at $25/box).

$5,000 / 200 boxes

$5,000 / 200 boxes

$5,000 / 200 boxes

$375 / 15 boxes

Sales Order

Delivery Note

Sales Invoice

Payment Entry

Credit Note

Delivery Note

AccountStock LedgerDebitCredit
Cost of Goods Sold$3,000.00
Inventory on Hand-200 @ $15.00$3,000.00

Sales Invoice

AccountStock LedgerDebitCredit
Accounts Receivable$5,000.00
Sales$5,000.00

Credit Note (via Sales Invoice)

AccountStock LedgerDebitCredit
Sales$375.00
Accounts Receivable$375.00

The three-way-check between Sales Order, Delivery Note, and Sales Invoice shows the original transaction as delivered in full. The Credit Note then adjusts the amount owed by the customer without affecting the inventory records, since the goods were not returned. This provides a clear audit trail of both the original transaction and the subsequent adjustment for damaged goods discovered after delivery. In this example, the customer does not ship back the bad Cloudberry so the company does not take possession again of the damaged goods.

Sales Return Example

In this transaction, a customer places a Sales Order for 200 boxes. The team delivers all 200 boxes and creates a Sales Invoice. The customer's receiving team finds that 15 boxes were damaged in transit. After communication with the customer, the company agrees to take the damaged boxes back and issue a Credit Note. A Delivery Note with negative quantity (Sales Return) records the return of the damaged goods, and the company uses a Stock Reconciliation to dispose of the damaged, unsaleable inventory.

$5,000 / 200 boxes

$5,000 / 200 boxes

$5,000 / 200 boxes

$375 / 15 boxes

-15 boxes

Sales Order

Delivery Note

Sales Invoice

Payment Entry

Credit Note

Delivery Note Return

Stock Reconciliation

Delivery Note

AccountStock LedgerDebitCredit
Cost of Goods Sold$3,000.00
Inventory on Hand-200 @ $15.00$3,000.00

Sales Invoice

AccountStock LedgerDebitCredit
Accounts Receivable$5,000.00
Sales$5,000.00

Sales Return (via Delivery Note)

AccountStock LedgerDebitCredit
Inventory on Hand+15 @ $15.00$225.00
Cost of Goods Sold$225.00

Credit Note

AccountStock LedgerDebitCredit
Sales$375.00
Accounts Receivable$375.00

Stock Reconciliation

AccountStock LedgerDebitCredit
Stock Adjustment$225.00
Inventory on Hand-15 @ $15.00$225.00

A notable difference between this example and the previous one is that the company took possession of the damaged goods (again), and even though they immediately disposed of the goods, this activity should be recorded. For example, a business that has a policy of counting scrap quantities to help reconcile their manufacturing efficiency would miscalculate if the return goods were not correctly returned and were counted along with a normal and expected manufacturing scrap / loss.

The three-way-check between Sales Order, Delivery Note, and Sales Invoice shows the original transaction as delivered in full. The Credit Note adjusts the customer's balance, while the Sales Return Delivery Note and Stock Reconciliation provide a complete audit trail of receiving back and disposing of the damaged goods.

Please contact us for corrections, additions, questions, or to request a topic.

© 2026 AgriTheory. All Rights Reserved.