Fix a stock value that does not match the stock account ​

With perpetual inventory, the stock value in the Stock Ledger and the balance of each stock account must be equal. They can drift apart when a stock or accounting entry is changed, cancelled, reposted, or corrected on one side only. Backdated transactions, failed reposts, and customizations that post to stock accounts are the usual causes.

Find the difference ​

  • Compare the Stock Balance report with the stock account balance in the Trial Balance on the same date.
  • Run the Stock and Account Value Comparison report. It lists each transaction where the stock value and the account value differ.
  • Run the Incorrect Stock Value Report for a stock account. It lists each Stock Ledger Entry with its Expected Stock Value, Stock Value, and Difference Value.

Fix the transactions with a repost ​

Use this when the difference comes from specific transactions.

  1. In the Stock and Account Value Comparison report, select the rows with a difference.
  2. Select Create > Repost Stock & GL Entries, and confirm.
  3. Wait until the reposts are complete in the Repost Item Valuation list.
  4. Run the report again to check that the difference is gone.

Fix the balance with a Journal Entry ​

Use this when you cannot find or repost the source transactions, for example in a closed period.

  1. Create a Journal Entry between the stock account and an adjustment account, such as the Stock Adjustment Account, for the difference.
  2. Debit the stock account if the stock value is higher than the account balance. Credit it if the stock value is lower.
  3. Fill in the cost center and other accounting dimensions, then submit.

ERPNext allows a Journal Entry on a stock account only when the account balance differs from the stock value. If they are equal, ERPNext shows "Account: ... can only be updated via Stock Transactions".

TIP

If the difference comes back, look for backdated transactions, failed reposts, cancelled documents, or custom entries that post to the same stock account.