Add per-client billing basis export

This commit is contained in:
tegwick 2026-08-11 14:39:48 +02:00
parent b75ad06b3a
commit fcec177ded
10 changed files with 506 additions and 11 deletions

View file

@ -142,7 +142,7 @@ missing facts, mismatches, evidence revisions, and duplicate allocation.
```task
id: FIN-WP-0002-T04
status: todo
status: done
priority: medium
state_hub_task_id: "b5886131-82f6-49fb-a7e3-ba47d5b627a8"
```
@ -155,6 +155,14 @@ currency, corrections, and provenance.
The export must not issue invoices, assign legal invoice numbers, execute or
track payments, or represent itself as bookkeeping evidence.
Completed 2026-08-11: added a deterministic v0.1 billing-basis artifact and
`ledger billing-basis` command. Each client-period record contains the current
price/revision, direct and allocated cost, margin, financial-fact/correction
IDs, allocation/revision IDs, and non-secret provenance. Stable IDs change
only when an input basis changes. Residuals, non-client targets, and missing
prices are explicit exceptions. The artifact carries a mandatory reporting-
only disclaimer and has no invoice, bookkeeping, or payment behavior.
## Select the external invoicing system
```task
@ -172,12 +180,12 @@ not required to settle T00T03.
## Acceptance
- [ ] Repository scope explicitly allows the reporting and export boundary.
- [ ] Costs can be reported by client × application × instance without making
- [x] Repository scope explicitly allows the reporting and export boundary.
- [x] Costs can be reported by client × application × instance without making
fin-hub authoritative for client or resource identity.
- [ ] Revenue and margin are period-aware, currency-aware, and distinguishable
- [x] Revenue and margin are period-aware, currency-aware, and distinguishable
from invoices and payments.
- [ ] Shared-infrastructure allocations reconcile to authoritative booked
- [x] Shared-infrastructure allocations reconcile to authoritative booked
costs with assumptions and unattributed residuals visible.
- [ ] The billing-basis export is idempotent and contains no payment execution.
- [x] The billing-basis export is idempotent and contains no payment execution.
- [ ] A human records the external invoicing/bookkeeping system decision.