Finance
finance is the double-entry ledger for Heiervang Technologies — the books over the org's money engine, inventory. Cost accounting, expenses, payments, and (later) revenue and P&L.
Owner: Penny (CFO). Stack: PL/pgSQL — a finance schema in the shared htdb Postgres. Status: scaffold — schema under review with the inventory data lane.
What it is
A finance schema in the same DB as inventory's api.*, so cost basis joins to items by a real foreign key: the books reconcile to the asset register by construction. Owned and released on its own cadence, decoupled from the inventory app's ~4×/day auto-deploy — books must not auto-publish riding unrelated frontend PRs.
Inventory reads exactly one surface: finance.v_item_cost_basis (the read contract). It never reads the base tables and never writes finance.
Design + locked cross-lane contract: admin decisions/0001-ledger-location.md and finance/RFC-0001-expense-ledger.md.
Rails
- Never migrate the live
htdbfrom here. Author → review → the cloud lane (snoop-kube) applies. - Append-only books — corrections are reversing entries, never edits/deletes.
- Net-of-VAT cost basis — input mva is a reclaimable asset, not cost.
- Every row = an explicit action — aligns with inventory's no-auto-persist rule.
- Branch + PR, squash-merge, no
Co-Authored-By: Claudetrailer, self-hosted runners.
Sources
- README
CONTRACT.md— the cost-basis read contract.