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
| Field | Label | Type | Required | What it does |
|---|---|---|---|---|
BranchId | Branch | Lookup → Branch | The 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. | |
CreatedById | Created By | Lookup → UserAccount | Yes | |
CreatedDateTime | Created Date | DateAndTime | Yes | |
DocumentDate | Posting Date | Date | ||
ExternalId | External | Text | ||
HashCode | HashCode | Guid | An 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. | |
Id | Id | Guid | Yes | |
In | In | Number | ||
InventoryLedgerType | Ledger Type | PickList | Values: Adjustment, Transfer Outward, Transfer Inward, Outward, Fulfilment, Sold, On Loan, Inspection Adjustment, Allocation, Picked, Sale Return, Purchase Return, Pipeline, Soft Commit. | |
IsInventoryStockPosted | Inventory Stock Posted | Boolean | Yes | Whether 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). |
ItemId | Item | Lookup → Item | The 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. | |
ItemLotId | Item Lot | Lookup → ItemLot | The 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. | |
ItemLotTypeId | Item Lot Type | Lookup → ItemLotType | The 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. | |
ModifiedById | Modified By | Lookup → UserAccount | Yes | |
Name | Ledger Name | Text | ||
OpeningStock | Opening Stock | Number | ||
Out | Out | Number | ||
OwnerId | Owner | Lookup → UserAccount | Yes | |
ParentEntityName | Parent Entity Name | Text | ||
ParentRecordId | Parent Record Id | Lookup → @parentEntityName | ||
PartnerAccountId | Partner Account | Lookup → Account | The 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. | |
PendingDeliveriesQuantity | Pending Deliveries Quantity | Number | Carried 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. | |
Quantity | Quantity | Number | Yes | |
RecordTypeId | Record Type | Guid, hidden | ||
RelatedBranchId | Related Branch | Lookup → Branch | ||
RelatedItemLotId | Related Item Lot | Lookup → ItemLot | The 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. | |
RelatedPartnerAccountId | Related Partner Account | Lookup → Account | The counterpart owning company on cross-company transfer rows; company-scoped ledger reads match it as well as partnerAccountId. | |
ReversalOfLedgerId | Reverse Inventory Ledger | Lookup → InventoryLedger | ||
SKUId | SKU | Lookup → SKU | The SKU variant from the source line; together with partner, branch, item and storage location it selects the stock balance this movement is applied to. | |
SourceDocument | Source Document | Text | The human-readable name of the source document/line, stamped at posting time so ledger rows read meaningfully without joins. | |
SourceEntityName | Source Entity Name | Text | ||
SourceRecordId | Source Record | Lookup → @sourceEntityName | ||
StorageLocationId | Storage Location | Lookup → StorageLocation | The 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. | |
UIProps | UI Props | Text | ||
UnitCost | Unit Cost | Currency | ||
UpdatedDateTime | Modified Date | DateAndTime | Yes |
Actions
| Action | Label | Type | What it does |
|---|---|---|---|
Clone | Clone | ServerAction (Clone) | Create a copy of this record |
GetInventoryLedgerData | Get Inventory Ledger Data | ServerAction (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
| Validation | Applies to | Error message | Notes |
|---|---|---|---|
| Unit Price Validation | UnitCost, Error, inactive | Unit Price should be greater than zero | Unit Price should be greater than zero |
Lookup filters
| Filter | Lookup field | Notes |
|---|---|---|
| BranchFilter | BranchId | |
| PartnerAccountFilter | PartnerAccountId |
Related entities
- SKU — looks up via
SKUId - TransferInwardLine — looks up via
ParentRecordId - InventoryFulfilment — looks up via
ParentRecordId - UserAccount — looks up via
CreatedById - ItemLot — looks up via
RelatedItemLotId - Account — looks up via
RelatedPartnerAccountId - StorageLocation — looks up via
StorageLocationId - Account — looks up via
PartnerAccountId - UserAccount — looks up via
OwnerId - Order — looks up via
ParentRecordId - DeliveryOrder — looks up via
ParentRecordId - GoodsReceipt — looks up via
ParentRecordId - Item — looks up via
ItemId - Invoice — looks up via
ParentRecordId - Branch — looks up via
RelatedBranchId - Branch — looks up via
BranchId - Shipment — looks up via
ParentRecordId - InventoryLedger — looks up via
ReversalOfLedgerId - TransferOutwardLine — looks up via
ParentRecordId - TransferLine — looks up via
ParentRecordId - InventoryFulfilmentAllocationLine — looks up via
SourceRecordId - ServiceOrder — looks up via
ParentRecordId - ItemLot — looks up via
ItemLotId - Bill — looks up via
ParentRecordId - ItemLotType — looks up via
ItemLotTypeId - UserAccount — looks up via
ModifiedById - Adjustment — looks up via
ParentRecordId - ServiceOrderLine — referenced by via
InventoryLedgerId - TransferLine — referenced by via
InventoryLedgerId - TransferOutwardLine — referenced by via
InventoryLedgerId - GoodsReceiptLine — referenced by via
DamagedInventoryLedgerId - InventoryCostConsumption — referenced by via
SourceLedgerId - InvoiceLine — referenced by via
InventoryLedgerId - InventoryFulfilmentPickingLine — referenced by via
InventoryLedgerId - InspectionLine — referenced by via
InventoryLedgerId - DeliveryOrderLine — referenced by via
InventoryLedgerId - GoodsReceiptLine — referenced by via
InspectionInventoryLedgerId - GoodsReceiptLine — referenced by via
InspectionAdjustmentInventoryLedgerId - CreditNoteLine — referenced by via
InventoryLedgerId - ShipmentLine — referenced by via
InventoryLedgerId - AdjustmentLine — referenced by via
InventoryLedgerId - InventoryLedger — referenced by via
ReversalOfLedgerId - OrderLine — referenced by via
InventoryLedgerId - Journal — referenced by via
SourceRecordId - InventoryFulfilmentOrderLine — referenced by via
InventoryLedgerId - InventoryFulfilmentAllocationLine — referenced by via
InventoryLedgerId - BillLine — referenced by via
InventoryLedgerId - GoodsReceiptLine — referenced by via
InventoryLedgerId - InventoryCostLot — referenced by via
SourceLedgerId - TransferInwardLine — referenced by via
InventoryLedgerId
