Legacy Controller for Period Closing Voucher
The Period Closing Voucher (PCV) is the document you submit to close your books at the end of a financial period. When you submit it, ERPNext moves all your Profit & Loss balances into the closing account.
Accounting > Accounts Settings
In Accounting Settings, go to the following tab and field to enable Legacy Controller
Accounts Closing (tab) > Use legacy controller for Period Closing Voucher

If your company has a very large amount of General Ledger Entries, this closing process can take a long time and sometimes it gets stuck. This setting decides how ERPNext runs that closing process, so you can avoid the timeout.
What happens when it is enabled (checkbox ticked) Legacy behaviour
- The entire Period Closing Voucher is submitted in one single database transaction.
- Everything is processed together, in one go.
- This is the older, default way of doing things and works perfectly fine for small and medium sized general ledgers.
- If ledger entries are in large volumes, this single big operation can time-out and fail.
- For reverting balances, this approach only considers the main Account (ledger). It doesn’t split the reversal entries based on Accounting Dimensions tagged in the ledgers, hence makes the posting efficient.
What happens when it is disabled (checkbox unticked) Batched behaviour
- The closing is broken up into smaller batches.
- Each date in the closing period is processed as its own separate background job.
- Because the work is split into small pieces, the submission won't time out, no matter how large your ledger is.
- The processing runs in the background, so it can take a few minutes to complete, but it completes reliably.
- This honours reversing of ledger balances based on dimensional postings.
This is an opt-in feature. Most businesses can leave the box ticked (enabled). If you have a general ledger entries in the large volumes and PCV’s closing is taking much time, simply untick the box (disable it) to switch on the safer batched processing.