Skip to main content

Statuses and transitions

This page lists the statuses of the documents and records of the Inventory Balances screens, and what moves each one to the next. The rules live in crates/libs/wms-inventory/src/domain/inventory_adjustment/aggregate.rs, crates/libs/wms-inventory/src/domain/inventory_count/aggregate.rs and the services next to them.

Adjustment document​

StatusMeaning
DraftBeing written, or changed after a validation, or refused by the last validation.
ValidatedEvery line passed the last Validate. Not changed since.
ApprovedValidated and approved. Not changed since.
PostedPosted. Final. It never changes again.

The database keeps the dates in step with the status (check chk_inventory_adjustment_lifecycle): Validated has validated_at; Approved has validated_at and approved_at; Posted has validated_at and posted_at.

Transitions​

FromActionToPage
(none)New, SaveDraftCreating an adjustment
Draft, Validated, ApprovedAdd, change or remove a line; save a changed header Reason or CommentDraft. All lines go back to Pending; the validation and the approval are cleared. Saving the same effective header values leaves status and evidence unchanged.Adding lines
Draft, Validated, ApprovedValidate, every line passesValidated. The approval is cleared.Validating
Draft, Validated, ApprovedValidate, some line is refusedDraftValidating
ValidatedApproveApprovedApproving
Validated (no reason asks for approval), ApprovedPostPostedPosting
PostedReversestays Posted; a new Draft is madeReversing
Draft, Validated, ApprovedDelete(the document is gone)Deleting

What each status allows​

OperationDraftValidatedApprovedPosted
Change header or linesYesYes (goes to Draft)Yes (goes to Draft)No
ValidateYesYesYesNo
ApproveNoYesNoNo
PostNoYes, if no reason asks for approvalYesNo
ReverseNoNoNoYes, once
DeleteYesYesYesNo

Source: aggregate.rs:30-90, crates/libs/wms-lib-core/src/model/inventory/inventory_adjustment.rs:223-336.

Adjustment line statuses​

StatusMeaning
PendingNew, or the document changed after the last validation.
ValidThe last validation accepted it.
InvalidThe last validation refused it. The line holds the code and the message.
PostedThe post changed stock. The line holds the ledger code.
NoChangeThe post found the stock at the target and wrote nothing.

The mode of a line (Existing, CreateIfMissing) is not a status: see Adjustment lines.

Count​

StatusMeaning
NewOnly on the screen: the header before the first save. The table has no such status.
OpenThe count exists and may have locations to count.
ClosedNo location is Open or Variance any more. Final.
CancelledCancelled by a supervisor. Final.
FromActionTo
(none)Save of the headerOpen
OpenA counter finishes a location, a supervisor decides a variance, or a location is removed, and no location is left Open or VarianceClosed (a removal closes it only if at least one location is Closed)
OpenCancel CountCancelled
OpenDelete, when nothing was counted(the count is gone)

The database allows a count to be Closed or Cancelled only with the matching date set (chk_inventory_count_lifecycle).

Count location (counting row)​

StatusMeaning
OpenWaiting to be counted, or being counted.
VarianceCounted, and something differs. Waits for a decision.
ClosedMatched, or the variance was accepted. Final.
RecountedReplaced by a new attempt. Final for this row.
CancelledThe count was cancelled. Final.
FromActionTo
(new)Location addedOpen
OpenThe counter finishes ("Done"), all lines matchClosed (the location thaws)
OpenThe counter finishes, some line differs, all within the count tolerancesClosed (accepted on its own; cause Within tolerance; an adjustment is posted)
OpenThe counter finishes, some line differsVariance
VarianceAccept Variance with a causeClosed (the location thaws; an adjustment is posted; the cause is kept)
VarianceRecountRecounted; a new row Open with the next attempt
Open, VarianceCancel CountCancelled
Open (attempt 1, nothing recorded)Remove Location(the row is gone)

A location can be in one live row (Open or Variance) of one count at a time. Finishing needs at least one entry or the "empty" confirmation: nothing was counted in {location}: record what is there, or confirm that it is empty.

Count result types​

Match, QtyVariance, ExpectedButMissing, UnexpectedFound. See Counted location card.

Hold​

A hold has no status in the screens. It is on or off (is_hold_on). Only holds that are on are listed. A hold goes off when it is released (the API method, the hold cascade of a move, the write-off of damage, the sweeper). The date and the user of the release are stored in date_off and who_off. An optional auto_release_date schedules the sweeper; empty means no scheduled release.

The status of the location that a hold sets is Ok, Hold or Damage. See Placing a hold.

Pending move-in​

StatusMeaningHow it is reached
ActiveThe space is held.A putaway suggestion made it.
ConsumedThe pallet arrived and used it.A move into the location with the reservation.
CancelledReleased by a person.Release.
ExpiredThe time ran out.The sweeper.

Consumed, Cancelled and Expired are final.

Other statuses shown on the Balances tabs​

WhereValues
Container (By Container)Active, Empty, InTransit; shown as On hold while a hold is on. Disposed and Planned containers are not listed.
Serial (By Serial)Active, Reserved, Picked, Packed, Shipped, Returned, Damaged, Held, Disposed.
Serial capture episode (Open Episodes)Listed: Open, InProgress, AwaitingConfirmation. Not listed: Committed, Cancelled, Abandoned.
Lot (By Lot)Active, On hold.
Balance row (By Location)Empty, or On hold.