What Are Cost Layers?
Every time you receive inventory in Luminous, the system creates a cost layer — a record of exactly how many units arrived and at what landed cost (base purchase price plus any allocated freight, customs duties, handling fees, and other receiving expenses). These layers stack up over time, giving you a precise history of what every unit of a SKU actually cost to acquire.
Cost layers drive:
- Cost of Goods Sold (COGS) on sales and invoices
- Inventory valuation on stock snapshots and balance sheets
- Margin calculations and profitability reporting
FIFO vs. Weighted Average Costing
Luminous supports two costing methods. Your method is selected in Settings → Inventory → Costing Type.
| Method | How it works |
|---|---|
| FIFO (First In, First Out) | When stock is sold or consumed, the system deducts units from the oldest cost layer first, then moves to the next, and so on. Each receipt keeps its own separate layer with its own unit cost. |
| Weighted Average | All receipt layers for a SKU are blended into a single average cost. When new stock arrives, the average is recalculated across all remaining units and the new receipt. |
FIFO in action
- Jan 1 — Receive 100 units @ $10.00 → Layer 1: 100 units @ $10.00
- Feb 1 — Receive 200 units @ $12.00 → Layer 2: 200 units @ $12.00
- Apr 1 — Sell 120 units: the system first takes all 100 units from Layer 1, then 20 from Layer 2.
- Layer 1 is now exhausted
- Layer 2 has 180 units remaining @ $12.00
This means your COGS reflects the actual cost of the oldest stock — which generally matches reality and satisfies standard accounting requirements.
How Cost Layers Are Created
A new cost layer is added any time stock is physically added to inventory:
- Receiving a shipment (via a Receiving Report) — the most common source. Landed costs (ocean freight, duties, etc.) are allocated pro-rata across all SKUs on the shipment.
- Completing an Assembly Order — finished goods receive a new layer based on component costs.
- Inventory count adjustments — when a count adds units, a new layer is created at the cost you specify.
- Beginning-balance migration — layers can be seeded when you first set up Luminous.
Note on Internal Transfers: Moving stock between your own warehouses does not create a new cost layer. The existing layer's unit cost and original receipt date are preserved; only the warehouse assignment changes.
How Landed Costs Are Allocated
When you record extra costs on a shipment (freight, customs, etc.), Luminous distributes them across all SKUs received in that shipment using one of two allocation methods:
- Unit-based — the extra cost is spread equally per unit received (e.g., ocean freight)
- Value-based — the extra cost is spread proportionally by line value (e.g., customs duty)
The result is a single landed cost per unit for each SKU in that shipment, stored in that SKU's cost layer.
Configuring Costing Settings
Go to Settings → Inventory and look for these fields:
| Setting | What it does |
|---|---|
| Costing Type | Choose FIFO or Weighted Average for your account. |
| Rebuild Cost Layers Nightly (Weighted Average only) | Automatically recalculates cost layers each night — useful if you frequently add costs to older shipments after receiving. |
| Nightly rebuild: FIFO multi-warehouse distribution | When the nightly rebuild runs, also split cost layer quantities across warehouses proportional to on-hand stock (instead of keeping a single merged layer per warehouse). Requires the nightly rebuild to be enabled for your tenant. |
Manually Rebuilding Cost Layers for a Specific SKU
If you suspect a SKU's cost layers are out of sync — for example after a manual inventory adjustment, a data import, or a correction to a past shipment — you can run a per-SKU rebuild directly from the product page.
Steps
- Open the product record (navigate to Inventory, then click into the SKU).
- Select the Costs tab.
- Click the Cost Layer Analysis button in the top-right corner of the Cost Layers section.
- A dialog opens showing your current Costing Method (FIFO or Weighted Average). If you are on Weighted Average, you can optionally check FIFO multi-warehouse distribution to split quantities across warehouses by on-hand stock.
- The analysis runs automatically when the dialog opens (click Run Analysis Again to refresh it, e.g. after changing the multi-warehouse option). It is a preview (no changes are made yet) and shows you:
- On-hand units — total current stock for the SKU
- Current cost — the per-unit cost stored in existing layers
- New cost — what the per-unit cost would be after a rebuild
- Receipts included — the receipt/shipment layers that feed the rebuilt cost, with FOB price, landed cost, and freight per unit
- Receipts excluded — older layers that are fully consumed and no longer affect the current cost
- Detailed log — a full breakdown of how each cost component was calculated
- Review the analysis. If the proposed cost looks correct, click Recalculate Cost Layers to apply the changes.
Tip: Always run the analysis first and review the before/after cost before clicking Recalculate. The analysis is read-only and safe to run at any time.
When Are Cost Layers Out of Sync?
Cost layers may drift from actual inventory in scenarios such as:
- Historic data imports or beginning-balance migrations
- Manual database corrections
- Costs added retroactively to older shipments
- Complex multi-warehouse transfers
The rebuild process re-derives layer quantities from your actual on-hand stock and receiving history, corrects the remaining quantities, recalculates totals, and records all changes in the audit trail.
Related Articles
- Understanding Cost Layers in Inventory Management
- What is the FIFO (First In, First Out) method, and how does it work with cost layers?
- Cost Layer Rebuild: What It Does and Why It Matters
- How Receiving and Inventory Adjustments Affect Cost Layers in Luminous
- What happens to cost layers when we sell or use inventory?