How the selling cycle affects the ledger
The selling cycle starts with a commitment to the customer and ends when the customer pays. Not every document in the cycle posts to the General Ledger. A Sales Order records what you agreed to sell. The Delivery Note, the Sales Invoice, and the Payment Entry record the financial events that follow.
ERPNext posts ledger entries only when you submit a document. A saved draft has no ledger effect.
The examples on this page leave out sales tax, and use common account names. Your account names can differ. ERPNext posts to the accounts set on the company, the Item, the Item Group, the warehouse, and the document.
Ledger effect of each document
| Document | Ledger effect | What it represents |
|---|---|---|
| Sales Order | None | A commitment to supply goods or services at an agreed quantity and price. |
| Delivery Note for stock items | Debit Cost of Goods Sold, credit Stock In Hand | The goods left the company, and their stock value becomes an expense. |
| Sales Invoice | Debit the receivable account, credit Sales. Credit the tax account when tax applies. | Income is recognized, and the customer owes the invoice amount. |
| Payment Entry of type Receive | Debit Bank or Cash, credit the receivable account | Money came in, and the customer's balance goes down. |
Each event has two sides. For example, a customer payment increases the bank balance, so ERPNext debits Bank. The payment also reduces what the customer owes, so ERPNext credits the receivable account.
Example: sell stock goods
A manufacturer sells two phones to a customer at $699 each, a total of $1,398. ERPNext values the two phones in stock at $866.76.
Sales Order. It records the order for two phones. It does not recognize income, reduce stock, or create a receivable. No ledger effect.
Delivery Note. It confirms that the phones left the warehouse. ERPNext moves their stock value to expense:
Account Debit Credit Cost of Goods Sold $866.76 Stock In Hand $866.76 The amount is the stock valuation, not the selling price.
Sales Invoice. It recognizes income and creates the amount due:
Account Debit Credit Debtors (receivable) $1,398.00 Sales $1,398.00 Without tax and other costs, the gross profit is $531.24: sales of $1,398.00 less cost of goods sold of $866.76.
Payment Entry. The customer pays the invoice in full:
Account Debit Credit Bank $1,398.00 Debtors (receivable) $1,398.00 The payment does not record income again. It only moves the balance from the receivable account to Bank.

Example: sell a service
A service company agrees to do 20 device-setup sessions for a customer at $150 each, a total of $3,000. Services do not move stock, so the cycle goes from Sales Order to Sales Invoice to Payment Entry.
Sales Order. It records the scope, quantity, rate, and delivery date. No ledger effect.
Sales Invoice. After the work is done:
Account Debit Credit Debtors (receivable) $3,000.00 Sales or Service Income $3,000.00 The item is a non-stock service, so the invoice posts no Stock In Hand or Cost of Goods Sold entry. Staff, contractor, and travel costs come from their own payroll, expense, purchase, or journal documents.
Payment Entry. Debit Bank $3,000.00, credit Debtors $3,000.00, as for a goods sale.
A service company can still use a Delivery Note as an operational proof of delivery. A Delivery Note for a non-stock item does not reduce Stock In Hand.
Compare the two flows
| Stage | Stock goods | Services |
|---|---|---|
| Sales Order | No ledger effect | No ledger effect |
| Delivery | Delivery Note debits Cost of Goods Sold and credits Stock In Hand | Usually no Delivery Note and no stock entry |
| Invoice | Debits the receivable account, credits Sales | Debits the receivable account, credits Sales or Service Income |
| Payment | Debits Bank, credits the receivable account | Debits Bank, credits the receivable account |
Variations
- Sales Invoice with Update Stock. One invoice posts both the stock entries of the Delivery Note and the income and receivable entries of the invoice. The result is the same, but you lose a separate delivery document in the audit trail.
- Sales Invoice without a Sales Order. The invoice posts the same entries. You lose the order tracking and the link between ordered and billed quantities.
- Sales tax. The receivable account is debited for the full invoice total. Sales is credited for the net amount, and the tax account is credited for the tax collected.