inventory_valuation_layers
Get an item's remaining FIFO cost layers, oldest first: receipt date, source movement, original/remaining quantities, unit cost, total value, and shortfall. Filter by location.
Instructions
The remaining FIFO cost layers for one item, oldest first: each carries the receipt date, the source movement, the quantity originally received and what is left of it, and its unit cost. Layers are derived from the J02 ledger on demand rather than cached, so they cannot drift from it. Returns the layer quantity, the exact total (the sum of remaining qty times layer cost, to the Rappen) and shortfall, the demand that outlived the layers when stock went short. Filter by locationId to inspect one location; a foreign or unknown item OR location is not_found, never cross-tenant data and never an empty list that would read as "this location holds nothing". NOT A STOCK-AGEING REPORT: when stock is transferred the layer moves with its own unit cost but its receiptDate becomes the date it reached that location, because that is what drives consumption order there. For how long goods have really been held, read the J02 movement history, which rewrites nothing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOf | No | ||
| itemId | Yes | ||
| locationId | No | ||
| workspaceId | Yes |