# Phase 8 — Components, parts, and inventory

Phase 8 adds airline-scoped serialized component control, batch/location stock, suppliers, purchasing, goods receipts, work-order reservations and issues, immutable inventory transactions, parts-cost reconciliation, and operational inventory reports.

## Serialized components

The component register tracks type, part and serial number, manufacturer, condition, aircraft and position, storage location, warranty, inspection dates, and hour/cycle life limits. Installations and removals retain their own readings and work-order references. Every install, removal, transfer, repair dispatch/receipt, storage, and scrap event creates a permanent movement record; life adjustments are append-only records with prior and resulting values.

## Inventory and purchasing

Inventory items maintain derived on-hand, reserved, and available balances. Physical stock is separated into airline-owned location and batch records with shelf-life, unit cost, supplier, serviceability, and private certification metadata. Purchase orders use controlled Draft, Approved, Partially Received, and Received states. A receipt, stock-ledger posting, line balance, and purchase-order state change commit atomically.

All stock effects are append-only inventory transactions. Receipts, issues, returns, adjustments, transfers, reservations, installations, removals, and scrap are represented by controlled transaction types. Server-side balance locks reject negative stock, negative reservations, over-reservation, cross-airline references, and mismatched batches. Financial values use `DECIMAL`; quantities use fixed-scale decimal arithmetic.

## Maintenance integration

Stock may be reserved by batch for an open maintenance work order, issued, consumed, or returned. Consumption records the aircraft and maintenance task context and is included in the work order's actual cost. Returns reverse the parts-cost contribution, and a prior parts-cost snapshot prevents unrelated labour or provider costs from being overwritten. Approved work orders cannot receive new issues.

## Reports and security

Reports cover stock balance, low stock, expiring stock, component life, installation history, usage by aircraft, usage by maintenance task, and supplier purchases. Controller and service permissions separate viewing, management, reservations, issues, adjustments, transfers, reports, component movement, and purchasing approvals/receipts. Mutations require CSRF validation; database operations are prepared and airline-scoped; output is escaped; certification uploads stay outside the public directory; UTC timestamps and audit records are retained.

The module remains an operational management tool and does not claim regulatory certification.
