cardinal
Stock

Stock closing

Store a company's stock balances up to a date with a Stock Closing Entry, and keep that period from changing.

A Stock Closing Entry writes a company's stock balances up to a To Date into Stock Closing Balance records. Each balance is one item in one warehouse, or one batch or inventory dimension value of it, with its quantity, value and the FIFO queue of its receipts. Later closings start from these balances instead of the whole ledger.

Close a period

Stock Closing Entry > New. Pick the Company and the To Date. To Date cannot be in the future.

Save. From Date becomes the day after the company's last submitted entry, or the date of its first Stock Ledger Entry.

Finish any pending Repost Item Valuations up to To Date. Submit is refused while one is pending.

Submit. Status goes Queued, In Progress, then Completed as a chain of background jobs writes the balances. A node that dies loses only the chunk it was on.

A range that overlaps another submitted entry is refused.

After closing

EventResult
A stock posting dated on or before To DateThe entry becomes Outdated
The ledger moves while the jobs runThe entry ends Outdated instead of Completed
A Period Closing Voucher closes that datePostings on or before it are refused
erp.stock_closing_entry.regenerate_closing_balanceDeletes a submitted entry's balances and queues the jobs again. Refused once a Period Closing Voucher closes it or a later entry builds on it

Cancel deletes the entry's balances. It is refused while a later submitted entry exists, or while a Period Closing Voucher closes To Date or after.

Example

Acme Traders closes stock on 2026-03-31. The first entry covers 2025-04-01 (the first posting) to 2026-03-31 and completes. A back-dated receipt for 2026-03-30 is then entered, and the entry turns Outdated. Regenerate it, and it runs again with the receipt included. Once the accountant submits a Period Closing Voucher for the year, the same back-dated receipt is refused.

StatusMeaning
DraftSaved, not submitted
Queued, In ProgressJobs are writing balances
CompletedBalances match the ledger
OutdatedThe ledger moved on or before To Date since
FailedThe job stopped with an error
CancelledCancelled, balances deleted

On this page