# billing changelog

## 1.1.0 (2026-11-30)
Minor (new optional columns, one new optional table and two vocabularies; every 1.0 database stays valid), for
Invoices & Receivables (freelancers and small businesses that send invoices):
- `invoices`: local dates in the seller's calendar (`issue_date`, `due_on`, `sent_on`, `paid_on`, `closed_on`) with the
  IANA `tz` they are in, `written_off` (so total = amount_paid + amount_remaining + written_off), `source_status` (the
  tool's own word: sent, viewed, partial, overdue, written off) and `reference` (PO or project). `status` keeps its five
  values: a sent or partly paid invoice is `open`, a written-off one `uncollectible`; "overdue" and "partly paid" are
  derived from `due_on` and `amount_paid`, never stored as a status.
- `invoice_lines` (new table): one row per line, amount before tax, tax, kind (vocab `line_kinds`).
- `payments`: `paid_on` (local day the money arrived; partial payments are one row each), `method` (vocab
  `payment_methods`) and `confidence` (`detected` = one payment built from an invoice's paid date and amount paid).
- `customers.payment_terms_days`.
- Conformance checks: `invoice_lines_valid` and `invoice_local_dates_valid` at fail (they read only what is new in 1.1,
  which a 1.0 database holds empty), `invoice_due_after_issue`, `invoice_balance_consistent` and `payments_within_invoice` at warn.
- Fixtures: one partly paid one-off invoice with two lines (FX-0005). SaaS Metrics re-pinned; it reads none of the new
  fields and its numbers do not change.

## 1.0.0 (2026-11-29)
- First published version (launch plan §4.4): `customers`, `plans`, `coupons`, `subscriptions`, `subscription_items`
  (state over time: one row per stretch with the same price, quantity and recurring discount), `subscription_pauses`,
  `subscription_events`, `invoices`, `payments`, `refunds`, `credit_notes`, `fx_rates`, the derived `mrr_monthly`, and
  the platform tables (`meta`, `import_issues`, `overrides`, `annotations`, `metric_registry`).
- The MRR and movement rules (README): month-end snapshot, annual plans / 12, trials 0, pauses kept apart from churn,
  churn at `ended_at`, recurring discounts only, constant-currency movements with an explicit `fx` line, refunds and
  credit notes never move MRR.
- Conformance checks: references, state rows valid and not overlapping, pauses, dates ordered, money signs, billable
  plans, positive rates, no email stored, `mrr_monthly` consistent; provenance and `source_built_at` at `warn`.
- Fixtures: "Fixture SaaS Co" (fictional), one golden case per MRR rule.
- Before this release the Stripe connector kept its rows in `library/pending/stripe.json`; the next `dashremix sync`
  writes `library/billing.db` (ids now carry the account: `stripe:<account>:<id>`). The pending file can be deleted.
