Inventory ledger settings are the posting rules that turn a document line into inventory ledger entries: each rule says which line it watches, which movement type it writes, which quantity it posts and which stock balance buckets go up or down. Documents such as goods receipts, invoices, delivery orders, adjustments and transfers create the lines; the rules decide what posting those lines does to stock. You read them when a stock figure surprises you and you need to know why a document posted — or did not post — a movement.
Overview
xMatix ships 56 rules. Every rule belongs to one kind of document line (the Entity) and writes one Ledger Type. One line type usually has several rules, each with a Condition that picks out one situation. For example, a goods receipt line posted against a purchase order matches a different rule from one received against a shipment. When a line is posted, every active rule for its line type whose condition the line meets writes its own ledger entry.
The rules are platform configuration. Setup → Feature Hub → Inventory → Inventory Ledger Settings lists them and opens each one in a read-only dialog, and the page header says so: Inventory ledger settings are managed in code and are read-only. You can view them here but not create, edit or delete them. The server refuses changes from every user, administrators included.
When to use it
- A bucket moved and you don't know why. Find the rule that adds to or takes from that bucket for the line type involved.
- A line posted nothing. Check whether any active rule's condition fits the line. If none does, posting skips it and the line gets no Inventory Ledger reference.
- *A ledger entry has Inventory Stock Posted unchecked.* Look at the rule that wrote it. A rule that only takes from a bucket leaves that box unchecked even though the bucket moved.
- You are planning a process change, such as invoicing before delivery or receiving against shipments. The rules show which buckets each route will move.
How xMatix handles it
What happens when a line is posted
- xMatix loads the active rules for the line's type, ordered by Sequence and then by Label.
- A line with no item is skipped, and so is a line whose item has Track Inventory turned off. If the item has Track Lots on and the line has no lot, posting stops with Product Lot was not selected for the transaction. This is required for Inventory posting.
- For each rule, xMatix checks the save event (see below) and then the Condition. A rule with an empty condition always matches.
- A matching rule reads the company and branch from the Parent Entity (the header document) and the quantity from the Quantity Field. If the line has a Cancelled Quantity, that is subtracted first.
- The rule writes one ledger entry of its Ledger Type. It adds the quantity to the Increment Field buckets and subtracts it from the Decrement Field buckets, on the stock record and on the line's item lot. If the stock record doesn't exist yet, xMatix creates it.
- If a bucket would go below zero, posting stops with Insufficient stock: <bucket> cannot go negative (result: <value>). and nothing from that save is posted.
The first entry written for a line is stamped on the line as its Inventory Ledger reference. That reference is how xMatix knows the line has been posted.
Save events: why most documents post through an action
Each rule subscribes to save events with On Create, On Update and On Delete:
- On Create — the rule posts as soon as the line is first saved. Only the allocation, picking and inspection line rules use it, so those lines move stock the moment they are saved.
- On Update — the rule posts when the line is passed to posting after it was created. That happens when someone runs the document's stock action (Post Inventory, Receive, Release Outward and so on), and when a later edit to a line makes the document re-post it. Every other seeded rule is update and delete only. That is why creating a goods receipt, invoice or adjustment moves no stock until its action runs.
- On Delete — deleting a posted line reverses what it posted. Deleting a line that was never posted does nothing to stock.
Changes post reversals, not edits
When a posted line is posted again (because its quantity, cost, item, branch or location changed), each matching rule compares what the line posted before with what it would post now. If nothing changed, nothing is written. Otherwise the rule writes a negated entry for each earlier entry of its ledger type, which moves the buckets back, and then a fresh entry for the new values. A line whose quantity is now zero, for example because it was fully cancelled, gets only the reversal. The ledger page explains how to read these pairs.
Two kinds of counter reference
A rule can name its buckets in two ways: as a linked stock field, or as a stored list of bucket names. The linked field wins when both are set. The view dialog shows only the linked field. So a rule can move a bucket that the dialog's Increment Field or Decrement Field leaves blank. Three seeded rules work this way: the invoice line rules Sold (from Picked), Sold (from Allocation) and Sold (direct). They add to Sold Quantity and Pending Deliveries, but the dialog shows an empty Increment Field. The tables below list the full effect of each rule.
Prerequisites
- Access to Setup. Reading the rules needs no further setup capability.
- To trace a posting, access to the documents and to Inventory → Inventory Ledger.
Procedure
Step 1 — Open the rules
Go to Setup → Feature Hub → Inventory → Inventory Ledger Settings. The page header shows the read-only notice and chips for the rules you opened recently. The table lists every rule with Name, Label, Entity, Parent Entity, Ledger Type, Active, Created, Created By, Modified and Modified By. It is sorted by Label.
Step 2 — Find the rules for one kind of line
- Search matches Name, Label and Ledger Type. Searching for Sold lists the five invoice line rules; searching for (goods receipt) lists the goods receipt receiving-difference rules.
- Sort by Entity to group all the rules for one line type together. Entity can be sorted but not filtered.
- Filter the Active column to Inactive to see the two rules that ship switched off.
Use the Label to tell rules apart. Several rules share a Name: all five invoice line rules are named Sold. Each label says what makes its rule different, such as Sold (from delivery order).
Step 3 — Open a rule
Select the rule's name, its View action (the eye icon), or one of its recent chips. The dialog View Inventory Ledger Setting: <label> opens with every field disabled:
- Label, Name, Sequence
- Ledger Type, Entity, Parent Entity
- Quantity Field, Increment Field, Decrement Field
- Active
- Event Type: On Create, On Update, On Delete
- Condition
The page address gains ?openId=<id>. Copy the address to share a link that opens the same rule.
Step 4 — Read the condition
The condition is a formula over the line's fields. It can also read fields of records the line links to, such as InventoryFulfilmentPickingLine.Quantity > 0. Read != null as "is filled in" and == null as "is empty". AND and && both mean "and". A rule posts only if its condition is true when the line is posted.
Step 5 — Trace a ledger entry back to its rule
- Open the entry in Inventory → Inventory Ledger and note its Ledger Type, its source document and Inventory Stock Posted.
- On Inventory Ledger Settings, search for that ledger type and find the rules whose Entity is the source line type.
- Compare the source line with each rule's condition. The rule whose condition the line meets wrote the entry. Its Increment Field and Decrement Field (plus any text list described above) are the buckets the entry moved.
Step 6 — Ask for a different posting behaviour
There is no front-end path to change a rule. If your process needs a line to post differently, raise it through your implementation or support channel. Often the answer is a different document route. For example, to bring a return back into stock, post an adjustment instead of relying on the credit note.
Fields
| Field | What it means | Notes |
|---|---|---|
| Label | The rule's display name, unique among the seeded rules. | Says what distinguishes the rule, for example Inward (from Pipeline). Also the second sort key after Sequence. |
| Name | Internal rule name. | Not unique: rules for the same movement share it. |
| Sequence | Evaluation order within the line type. | Must be unique for the same Entity and Ledger Type. |
| Ledger Type | The movement type written on the entry. | Values used by the seeded rules: Adjustment, Allocation, Assemble, Damaged, Disassemble, Excess, Expired, Inspection, InTransit, Inward, OnHold, OnLoan, Outward, Picked, Pipeline, Purchased, Shortage, SoftCommit, Sold, TransferInward, TransferOutward. |
| Entity | The document line the rule watches. | One rule covers one line type. |
| Parent Entity | The header the company and branch come from. | Empty on the three transfer line types, which use the line itself. |
| Quantity Field | The line field posted as the entry's quantity. | Cancelled Quantity, where the line has it, is subtracted first. |
| Increment Field | The stock bucket the quantity is added to. | Shown as the bucket's label, such as Unbilled Receipts. May be blank when the rule names its buckets as a text list. |
| Decrement Field | The stock bucket the quantity is taken from. | As above. |
| Active | Whether the rule posts. | Inactive rules are ignored completely. |
| On Create, On Update, On Delete | The save events the rule responds to. | See Save events. |
| Condition | The formula a line must meet. | Empty means always. |
The generated entity reference lists the stored fields.
Business rules
The tables list every seeded rule, grouped by line type. Adds to and Takes from use the bucket labels on the stock record. Events is U+D for update and delete, or C+U+D when the rule also posts on create.
Goods receipt and inspection lines
Parent: Goods Receipt. Events: U+D for receipt lines, C+U+D for inspection lines.
| Label | Ledger Type | Posts when the line… | Quantity | Adds to | Takes from |
|---|---|---|---|---|---|
| Inward (from Pipeline) | Inward | is received against a shipment line that was posted | Supplier Quantity | Unbilled Receipts | Quantity On Pipeline |
| Inward (purchase order) | Inward | comes from a purchase order line and has no pipeline quantity | Received Quantity | Unbilled Receipts | — |
| Inward (shipment) | Inward | is received against a shipment line that was never posted | Supplier Quantity | Unbilled Receipts | — |
| Inward (direct) | Inward | has no purchase order line, no shipment line and no pipeline quantity | Supplier Quantity | Unbilled Receipts | — |
| Damaged (goods receipt) | Damaged | has a Damaged Quantity | Damaged Quantity | Damaged Quantity | — |
| Shortage (goods receipt) | Shortage | has a Shortage Quantity | Shortage Quantity | Shortage | — |
| Excess (goods receipt) | Excess | has an Excess Quantity | Excess Quantity | Excess Quantity | — |
| Inspection (pending) | Inspection | is an inspection line with quantity to inspect and Inspection Done off | Inspection Quantity | Inspection | — |
| Inspection (done) | Inspection | is an inspection line marked done with nothing left to inspect | Inspection Quantity | reverses the pending hold | — |
Bill and shipment lines
Events: U+D.
| Label | Ledger Type | Posts when the line… | Quantity | Adds to | Takes from |
|---|---|---|---|---|---|
| Purchased (direct) | Purchased | is a bill line with no goods receipt line | Quantity | Purchased Quantity | — |
| Purchased (from goods receipt) | Purchased | is a bill line raised from a goods receipt line | Quantity | Purchased Quantity | Unbilled Receipts |
| Pipeline | Pipeline | is a shipment line | Quantity | Quantity On Pipeline | — |
Allocation and picking lines
Parent: Inventory Fulfilment, Order or Service Order, depending on where the line was created. Events: C+U+D.
| Label | Ledger Type | Posts when the line… | Adds to | Takes from |
|---|---|---|---|---|
| Allocation (fulfilment) | Allocation | belongs to a fulfilment (not a service order) | Allocation Quantity | — |
| Allocation (order) | Allocation | belongs to a sales order line that has not posted | Allocation Quantity | — |
| Allocation (Release SoftCommit) | Allocation | belongs to a sales order line that already posted | Allocation Quantity | SoftCommit |
| Allocation (service order) | Allocation | belongs to a service order line that has not posted | Allocation Quantity | — |
| Allocation (service order, from SoftCommit) | Allocation | belongs to a service order line that already posted | Allocation Quantity | SoftCommit |
| Picked (fulfilment), Picked (order), Picked (service order) | Picked | is a picking line against an allocation line | Picked Quantity | Allocation Quantity |
Delivery order lines
Parent: Delivery Order. Events: U+D.
| Label | Ledger Type | Posts when the line… | Quantity | Adds to | Takes from |
|---|---|---|---|---|---|
| Outward (direct) | Outward | comes from no pick, allocation or invoice line | Quantity | Unbilled Dispatches | — |
| Outward (from Picked) | Outward | comes from a picking line | Quantity | Unbilled Dispatches | Picked Quantity |
| Outward (invoiced, from PendingDeliveries) | Outward | comes from an invoice line (no pick or allocation) | Invoiced Quantity | — | Pending Deliveries |
| Outward (from Allocation) | Outward | comes from an allocation line with nothing picked | Quantity | Unbilled Dispatches | Allocation Quantity |
Invoice lines
Parent: Invoice. Events: U+D. All five post Quantity.
| Label | Ledger Type | Posts when the line… | Adds to | Takes from |
|---|---|---|---|---|
| Sold (from Picked) | Sold | comes from a picked allocation line and nothing is delivered yet | Sold Quantity, Pending Deliveries | Picked Quantity |
| Sold (from Allocation) | Sold | comes from an allocation line with nothing picked and nothing delivered | Sold Quantity, Pending Deliveries | Allocation Quantity |
| Sold (direct) | Sold | comes from no pick, allocation or delivery order line | Sold Quantity, Pending Deliveries | — |
| Sold (from delivery order) | Sold | comes from a delivery order line and has a delivered quantity | Sold Quantity | Unbilled Dispatches |
| Sold (delivered on invoice) | Sold | has a delivered quantity but no delivery order line | Sold Quantity | Unbilled Dispatches |
An invoice that is not yet delivered therefore raises Pending Deliveries. The delivery order later raised from that invoice takes the quantity back out through Outward (invoiced, from PendingDeliveries).
Order and service order lines
Events: U+D.
| Label | Ledger Type | Posts when the line… | Adds to | Active |
|---|---|---|---|---|
| SoftCommit (order) | SoftCommit | is a sales order line | SoftCommit | No — ships inactive |
| SoftCommit (service order) | SoftCommit | is a service order line | SoftCommit | Yes |
Adjustment lines
Parent: Adjustment. Events: U+D.
| Label | Ledger Type | Posts when the line… | Quantity | Adds to | Takes from |
|---|---|---|---|---|---|
| Adjustment (stock in) | Adjustment | has no Adjustment Type and a positive quantity | Quantity | Positive Adjusted | — |
| Adjustment (stock out) | Adjustment | has no Adjustment Type and a negative quantity | Quantity | — | Negative Adjusted (recorded as a positive amount) |
| Damaged (adjustment) | Damaged | is type Damaged with a Damaged Quantity | Damaged Quantity | Damaged Quantity | — |
| Shortage (adjustment) | Shortage | is type Shortage with a Shortage Quantity | Shortage Quantity | Shortage | — |
| Excess (adjustment) | Excess | is type Excess with an Excess Quantity | Excess Quantity | Excess Quantity | — |
| Expired | Expired | is type Expired with an Expired Quantity | Expired Quantity | Expired Quantity | — |
| OnHold | OnHold | is type OnHold | Quantity | Quantity On Hold | — |
| OnLoan | OnLoan | is type OnLoan | Quantity | Quantity On Loan | — |
| Assemble | Assemble | is type Assemble | Quantity | Assembled In | — |
| Disassemble | Disassemble | is type Disassemble | Quantity | Assembled In | — |
Note that Disassemble also adds to Assembled In; no seeded rule moves Assembled Out. A line of any other type (such as Part to Part from a claim settlement) matches no rule and posts nothing.
Transfer lines
No parent: each transfer line is its own header. Events: U+D, except InTransit.
| Line | Label | Ledger Type | Posts when the line… | Adds to | Takes from |
|---|---|---|---|---|---|
| Transfer Outward Line | TransferOutward (outward line) | TransferOutward | is released, not a Pending Deliveries Transfer (posts Current Released Quantity) | Transfer Outward | — |
| Transfer Outward Line | TransferOutward (outward line, PendingDeliveries) | TransferOutward | is released on a Pending Deliveries Transfer (posts Current Released Quantity) | — | Pending Deliveries |
| Transfer Outward Line | InTransit | InTransit | names a related branch or company (C+U+D) | Transit | — (ships inactive) |
| Transfer Inward Line | TransferInward (inward line) | TransferInward | is received, not a Pending Deliveries Transfer | Transfer Inward | — |
| Transfer Inward Line | TransferInward (inward line, PendingDeliveries) | TransferInward | is received on a Pending Deliveries Transfer | Pending Deliveries | — |
| Transfer Inward Line | Damaged / Shortage / Excess (transfer inward) | Damaged, Shortage, Excess | has that receiving difference | Damaged Quantity, Shortage, Excess Quantity | — |
| Transfer Line | TransferOutward (transfer) | TransferOutward | is not a Pending Deliveries Transfer | Transfer Outward | — |
| Transfer Line | TransferOutward (transfer, PendingDeliveries) | TransferOutward | is a Pending Deliveries Transfer | — | Pending Deliveries |
| Transfer Line | TransferInward (transfer) | TransferInward | is not a Pending Deliveries Transfer | Transfer Inward | — |
| Transfer Line | TransferInward (transfer, PendingDeliveries) | TransferInward | is a Pending Deliveries Transfer | Pending Deliveries | — |
| Transfer Line | Damaged / Shortage / Excess (transfer) | Damaged, Shortage, Excess | has that receiving difference | Damaged Quantity, Shortage, Excess Quantity | — |
A two-step transfer's in-transit quantity is kept by the transfer itself on the destination branch's stock record, not by the inactive InTransit rule. See Transferring stock between branches.
Lines with no rule
Credit Note Line has no rule, so a credit note never changes stock. Sales order lines have only the inactive SoftCommit (order) rule, so a sales order reserves nothing until it is allocated.
General rules
- Every matching rule posts. Conditions are not exclusive. If two active rules for the same line type both match, the line writes two entries.
- Inventory Stock Posted is ticked on an entry only when the rule added to at least one bucket. Entries from rules that only take from a bucket (Adjustment (stock out), Outward (invoiced, from PendingDeliveries), and the PendingDeliveries outward transfer rules) show it unticked, even though the bucket moved.
- Unique sequence. A rule's Sequence must be unique for its Entity and Ledger Type. A duplicate is refused with Another Inventory Ledger Setting with the same Entity and Ledger Type already uses this Sequence. Sequence numbers must be unique within the same (Entity, Ledger Type) scope. This only matters when rules are delivered by a metadata package.
- Ledger entries don't copy the rule's label. Renaming a rule's label doesn't change any existing entry.
Example
A distributor invoices 40 cartons of item Glass Jar 500 ml straight from a sales order allocation, before anything is picked, and delivers them the next day.
- The allocation line saved on the sales order matched Allocation (order) on create: Allocation Quantity rose by 40.
- The invoice line comes from that allocation line, with nothing picked or delivered. When the invoice's stock action runs, it matches Sold (from Allocation). One
Soldentry of 40 is written. Sold Quantity and Pending Deliveries rise by 40, and Allocation Quantity falls by 40. - The warehouse raises a delivery order from the invoice. Its line comes from the invoice line, not from a pick or an allocation, so posting it matches Outward (invoiced, from PendingDeliveries). One
Outwardentry of 40 (the line's Invoiced Quantity) is written, and Pending Deliveries falls by 40. That entry shows Inventory Stock Posted unticked, because the rule only takes from a bucket.
At the end, Sold Quantity is up 40 and Allocation Quantity and Pending Deliveries are back where they started. You can trace each step to one row on the Inventory Ledger Settings screen.
Training
Practice exercise
In a sandbox, post a goods receipt with one line of 10 units against a purchase order, entering 1 unit as Damaged Quantity. Use an item with Track Inventory on and Inspection On Receipt off. Then open Inventory → Inventory Ledger and find the entries for that receipt.
Expected result: two entries, Inward (from Inward (purchase order), quantity equal to the line's Received Quantity) and Damaged (from Damaged (goods receipt), quantity 1). On Inventory Ledger Settings, search for (goods receipt) and Inward, open both rules and match each condition to your line. Then explain which buckets moved: Unbilled Receipts and Damaged Quantity.
Quick reference
- Path: Setup → Feature Hub → Inventory → Inventory Ledger Settings — view only.
- One rule = one line type + one ledger type + one situation (the condition).
- Every active rule whose condition matches writes its own entry.
- Most rules are update and delete only: lines post when the document's stock action runs, not when they are saved.
- Allocation, picking and inspection lines post on save.
- Edits post a reversal plus a fresh entry; deleting a posted line reverses it.
- The dialog can show a blank Increment Field for rules that still move buckets (the three undelivered invoice rules).
- Credit note lines have no rule; sales order SoftCommit and InTransit ship inactive.
- Use Label, not Name, to tell rules apart.
Permissions
- Viewing the list and opening a rule needs access to Setup. No other setup capability is checked.
- Creating, editing and deleting rules is refused for every user. The screen offers no New, Edit or Delete, and the server rejects any such request because the rules are managed in code.
- Posting itself follows the permissions of the document action that triggers it. See the page for each document.
Configuration
There is nothing for a tenant administrator to configure on the rules themselves. What you can control is which rules apply to your documents:
| What you control | Where | Effect on posting |
|---|---|---|
| Item Track Inventory | Item record, Details tab | Off: every rule skips the item's lines. See Items. |
| Item Track Lots | Item record, Details tab | On: a line without a lot cannot post. See Item lots. |
| Adjustment Type on adjustment lines | The line's Adjustment Type | Chooses which adjustment rule applies. A type no rule names posts nothing. See Adjusting stock. |
| Transfer Type | The transfer header | Pending Deliveries Transfer switches transfer lines to the Pending Deliveries rules. |
| Document route | How a line is created (from an allocation, pick, delivery order, shipment or purchase order) | The link fields on the line decide which rule's condition it meets. |
The rules travel with metadata: a metadata export includes them (see Metadata commands), and platform seed updates deliver changes to them.
Common problems
"A line posted nothing and has no Inventory Ledger reference"
Cause: no active rule for the line type matched. Typical cases: the item has Track Inventory off; the line has no item; an adjustment line of a type no rule names, or with zero quantity; a credit note line; a sales order line (its rule is inactive). Fix: compare the line with each rule's condition (Step 4). Correct the line (for example set a valid Adjustment Type) and run the document's stock action again, or use the document route that has a rule.
"Product Lot was not selected for the transaction. This is required for Inventory posting."
Cause: the item has Track Lots on and the line has no Item Lot. Fix: choose the lot on the line, save, and post again.
"Insufficient stock: … cannot go negative"
Cause: a rule tried to take more from a bucket than it holds. For example, a picking line takes from Allocation Quantity, or a delivery order raised from an invoice takes from Pending Deliveries. Nothing from that save was posted. Fix: read the bucket name in the message, find the rule that takes from it, and post the earlier step first (allocate before picking, post the invoice before the delivery order raised from it).
"Inventory Stock Posted is unticked on an entry"
Cause: the rule that wrote it only takes from a bucket, so the box stays unticked even though the bucket moved. Fix: none needed. Check the stock record to confirm the bucket changed.
"The rule dialog shows no Increment Field, but Sold Quantity went up"
Cause: the rule names its buckets as a text list, which the dialog doesn't show. Fix: use the tables on this page, which list the full effect of every rule.
"I can't edit or add a rule"
Cause: the rules are platform-managed and read-only for everyone. Fix: raise the requirement through your implementation or support channel (Step 6).
Common questions
Can I turn a rule off, for example SoftCommit for sales orders?
No. The Active flag is read-only like every other field, and the server refuses changes from every user. The sales order SoftCommit (order) rule ships inactive, so a sales order line reserves nothing in the ledger until an allocation line is saved. If your process needs soft reservation on sales orders, raise it through your implementation or support channel; don't look for a tenant setting, because there isn't one.
Why do several rules have the same name?
The Name identifies the movement, and one movement can arise in several situations. All five invoice line rules are named Sold because they all write Sold entries, but each covers a different route: from a pick, from an allocation, direct, from a delivery order, or delivered on the invoice. The Label is unique and says which situation each rule covers. Search and sort by Label when you need one specific rule.
Does invoicing reduce stock?
Yes, once its stock action runs. Every invoice rule adds to Sold Quantity, which lowers both Available and In Hand. Depending on how the line was created, the rule also takes from Picked Quantity, Allocation Quantity or Unbilled Dispatches, which releases the earlier reservation or dispatch. An invoice for goods not yet delivered also adds to Pending Deliveries, and the delivery order raised from it takes that back out. The balance formulas are in Stock balances.
Why does a credit note not return stock?
No rule covers credit note lines, so posting a credit note writes no inventory ledger entry and moves no bucket. To bring returned goods back into stock, post an adjustment with a positive quantity, or receive them through the document your process uses for returns.
