SMART Plan — Set currency for the company in Amount Settings
Specific
A Select field labelled "Currency" in the Amounts tab of the Company Settings page. The options list ISO 4217 currency codes (e.g. USD, EUR, GBP). Stores the selected code as a string under the key currency_code, scoped to the current company. The value controls the currency symbol and code shown on invoices and quotes.
Measurable
- The field appears in the Amounts section of the Company Settings page
- Saving the form persists the value to the
settings table with key currency_code and company_id scope
- The value is read back correctly on page reload
Achievable
- Create/extend
Modules/Core/Filament/Company/Pages/CompanySettings.php (Filament page with tabs)
- Add a
Select::make('currency_code')->label('Currency')->options([...ISO 4217 list...]) field to the Amounts tab section
- Add
const CURRENCY_CODE = 'currency_code'; to Modules/Core/Models/Setting.php constants
- Register the page in
CompanyPanelProvider
Relevant
Multi-tenant setups commonly serve companies operating in different countries. Storing a per-company currency code ensures all monetary values are rendered and exported with the correct symbol and ISO code, avoiding confusion on client-facing documents.
Time-bound
Sprint 6.
Arrange · Act · Assert
// Modules/Core/Tests/Feature/CompanySettingsTest.php
#[Test]
public function it_saves_currency_code_setting(): void
{
/* Arrange */
$page = Livewire::actingAs($this->user)
->test(\Modules\Core\Filament\Company\Pages\CompanySettings::class);
/* Act */
$page->set('data.currency_code', 'EUR')
->call('save');
/* Assert */
$page->assertSuccessful();
$this->assertDatabaseHas('settings', [
'company_id' => $this->company->id,
'key' => 'currency_code',
'value' => 'EUR',
]);
}
SMART Plan — Set currency for the company in Amount Settings
Specific
A Select field labelled "Currency" in the Amounts tab of the Company Settings page. The options list ISO 4217 currency codes (e.g. USD, EUR, GBP). Stores the selected code as a string under the key
currency_code, scoped to the current company. The value controls the currency symbol and code shown on invoices and quotes.Measurable
settingstable with keycurrency_codeand company_id scopeAchievable
Modules/Core/Filament/Company/Pages/CompanySettings.php(Filament page with tabs)Select::make('currency_code')->label('Currency')->options([...ISO 4217 list...])field to the Amounts tab sectionconst CURRENCY_CODE = 'currency_code';toModules/Core/Models/Setting.phpconstantsCompanyPanelProviderRelevant
Multi-tenant setups commonly serve companies operating in different countries. Storing a per-company currency code ensures all monetary values are rendered and exported with the correct symbol and ISO code, avoiding confusion on client-facing documents.
Time-bound
Sprint 6.
Arrange · Act · Assert