Understand debit and credit ​

Debit and credit are the two sides of every accounting entry. They do not mean "good" and "bad", and they do not always mean "increase" and "decrease". Their effect depends on the type of account. This page explains the rules and shows how common ERPNext documents balance.

The accounting equation ​

The balance sheet follows this equation:

Assets = Liabilities + Equity

Income increases profit, and profit increases equity. Expenses reduce profit. This gives the normal behavior of the five root types in the chart of accounts:

Root typeWhat it representsIncreases withDecreases withExamples
AssetWhat the company owns or controlsDebitCreditCash, bank, receivables, stock, equipment
LiabilityWhat the company owesCreditDebitPayables, loans, tax payable
EquityThe owners' interestCreditDebitCapital stock, retained earnings
IncomeValue earned in a periodCreditDebitSales, service income
ExpenseValue used in a periodDebitCreditRent, salaries, cost of goods sold

Assets and expenses normally increase with a debit. Liabilities, equity, and income normally increase with a credit. An account can still have entries on both sides. A customer payment credits receivables because the asset decreases. A sales return debits sales because income decreases.

Debit and credit are not payment directions ​

The same bank account is debited or credited depending on whether its balance goes up or down:

  1. A customer pays an invoice. Bank (asset) increases: debit. Receivables (asset) decrease: credit.
  2. You pay a supplier. Payables (liability) decrease: debit. Bank decreases: credit.
  3. You buy a laptop for cash. Equipment (asset) increases: debit. Bank decreases: credit.

Examples: one business from funding to closing ​

The examples use a small trading company and simple values. Your account names can differ. In each case, you create the document and ERPNext creates the entries on submit.

Owner invests capital ​

The owner invests 25,000 in the company. Record it with a Journal Entry, because it is not a payment against an invoice.

AccountDebitCredit
Bank25,000
Capital Stock25,000

Credit sale ​

A Sales Invoice for 1,000 plus 80 tax, to be paid later:

AccountDebitCredit
Accounts Receivable1,080
Sales1,000
Tax Payable80
Total1,0801,080

Customer pays ​

A Payment Entry for 1,080, allocated to the invoice. The invoice's outstanding amount becomes zero.

AccountDebitCredit
Bank1,080
Accounts Receivable1,080

Credit purchase and payment ​

A Purchase Invoice for 600 of office equipment, then the payment:

DocumentAccountDebitCredit
Purchase InvoiceOffice Equipment600
Purchase InvoiceAccounts Payable600
Payment EntryAccounts Payable600
Payment EntryBank600

If the purchase is an operating expense, the debit goes to an expense account instead.

Stock received before the supplier bill ​

With perpetual inventory, a Purchase Receipt for stock worth 700 posts a temporary liability:

AccountDebitCredit
Stock In Hand700
Stock Received But Not Billed700

The Purchase Invoice then debits Stock Received But Not Billed and credits Accounts Payable.

Stock delivered to a customer ​

A laptop sold for 1,000 has a valuation cost of 700. The Delivery Note, or a Sales Invoice with Update Stock, posts the cost separately from the sale:

AccountDebitCredit
Cost of Goods Sold700
Stock In Hand700

ERPNext takes this amount from the stock valuation, not from the selling price. Unsold stock is an asset. Its cost becomes an expense when you sell it, so the expense matches the revenue.

Expense paid at once ​

Rent of 5,000 and an internet bill of 120, paid from the bank:

AccountDebitCredit
Rent Expense5,000
Internet Expense120
Bank5,120

Use the most specific document: a Purchase Invoice for a supplier bill, payroll documents for salaries, and a Journal Entry only when no other document fits.

Depreciation ​

AccountDebitCredit
Depreciation Expense100
Accumulated Depreciation100

Accumulated depreciation is a contra-asset account. It has a normal credit balance and reduces the net book value of the asset without changing its cost.

Closing the period ​

At period end, a Period Closing Voucher moves the net balance of the income and expense accounts to a closing account, normally Retained Earnings. For a profit of 20,000:

AccountDebitCredit
Income and expense accounts (net)20,000
Retained Earnings20,000

A loss reverses the direction.

Contra accounts and unusual balances ​

A contra account offsets another account and stays visible on its own. Examples are accumulated depreciation, sales returns, and allowances.

An unexpected balance is not always wrong:

  • A customer with a credit balance can have an advance or an overpayment.
  • A supplier with a debit balance can have an advance paid.
  • A bank account with a credit balance can be an overdraft.
  • An income account can be debited by a Credit Note.

Check the source documents before you decide that a sign is wrong.

Parties and control accounts ​

ERPNext normally posts all customers to one receivable account and all suppliers to one payable account. The Party Type and Party on each ledger entry identify whose balance changed. You do not need one account for each customer. The Accounts Receivable and Accounts Payable reports show balances by party. Learn more in Set receivable and payable accounts.

Dimensions do not change debit and credit ​

A cost center, a project, or another accounting dimension tags an entry for analysis. It does not change the account or the side of the entry. One rent account can be split across three cost centers, and the ledger stays balanced.

Check the entries of a document ​

  1. Open the submitted document.
  2. Select View > Accounting Ledger (on a Journal Entry or a Payment Entry, View > Ledger).
  3. Check that the debit and credit totals are equal.
  4. Check that each account matches the business event, and that receivable and payable rows have the correct party.
  5. Check the cost center, project, finance book, and other dimensions.

The Trial Balance report confirms that total debits equal total credits for a period. A balanced total does not prove that every account is correct.

Common mistakes ​

MistakeBetter approach
Reading debit as "money received"Find the account type, then ask whether the balance went up or down.
Reading credit as a negative amountDebit and credit are sides of an entry, not signs.
One receivable account for each customerUse one control account. The party identifies the customer.
Fixing an invoice with an unrelated Journal EntryReturn, cancel, or amend the invoice so the documents and the ledger agree.
Checking only that the totals balanceAlso check accounts, parties, dates, dimensions, taxes, and currencies.

Frequently asked questions ​

Does every entry affect exactly two accounts? ​

No. Double entry needs equal totals, not two rows. An invoice with several taxes, income accounts, and stock can create many GL entries.

Can I enter a negative debit? ​

Use the opposite side instead. For a reversal, use the document's return or cancel workflow.

Can I use a Journal Entry instead of invoices and payments? ​

Use invoices and Payment Entries for routine sales, purchases, and payments. They update outstanding amounts, party balances, stock, taxes, and reports. Use a Journal Entry for adjustments.