aec14f0ca7
SendInvoiceDialog and PaymentBookingDialog called .single() on company_settings without a company_id filter, relying on RLS to narrow the result. RLS uses user_company_ids() which returns every company the user can access, so multi-company users (including team members) got multiple rows back and PostgREST returned 406. Filter explicitly by the active company and use maybeSingle() so a missing row falls back to defaults. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>