xMatix
Sign in Request demo
xMatix
PRODUCTS
SalesField Sales & SFACRMRewardsClaimsInventoryProcurementWarehouse ManagementField ServiceServiceSupportTelephony & MessagingFinance & AccountingPayrollExpense ManagementCommercePortalsAnalytics & ReportingData StudioMobile AppSee all products →
PLATFORM
Platform overviewApp BuilderAutomationIntegrationsSecurity & GovernanceChange ManagementDevelopers
SENSE AI
Sense AI overviewSense AssistSense ControlSense VisionAI StudioTrust & governanceIn Claude & ChatGPTUse cases
SOLUTIONS
Auto DMSConsumer Goods DMSSales Force Automation (SFA) FMCG & DistributionManufacturing & Dealer NetworksAutomotive & DealershipsPharma & HealthcareConsumer DurablesAgri-InputsBuilding MaterialsService NetworksWarehousing & 3PLFinancial AccountingERP SoftwareIndia GST ComplianceUAE VAT & e-InvoicingSaudi ZATCA & VATAll solutions →
RESOURCES
Knowledge CenterDeveloper & CLIBlogGuidesWhat is xMatix?Company facts
COMPANY
AboutCareersPartnersEventsContactAuthorsLegal
Sign in Request demo
Home/Docs/Entity Reference/Inventory Ledger — entity reference
REFERENCE · Last reviewed

Inventory Ledger — entity reference

One posted stock movement. Entries are written only by inventory posting, when a document line's stock action runs (or, for inspection, allocation and picking lines, when the line is saved), according to the read-only Inventory Ledger Settings. One line can write several entries, one per setting whose condition it meets. Each entry moves the matching Inventory Stock balance and lot counters in the same save, and stamps its id on the source line's Inventory Ledger reference. Entries are immutable: edits and deletes are refused, and changing, deleting or cancelling a posted line writes negated reversal entries that point at the originals. Only items with Track Inventory post, and lot-tracked items must name a lot on the line. Credit note lines have no seeded setting and post nothing.

Fields

FieldLabelTypeRequiredWhat it does
BranchIdBranchLookup → BranchThe branch whose stock moved, taken from the source document's header. In the ledger report a branch filter compares against both this and the related branch, and transfer rows only count towards a branch's running totals when this field matches it.
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
DocumentDatePosting DateDateThe time the entry was posted, not the source document's own date. Reversals carry the time they were written. The item ledger's period filter and opening stock use this date.
ExternalIdExternalText
HashCodeHashCodeGuidAn identifier column that posting never assigns, so it stays null on every generated row. Do not use it to correlate or deduplicate movements - use the source record and parent record references instead.
IdIdGuidYes
InInNumberNot stored. The field exists in metadata only and is never filled; use the ledger type and quantity instead.
InventoryLedgerTypeLedger TypePickListThe kind of movement, stored without spaces (for example Inward, Sold, TransferOutward, SoftCommit). It decides how the entry counts towards available and in-hand quantity; the stored quantity itself is a positive magnitude. Values: Adjustment, Transfer Outward, Transfer Inward, Outward, Fulfilment, Sold, On Loan, Inspection Adjustment, Allocation, Picked, Sale Return, Purchase Return, Pipeline, Soft Commit.
IsInventoryStockPostedInventory Stock PostedBooleanYesWhether this row's quantity was actually applied to an InventoryStock counter; false means the ledger row exists but no stock bucket field was updated (for example no increment field matched the configured names).
ItemIdItemLookup → ItemThe item that moved, copied from the source line. Lines whose item does not have inventory tracking enabled are skipped entirely by posting, so no row is ever written for them.
ItemLotIdItem LotLookup → ItemLotThe batch this movement consumed or produced, copied from the source line. Posting fails with a validation error when the item has lot tracking enabled and the line carries no lot. On a single-step transfer's inward row the destination lot is swapped in here and the original lot moves to the related lot field.
ItemLotTypeIdItem Lot TypeLookup → ItemLotTypeThe stock grade or variant carried through from the source line. It is recorded on the movement for reporting but is not part of the key used to find or create the matching stock balance.
ModifiedByIdModified ByLookup → UserAccountYes
NameLedger NameTextThe entry's reference, numbered automatically in the IL series by the Inventory Ledger Name Setting.
OpeningStockOpening StockNumberNot stored. The field exists in metadata only and is never filled; opening stock is computed by the item ledger from the entries posted before the period.
OutOutNumberNot stored. The field exists in metadata only and is never filled; use the ledger type and quantity instead.
OwnerIdOwnerLookup → UserAccountYes
ParentEntityNameParent Entity NameTextThe type of the source line's document, taken from the posting setting. Transfer lines, whose settings name no parent, record the line itself.
ParentRecordIdParent Record IdLookup → @parentEntityNameThe document the source line belongs to (or the line itself for transfer lines).
PartnerAccountIdPartner AccountLookup → AccountThe owning company of the movement, taken from the source document's header rather than the line. On transfers it is resolved per leg, so an outward and an inward row of the same transfer can name different companies.
PendingDeliveriesQuantityPending Deliveries QuantityNumberA pending-deliveries quantity carried on some movements. Current posting does not fill it on new entries (reversals negate whatever the original held). A SaleReturn entry holding a value here does not count towards availability in the item ledger.
QuantityQuantityNumberYesHow much moved: the posting setting's quantity field less the source line's Cancelled Quantity. Stored as a positive magnitude on ordinary entries and negated on reversals; the ledger type gives the direction.
RecordTypeIdRecord TypeGuid, hidden
RelatedBranchIdRelated BranchLookup → BranchOn transfer entries, the branch on the other side of the transfer. Empty on all other movements.
RelatedItemLotIdRelated Item LotLookup → ItemLotThe lot on the other side of a transfer movement. On single-step inward rows the engine swaps itemLotId to the destination lot and parks the source lot here.
RelatedPartnerAccountIdRelated Partner AccountLookup → AccountThe counterpart owning company on cross-company transfer rows; company-scoped ledger reads match it as well as partnerAccountId.
ReversalOfLedgerIdReverse Inventory LedgerLookup → InventoryLedgerOn a reversal entry, the original entry it neutralizes. Empty on ordinary entries.
SKUIdSKULookup → SKUThe SKU variant from the source line; together with partner, branch, item and storage location it selects the stock balance this movement is applied to.
SourceDocumentSource DocumentTextThe human-readable name of the source document/line, stamped at posting time so ledger rows read meaningfully without joins.
SourceEntityNameSource Entity NameTextThe type of the document line that posted the entry.
SourceRecordIdSource RecordLookup → @sourceEntityNameThe document line that posted the entry.
StorageLocationIdStorage LocationLookup → StorageLocationThe location whose balance was moved, after transfer resolution rather than as typed on the line - an inward leg is rewritten to the destination location. Goods in transit are not recorded as ledger entries; the transit quantity is kept on the destination branch's stock balance.
UIPropsUI PropsText
UnitCostUnit CostCurrencyThe cost on the movement: the source line's unit price, or its unit cost when it has no price. Reversals copy the original's cost. The item ledger's running value multiplies available quantity by this cost.
UpdatedDateTimeModified DateDateAndTimeYes

Actions

ActionLabelTypeWhat it does
CloneCloneServerAction (Clone)Create a copy of this record
GetInventoryLedgerDataGet Inventory Ledger DataServerAction (GetInventoryLedgerData)Returns a date-windowed stock ledger for one item (optionally one SKU) at one partner account, not a plain list of records: every movement row is returned with a running available and in-hand quantity and a running line-cost value, plus opening and closing totals for the window. BranchId is optional - omitting it consolidates every branch and makes inter-branch transfers net to zero. The running totals apply per-movement-type multipliers, so quantities such as Purchased, Pipeline, Picked and Inspection deliberately contribute nothing to them.

Validations

ValidationApplies toError messageNotes
Unit Price ValidationUnitCost, Error, inactiveUnit Price should be greater than zeroUnit Price should be greater than zero

Lookup filters

FilterLookup fieldNotes
BranchFilterBranchId
PartnerAccountFilterPartnerAccountId