When a PO line is received and inventory is created, capture the financial cost in a local ledger:
- New
purchase_expense table: purchase/line/part FKs, quantity, unit_cost, total_cost (nullable — line may have no cost), tier, received_at, notes.
receive_purchase appends a record per received line.
GET /purchases/{id}/expenses read-only endpoint.
- "Expense Records" panel with a total row on the purchase detail page.
Depends on the tier-enforcement change to receive_purchase landing first (same function).
When a PO line is received and inventory is created, capture the financial cost in a local ledger:
purchase_expensetable: purchase/line/part FKs, quantity, unit_cost, total_cost (nullable — line may have no cost), tier, received_at, notes.receive_purchaseappends a record per received line.GET /purchases/{id}/expensesread-only endpoint.Depends on the tier-enforcement change to
receive_purchaselanding first (same function).