From 779539d1b5f8835be017073a5061c3b90136b754 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Wed, 27 May 2026 15:57:54 -0400 Subject: [PATCH] =?UTF-8?q?docs(billing):=20dual-run=20stand-up=20results?= =?UTF-8?q?=20=E2=80=94=20shadow=20import=20done,=20reconciliation=202=20m?= =?UTF-8?q?atch=20/=207=20delta=20(stopped=20before=20flip)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...026-05-27-fusion-billing-session-handoff.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/superpowers/2026-05-27-fusion-billing-session-handoff.md b/docs/superpowers/2026-05-27-fusion-billing-session-handoff.md index d5d068d0..cda59c6b 100644 --- a/docs/superpowers/2026-05-27-fusion-billing-session-handoff.md +++ b/docs/superpowers/2026-05-27-fusion-billing-session-handoff.md @@ -133,6 +133,24 @@ All four chunks of #2 are now built. The brainstorm "which slice" question resol **NOTE:** Cursor's 7-file WIP remains uncommitted locally and was never deployed — when Cursor finishes, a normal `./deploy.sh` will ship it (and re-sync `.env`). +**Dual-run stand-up results (2026-05-27) — STOPPED here for review, NOT flipped:** +- Read-only role `odoo_billing_ro` created on nexacloud Postgres (192.168.1.50); DSN set in + `ir.config_parameter` `fusion_billing.nexacloud_dsn` on nexamain. Test Connection OK + (read 7 users / 232 plans / 87 subscriptions). +- **Shadow import committed on nexamain**: 7 partners, 232 plan catalogs, 87 draft shadow + subscriptions; 0 skipped, 0 failed. (NOTE: importer takes ALL plans/subs regardless of + active status → ~464 NC-* products now in the prod ERP catalog. Consider filtering to + `is_active` plans / active subscriptions, or prune the shadow records — all reversible.) +- **Reconciliation pass**: 9 (sub,period) rows had real billing activity → **2 match, 7 + delta**, 0 failed. The 7 deltas, MUST resolve before flipping: + 1. **One-off / non-subscription invoices** (3 rows: $877.99, $872.66, $32.20) — nexacloud + invoices with NULL subscription_id (fees/manual/credits); not modeled per-subscription. + 2. **List-price ≠ actual-invoiced** (4 rows: Odoo $200/$50 vs actual ~$9.1x) — likely + proration or NexaCloud invoicing ≠ plan list price. +- **2d bug surfaced (analysis-only, not safety):** `_reconcile_rows` with an empty + `subscription_external_id` matches NULL-field orders instead of skipping → spurious + delta rows for the one-off invoices. Add `if not sub_ext: skip`. + **Remaining before go-live (gated on infra / ops you do):** 1. Grant the read-only DSN (`fusion_billing.nexacloud_dsn`) — see the module README — then Test Connection → dry-run import → review → real import.