- Cast erp_active_users (and requires_approval, is_active) to int before INSERT/UPDATE so empty string '' doesn't fail the INT column - Fix error redirect for new company: was /admin/companies/new (404), now /admin/company/edit (the actual new-company route) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>