SMART Plan — Number Format (Decimal/Thousands Separator)
Specific
A Select field labelled "Number Format" in the Amounts tab of the Company Settings page (Modules/Core/Filament/Company/Pages/CompanySettings.php). Reuses the exact same 6 options and translation keys as the existing global admin setting. Stores the selected value as a string under Setting::KEY_NUMBER_FORMAT = 'number_format', scoped to the current company (overriding, not replacing, the global admin default).
The 6 format options are:
- US/UK:
1,000,000.00
- European:
1.000.000,00
- ISO 80K1 Point:
1000000.00
- ISO 80K1 Comma:
1000000,00
- Compact Point:
1,000,000.00 (compact style)
- Compact Comma:
1,000,000.00 (compact style)
Measurable
- The field appears in the Company Settings page with all 6 existing format options
- Saving persists the value to
settings with key number_format and company_id scope
- The value is read back correctly on page reload
- Falls back to the global admin
settings.number_format value when the company hasn't set an override
Achievable
- Add
public const KEY_NUMBER_FORMAT = 'number_format'; to Modules/Core/Models/Setting.php
- Add the
Select field to CompanySettings.php, reusing the existing 6 number_format_* translation keys already in resources/lang/en/ip.php (don't duplicate them)
- Add
Setting::KEY_NUMBER_FORMAT to CompanySettings::allKeys()
Relevant
Companies operating in different locales expect amounts formatted the way their customers read them; this is the direct company-level counterpart to the already-existing global admin setting.
Time-bound
Small — same shape as date_format/time_format: 1 field + 1 constant, reusing existing translations. No number-rendering-pipeline work in scope.
Test Plan
CompanySettingsTest: save-then-reload round trip for number_format
CompanySettingsTest: multi-tenancy — company A's setting doesn't leak into company B
CompanySettingsTest: unset company setting falls back to the global admin default
Implementation Notes
Scope note: This plan covers persisting the per-company override. Actually applying it (making every number_format() call site — invoice PDFs, item tables, dashboard totals — read the resolved company/global setting instead of hardcoding separators) is comparable-sized follow-on work spanning multiple modules (Invoices, Quotes, Core) and is better tracked as its own issue.
Code references:
- Existing global admin setting:
Modules/Core/Filament/Admin/Pages/Settings.php:188-198
- Translation keys:
resources/lang/en/ip.php (number_format_us_uk, number_format_european, etc.)
- Company settings page:
Modules/Core/Filament/Company/Pages/CompanySettings.php
SMART Plan — Number Format (Decimal/Thousands Separator)
Specific
A
Selectfield labelled "Number Format" in the Amounts tab of the Company Settings page (Modules/Core/Filament/Company/Pages/CompanySettings.php). Reuses the exact same 6 options and translation keys as the existing global admin setting. Stores the selected value as a string underSetting::KEY_NUMBER_FORMAT = 'number_format', scoped to the current company (overriding, not replacing, the global admin default).The 6 format options are:
1,000,000.001.000.000,001000000.001000000,001,000,000.00(compact style)1,000,000.00(compact style)Measurable
settingswith keynumber_formatandcompany_idscopesettings.number_formatvalue when the company hasn't set an overrideAchievable
public const KEY_NUMBER_FORMAT = 'number_format';toModules/Core/Models/Setting.phpSelectfield toCompanySettings.php, reusing the existing 6number_format_*translation keys already inresources/lang/en/ip.php(don't duplicate them)Setting::KEY_NUMBER_FORMATtoCompanySettings::allKeys()Relevant
Companies operating in different locales expect amounts formatted the way their customers read them; this is the direct company-level counterpart to the already-existing global admin setting.
Time-bound
Small — same shape as
date_format/time_format: 1 field + 1 constant, reusing existing translations. No number-rendering-pipeline work in scope.Test Plan
CompanySettingsTest: save-then-reload round trip fornumber_formatCompanySettingsTest: multi-tenancy — company A's setting doesn't leak into company BCompanySettingsTest: unset company setting falls back to the global admin defaultImplementation Notes
Scope note: This plan covers persisting the per-company override. Actually applying it (making every
number_format()call site — invoice PDFs, item tables, dashboard totals — read the resolved company/global setting instead of hardcoding separators) is comparable-sized follow-on work spanning multiple modules (Invoices, Quotes, Core) and is better tracked as its own issue.Code references:
Modules/Core/Filament/Admin/Pages/Settings.php:188-198resources/lang/en/ip.php(number_format_us_uk,number_format_european, etc.)Modules/Core/Filament/Company/Pages/CompanySettings.php