Repost Item Valuation skipped during Fiscal Year Closing after Stock Reconciliation

We encountered an issue during our year-end closing process and would like to understand whether this is expected ERPNext behavior or whether it was caused by our customization.

As part of our year-end process:

  1. Around 13:30, we created and submitted multiple Stock Reconciliation documents.

  2. Around 14:45, we executed our fiscal year closing process.

  3. During the closing process:

    • Temporary accounts were closed.

    • The fiscal year was closed.

Our fiscal year closing process is customized. We implemented a custom closing document similar to the structure of Period Closing Voucher, but instead of only closing temporary accounts, it also creates the year-end closing entries.

After the closing process, we found that for one specific item, the Repost Item Valuation (valuation rate correction) was skipped.

As a result:

  • The Bin record became inconsistent.

  • The item quantity shown in Bin is incorrect.

  • The stock valuation for that item is also incorrect.

We would like to know whether ERPNext is expected to prevent this scenario.

Specifically:

  • Does the ERPNext core ensure that all pending Repost Item Valuation operations are completed (or block fiscal year closing until they are)?

  • Or is it possible for a fiscal year closing process to proceed while valuation reposts are still pending?

  • Could our customization have bypassed an existing safeguard that normally waits for or enforces completion of valuation reposts?

We are trying to determine whether this behavior is caused by our customization or whether it is a scenario that is not currently handled by the ERPNext core.

Any guidance on the expected behavior would be appreciated.