xMatix
Sign in Request demo
xMatix
PRODUCTS
SalesField SalesCRMRewardsClaimsInventoryProcurementWarehouse 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
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

The append-only journal of posted inventory movements: one row per source line per matching active InventoryLedgerSetting rule, written only by InventoryLedgerService.DoLedgerPostingAsync. Rows are immutable - the handler rejects every update and delete with an explicit message, and corrections happen by the engine posting a negated row that points at the original through ReversalOfLedgerId. Posting stamps the new row's id onto the source line's InventoryLedgerId, which is the reliable posted marker across the module, and also moves the matching InventoryStock buckets and ItemLot counters in the same unit of work. Movements are only emitted for items with TrackInventory set, and a lot is mandatory when the item has TrackLots.

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 DateDate
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
InInNumber
InventoryLedgerTypeLedger TypePickListValues: 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 NameText
OpeningStockOpening StockNumber
OutOutNumber
OwnerIdOwnerLookup → UserAccountYes
ParentEntityNameParent Entity NameText
ParentRecordIdParent Record IdLookup → @parentEntityName
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 QuantityNumberCarried for sold-but-undelivered movements: an Outward row can have zero quantity with this field holding the pending amount (the ledger view displays it as the quantity), and a SaleReturn row with it above zero does not count into availability until delivered.
QuantityQuantityNumberYes
RecordTypeIdRecord TypeGuid, hidden
RelatedBranchIdRelated BranchLookup → Branch
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 → InventoryLedger
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 NameText
SourceRecordIdSource RecordLookup → @sourceEntityName
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. Movements onto the transit balance are not recorded as ledger rows at all; transit is maintained directly on the stock row.
UIPropsUI PropsText
UnitCostUnit CostCurrency
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