ERPNext

ERPNext

Open in ChatGPT
Ask ChatGPT about this page
Open in Claude
Ask Claude about this page

How Transactions Affect the Ledger

ERPNext creates ledger entries when an accounting or stock transaction is submitted. The source document describes what happened in the business; the generated entries record its financial effect. Understanding this connection helps you verify setup, investigate balances, and choose the correct document for a workflow.

flowchart LR
    A["Draft document"] -->|"Submit"| B["Submitted document"]
    B --> C["GL Entries"]
    B --> D["Payment Ledger Entries"]
    B --> E["Stock Ledger Entries, when applicable"]
    C --> F["Financial reports"]
    D --> G["Outstanding and ageing reports"]
    E --> H["Stock balance and valuation reports"]

When a transaction affects the books

A draft normally has no ledger effect. On submission, ERPNext validates the posting date, company, currency, accounts, cost centers, dimensions, totals, and debit-credit balance. If validation succeeds, it creates the applicable entries.

The Posting Date determines the accounting period. The document's creation date and submission time may be different. If stock is involved, Posting Time can also affect the sequence used for stock valuation.

Cancelling a submitted transaction reverses its ledger effect if cancellation is allowed. ERPNext does not simply remove the original history. This supports the immutable ledger and makes the sequence of posting and reversal traceable. To correct and replace a document, cancel it and create an amended copy.

The ledgers serve different purposes

Ledger Primary purpose Common sources
General Ledger Records debit and credit amounts by account Invoices, payments, journal entries, stock transactions, assets, payroll
Payment Ledger Tracks receivable and payable references, allocations, and outstanding amounts Invoices, payments, credit notes, journal entries
Stock Ledger Tracks quantity, incoming rate, valuation rate, and stock value by Item and Warehouse Receipts, deliveries, stock entries, stock-updating invoices

One document can affect more than one ledger. For example, a stock-updating Sales Invoice records income and receivable in the General Ledger, reduces inventory in both the Stock and General Ledgers, and creates the Customer's outstanding amount in the Payment Ledger.

Common transaction effects

The entries below show the normal pattern. Actual account names come from the Company, Item, Item Group, Warehouse, party, and tax configuration.

Sales Invoice

Submitting a Sales Invoice normally records:

Account Debit Credit
Customer receivable Invoice total
Income Net sales
Output tax payable Tax amount

The Customer's outstanding amount remains open until it is paid, allocated, written off, or reversed.

If Update Stock is enabled, the same invoice also reduces stock:

Account Debit Credit
Cost of goods sold Valuation cost
Stock asset Valuation cost

Without Update Stock, a Delivery Note normally records the stock and cost effect separately.

Purchase Invoice

Submitting a Purchase Invoice normally records:

Account Debit Credit
Expense or asset Net purchase
Recoverable input tax Tax amount
Supplier payable Invoice total

When perpetual inventory is used with a Purchase Receipt, the Purchase Invoice can clear the Stock Received But Not Billed account rather than debit stock again. This prevents the same receipt from being capitalized twice.

Payment Entry

An incoming Payment Entry normally debits Bank or Cash and credits the Customer receivable account. An outgoing payment debits the Supplier payable account and credits Bank or Cash. An internal transfer moves value between two cash or bank accounts.

Payment allocation is separate from the cash posting. A payment can:

  • settle one invoice;
  • be divided across several invoices;
  • partially settle an invoice;
  • remain unallocated for later use;
  • be recorded as an advance against an order.

Use Payment Reconciliation to connect existing payments or credits to invoices without recording the money again.

Credit Note and Debit Note

A return Sales Invoice, commonly called a Credit Note, reverses or reduces sales, tax, receivable, and stock effects according to the selected return options. A return Purchase Invoice, commonly called a Debit Note, reverses or reduces purchase, tax, payable, and stock effects.

Create returns against the original invoice whenever possible. The reference improves traceability and updates the original document's returned and outstanding values.

Journal Entry

A Journal Entry posts the debit and credit rows entered by an authorized user. It is suitable for accruals, provisions, reclassifications, opening entries, write-offs, inter-account transfers, and other adjustments without a more specific transaction.

Do not replace a Sales Invoice, Purchase Invoice, or Payment Entry with a generic Journal Entry merely to save time. Specialized documents carry parties, taxes, items, due dates, stock behavior, and operational references that a manual entry may not provide.

Delivery Note and Purchase Receipt

With perpetual inventory:

  • A Delivery Note credits the Warehouse's stock asset account and debits cost of goods sold.
  • A Purchase Receipt debits the Warehouse's stock asset account and credits stock received but not billed.

These documents do not normally create Customer receivables or Supplier payables. Billing happens when the invoice is submitted.

Stock Entry and Stock Reconciliation

A Stock Entry changes quantity and value for material receipt, issue, transfer, manufacture, and repack operations. Transfers can move value between Warehouse accounts. Manufacturing entries consume component value and add the resulting value to finished goods.

Stock Reconciliation sets counted quantities and valuation rates at a point in time. The difference is posted to the configured stock adjustment account when perpetual inventory is active.

Assets and depreciation

Buying or capitalizing an Asset records its value in an asset account. Submitted depreciation entries debit depreciation expense and credit accumulated depreciation. Asset sale, disposal, scraping, and value adjustment create additional entries based on the Asset's current book value and proceeds.

Payroll and expenses

Payroll entries generally debit salary and benefit expenses and credit payroll payables. Paying employees clears the liability against Bank. An Expense Claim records the approved expense and an amount payable to the employee; payment later clears that payable.

Deferred revenue and expense

When deferred accounting is configured on an invoice item, the invoice first posts to a deferred account. ERPNext then recognizes income or expense across the configured service period through scheduled accounting entries. This separates billing date from recognition period.

Foreign-currency transactions

ERPNext stores the party or account currency amount and its value in the Company's base currency. The invoice uses the exchange rate on its posting date. If settlement uses a different rate, the difference is posted as exchange gain or loss.

An Exchange Rate Revaluation adjusts eligible open foreign-currency balances for reporting at a selected date. Revaluation entries should be distinguished from realized differences created during payment.

Commitment documents versus ledger documents

Not every submitted business document posts accounting entries.

Document Business effect Usual ledger effect
Quotation Offer to a prospect or Customer None
Sales Order Customer commitment and fulfilment plan None, except linked advances recorded separately
Purchase Order Commitment to a Supplier None, except linked advances recorded separately
Delivery Note Goods delivered Stock and cost entries with perpetual inventory
Purchase Receipt Goods received Stock and receipt accrual entries with perpetual inventory
Sales Invoice Customer billing Income, tax, receivable, and optional stock
Purchase Invoice Supplier billing Expense or asset, tax, payable, and optional stock
Payment Entry Movement of money Bank or cash and party account

Orders affect operational reports even when they do not affect the General Ledger. They can reserve or plan stock, track fulfilment, establish payment schedules, and provide references for advances.

Trace an amount from document to report

  1. Open the submitted transaction.
  2. Use View > Accounting Ledger to inspect its GL Entries.
  3. Confirm that total debits equal total credits and that the posting date, accounts, party, cost center, project, and dimensions are correct.
  4. If stock is involved, open Stock Ledger and compare the quantity and valuation effect.
  5. Review the General Ledger for the account and voucher.
  6. Review Accounts Receivable or Accounts Payable when an outstanding amount is involved.
  7. Open the relevant financial statement and drill into the amount when further analysis is needed.

If the source document is correct but the account is wrong, inspect Company defaults, Item and Item Group defaults, Warehouse accounts, party accounts, tax templates, and rules. Correct configuration before posting additional transactions.

What downstream documents created directly can change

ERPNext allows many downstream documents to be created without an order or receipt. A direct invoice can be valid, but it loses the upstream reference and its operational controls.

  • A direct Sales Invoice bills the Customer but does not update a Sales Order's billed percentage.
  • A direct Delivery Note reduces stock but does not update an order's delivered percentage.
  • A direct Purchase Invoice creates a payable but does not update a Purchase Order's billed percentage.
  • A direct stock-updating invoice combines stock and billing, so there is no separate delivery or receipt document.

Choose the shorter path only when the business does not need the omitted commitment, approval, fulfilment, or audit milestone. See Accounting Workflows by Business Type for workflow choices.

Troubleshooting

Problem What to check
A submitted document has no expected GL Entry Confirm whether the document is a commitment or ledger document, then check perpetual inventory and stock-update settings.
The wrong income or expense account was used Review Item, Item Group, Company, and party defaults in their precedence order.
The invoice is paid but still outstanding Check Payment Entry references and allocations; reconcile an unallocated payment if necessary.
Stock Ledger and General Ledger values differ Check backdated stock entries, valuation reposting, cancelled vouchers, and the Stock and Account Balance Comparison report.
A backdated correction is blocked Check Accounts Frozen Upto, Accounting Period restrictions, permissions, and the requested posting date.
Last updated 17 hours ago
Was this helpful?
Thanks!