Stock Ledger Invariant Check

Hello,

Thank you for your assistance.

We performed a bulk stock reconciliation during our inventory count. Immediately afterward, the stock data on the item record is incorrect compared to the stock in the inventory ledger.

We then perform a manual respost to update the data, and it works. However, for some reconciliations, we don’t have the transactions visible in the Stock Ledger Invariant Check to perform the repost. How should we proceed in this case, please?

Thank you for your assistance.

Help me please

Can you share more details where actually you are getting the issue?

like

  • How did you perform the bulk Stock Reconciliation?
  • Approx how many items were included in the reconciliation?
  • Is Perpetual Inventory enabled?
  • After reconciliation, how many items are mismatched?

Please share the details so we can discuss further

  • Yes, we performed a bulk stock reconciliation with automatic document validation enabled during import.

  • Over 3,000 items were reconciled across approximately 4 different warehouses.

  • Perpetual inventory was disabled during the stock reconciliation.

  • Let’s say all or most of the items have incorrect stock levels in their product records.

Thank you very much for your feedback.

Thanks for sharing the details — that helps a lot.

Since the stock ledger is correct but the item-wise stock is showing wrong values (especially after such a large reconciliation with perpetual inventory turned off), this usually happens because the system doesn’t fully rebuild the stock bins for all items during the import.

The easiest fix now is to run a full Repost Item Valuation for the posting date of the reconciliation. This forces ERPNext to rebuild bins and correct the item stock levels. For large batches like 3,000+ items, running the repost from the backend works best so nothing gets skipped.

Once the repost finishes, the item stock values should line up correctly with the ledger.

Let me know if you need help running it or checking if the repost completed properly.

Thank you so much for your response.

Could you please explain how I can completely reset the item valuations for the reconciliation posting date within the system to avoid any omissions? I’ve tried searching but I can’t figure it out.
Thank you for your help.

To completely reset all item valuations for a specific posting date (and make sure nothing gets missed), you can use the Repost Item Valuation tool. This will rebuild all stock calculations from the stock ledger for that date.

Here’s how you can do it:

  1. Go to Stock → Tools → Repost Item Valuation

  2. Select the posting date of your Stock Reconciliation

  3. Leave the item and warehouse fields empty (this tells ERPNext to include everything)

  4. Submit the repost

If you want to make sure every single item is included — especially after a large reconciliation — you can also run the repost from the backend, which forces ERPNext to rebuild all items without skipping any.

After the repost queue finishes, all item valuations and bin quantities should sync correctly with the stock ledger.