1 Commits

Author SHA1 Message Date
admin 6f68619b9c Bill approvals: backfill imported bills' approvers + auto-create on import
Approved/paid bills that never went through in-app approval (imports, bulk
loads) had no approver row, so the Approvers column was blank. Backfill a
synthetic approver: 'Imported' for system imports (created_by null), the
creator's name (fallback 'Direct entry') for in-app entries. Adds an AFTER
INSERT trigger so future imported-as-approved/paid bills get one too.
Applied to prod: +1,140 rows, 0 approved/paid bills now missing an approver.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 13:52:19 -04:00