Files
autocrm/app/Models/Tenant
Vasyka 6de9c615f7 fix(injector-protocols): derive protocol prefix from tenant slug (not hardcoded PS)
'PS' was baked in — wrong for multi-tenant. Now:
  1. Honor $tenant->settings['protocol_prefix'] if set
  2. Else use uppercase first 2 chars of tenant slug
     ('psauto' → 'PS', 'autoplus' → 'AP', 'plusrepair' → 'PL')
  3. Fallback 'PR' if no tenant resolvable

Format changed from 'PS-{companyId}-{year}-{seq}' to '{PREFIX}-{year}-{seq}'
— dropped the redundant companyId since prefix already identifies the
tenant contextually.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-07-26 11:52:14 +00:00
..