Skip to content

PurchaseExpense ledger: immutable expense record written at PO receive #10

Description

@CST-100

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions