Skip to main content

Adjustment reasons

Every adjustment has a reason, and every line may have its own. A reason says what the adjustment may do: add stock, remove stock, whether it needs a comment, whether it needs approval, and whether the locations it changed are counted after posting. The Adjustment Reasons screen shows the list of reasons and lets you change one of these settings: counting after posting.

The form is inventory_adjust_reason_list_form. The data object is inventory_adjust_reason, over the code list inv_adjust_reason (code list id 1031). The list is read by inventory_adjust_reason_list.

How to open it​

  1. Sign in and select a warehouse.
  2. In the left sidebar open Inventory Balances.
  3. Click Adjustment Reasons.

The sidebar item is inventory_adjust_reason_list_menu (tab tab_inventory_adjust_reason_list).

Columns​

Every column is read only. Retired reasons are listed too.

LabelColumnTypeWhat it shows
IDidWhole numberHidden. The id of the value in the code list.
CodecodeTextThe code, for example LOST.
ReasondescriptionTextThe name, translated through the code list.
ActiveactiveYes or noWhether the reason can be chosen now. A retired reason is refused when it is chosen, validated or posted.
Adds Stockallow_positiveYes or noThe reason may raise a quantity.
Removes Stockallow_negativeYes or noThe reason may lower a quantity.
Comment Requiredrequires_commentYes or noThe line or the document must carry a comment.
Approval Requiredrequires_approvalYes or noThe document must be approved before it can be posted.
Count After Postingcount_after_postYes or noAfter the post, each location whose stock this reason changed is counted.

The values come from the metadata of each value of the code list: allow_positive, allow_negative, requires_comment, requires_approval, count_after_post. A key that is missing reads as the strictest answer: no direction allowed, comment required, approval required, no count (crates/libs/wms-inventory/src/domain/inventory_adjustment/aggregate.rs:108-140).

The reasons a new database has​

Source: crates/libs/wms-lib-sql/sql/wms-app/migrations/053_the_inventory_adjustment_document.sql:96-120 and 054_an_adjustment_is_reversed_by_another.sql:21-27. Count After Posting is off for all of them.

CodeNameAdds stockRemoves stockComment requiredApproval required
DAMAGEDamageNoYesNoNo
FOUNDFound stockYesNoNoNo
LOSTLost stockNoYesNoNo
COUNT_VARIANCECount varianceYesYesNoNo
ERP_RECONCILIATIONERP reconciliationYesYesNoYes
DATA_FIXData fixYesYesYesYes
QUALITYQualityNoYesNoNo
EXPIRYExpiryNoYesNoNo
CUSTOMER_REQUESTCustomer requestYesYesYesNo
OTHEROtherYesYesYesYes
REVERSALReversal of a posted adjustmentYesYesYesNo

COUNT_VARIANCE is the reason of the adjustment that a count makes when a supervisor accepts a variance. REVERSAL is used only by Reverse; it cannot be chosen by hand. The settings other than Count After Posting have no screen of their own. The code list and its values are marked as not editable (editable is false in 053_the_inventory_adjustment_document.sql).

Not confirmed by code: whether the Code Lists screen lets an administrator change the policy keys of a reason, or switch a reason off. To verify: open Code Lists, find the list inv_adjust_reason and try to change a value.

What each setting does​

  • Adds / Removes: checked at Validate and again at Post, on the real change of the line. A line whose change is 0 passes any reason. Messages: reason {code} does not allow adding stock (+{n}), reason {code} does not allow removing stock ({n}).
  • Comment required: Save of the header, and Validate, need a comment on the header or on the line. Message: reason {code} requires a comment.
  • Approval required: if any reason used by the document (the header's or a line's) asks for it, the document is Needs Approval and Post is refused until Approve. Message: the adjustment's reason requires approval before posting.
  • Count after posting: when the post changes a line, the location of that line is counted (event process.inventory.count_requested, source Adjustment). The location is named once, in code order. An adjustment that a count made asks for nothing.

Toolbar buttons​

ButtonNeedsWhat it does
Count After PostingOne ticked reasonTurns Count After Posting on for that reason.
Do Not CountOne ticked reasonTurns it off.
RefreshNothingReads the list again.

The grey text of the first two is Tick a reason. The value is set, not toggled: pressing Count After Posting twice leaves it on.

ResultMessage
Turned onReason {code}: a posted adjustment counts the locations it changed
Turned offReason {code}: a posted adjustment counts nothing
No rowTick one reason
The list changedThe list has moved on — tick the reason again and retry
RefusedReason {code} was not changed: {error}

The server refuses a code that is not on the list: reason {code} is not on the adjustment reason list.

See Setting count after posting.

Who can use it​

Reading: ADMIN, MANAGER, SUPERVISOR, VIEWER. The two buttons: ADMIN, MANAGER. See Who can do what.