Repost item valuation
Repost Item Valuation recalculates stock ledger entries from a past date. It corrects the stock balance, the valuation rate, the stock value, and the related accounting entries. This process is called reposting.
When ERPNext reposts
Automatic reposting
ERPNext creates a Repost Item Valuation document by itself when you submit or cancel a backdated stock transaction. A background job processes the queued documents every hour, or every 15 minutes when Enable Parallel Reposting is on in Stock Reposting Settings.
To see the reposts, open the Repost Item Valuation list. The Status of each document is Queued, In Progress, Completed, Skipped, Failed, or Cancelled.
Manual reposting
Create a Repost Item Valuation document yourself when:
- the Stock Ledger Variance report shows wrong balances,
- the stock value and the stock account balance do not match,
- negative stock errors appear because of earlier reposting problems, or
- you imported stock transactions in bulk.
Prerequisites
- The posting date is after the last submitted Period Closing Voucher of the company.
- The posting date is after the To Date of the last Stock Closing Entry of the company.
- Background workers run on your site. Reposting runs in the background.
Find the entries to repost
Before you repost, find the wrong entries. A smaller scope reposts faster.
- Open the Stock Ledger Variance report and filter by company, item, or warehouse.
- Select the rows with a difference.
- Select Create Reposting Entries. ERPNext creates the Repost Item Valuation documents for the selected rows.
The Stock and Account Value Comparison report works the same way for vouchers whose stock value differs from the accounting value. Its Create menu has Repost Stock & GL Entries and Repost GL Entries.
Create a Repost Item Valuation document
- Open the Repost Item Valuation list and select Add Repost Item Valuation.
- Select the Company.
- In Based On, select one of these options:
- Transaction: repost one stock transaction and everything after it. Select the Voucher Type and the Voucher No.
- Item and Warehouse: repost one item in one warehouse. Select the Item Code and the Warehouse.
- Enter the Posting Date and the Posting Time. ERPNext reposts from this point.
- Optional, for Transaction only:
- Select Repost Only Accounting Ledgers to recreate only the accounting entries.
- Select Recreate Stock Ledgers to delete and recreate the stock ledger entries of the voucher. You cannot use this option for serial number or batch items.
- For a Purchase Receipt, Purchase Invoice, or Stock Entry, select Recalculate Valuation Rate to recalculate the incoming rate of the voucher.
- Submit the document. The Status becomes Queued.
- Select Start Reposting to start at once. Otherwise, the background job picks it up.
The form shows the progress while reposting runs. When the Status is Completed, the stock and accounting entries are correct.
WARNING
Reposting changes past stock values and accounting entries, and so changes the closing balances of past periods. Do not repost dates in a closed financial year.
Reposting performance
Reposting a long history can take a long time, because ERPNext recalculates every later entry.
- Limit the scope by item, warehouse, and date.
- Repost when few users work. To run reposting only at certain hours, use Limit timeslot for Stock Reposting in Stock Reposting Settings.
- Avoid backdated entries older than about one month.
- Keep ERPNext on the latest patch version.
Troubleshooting
The status is Failed
Open the document. The Error Log in the Error section shows the cause. Fix the cause, then select Restart.
ERPNext emails the reposting error to users with the Stock Manager role, or to the role in Notify Reposting Error to Role in Stock Reposting Settings.
Reposting takes too long
- Check how many entries the repost covers, and narrow the item, warehouse, or date.
- Make sure the background workers run.
- Check the timeslot in Stock Reposting Settings. Outside the timeslot, queued reposts wait.
Negative stock errors after reposting
- Make sure an inward entry exists before each outward entry, by posting date and time.
- Check the posting dates and times of the transactions.
- If the stock count is wrong, correct it with a Stock Reconciliation.
"Since ... has 'Update Stock' disabled, you cannot create repost item valuation against it"
Cause: you selected a Sales Invoice or Purchase Invoice that does not update stock.
Fix: select the Delivery Note or Purchase Receipt of the goods instead. To repost only the accounting entries of the invoice, select Repost Only Accounting Ledgers.
"Due to period closing, you cannot repost item valuation before ..."
Cause: a Period Closing Voucher exists for the date.
Fix: repost from a date after the closed period.
"Due to stock closing entry ..., you cannot repost item valuation before ..."
Cause: a Stock Closing Entry covers the date.
Fix: repost from a date after the To Date of the Stock Closing Entry.