| Field | Value |
|---|---|
| Date | 09 Jun 2026 |
| Status | ✅ Complete |
| GitHub Commit | 97e466a |
The billing engine was grouping CDRs by destination only, merging inbound and outbound into one line item. For Campbell (high inbound volume) this was inflating invoices ~2x. Fix: group by (destination, direction) and skip inbound where inbound_charge_enabled=False.
total_aud was accumulated from cdr.sell_price_aud (set at ingest, potentially stale). Fix: calculate total_aud = unit_price × quantity at billing time.
3,526 CDRs were on International catch-all because they were ingested before destinations were built. Reclassified to correct AU destinations. 483 QLD Traffic zero-duration CDRs marked non-billable.
Prod was on WeasyPrint 62.3 which has a super().transform() bug with Python 3.13. Fixed by pinning weasyprint==69.0 / pydyf==0.12.1 to match dev.
| Period | Total | Invoices |
|---|---|---|
| Feb 2026 | $301.21 | YC-2026-0005 to 0009 |
| Mar 2026 | $249.09 | YC-2026-0010 to 0015 |
| Apr 2026 | $230.66 | YC-2026-0016 to 0019 |
| May 2026 | $269.55 | YC-2026-0020 to 0022 |
| Total | $1,050.51 | 18 invoices |
Backend returns HTTP 409 with owning customer name. Frontend shows inline red error in modal — modal stays open so user can correct the number.