feat(currencies): add Colombian and Dominican peso (#471)

## Summary

Adds **COP** (Colombian Peso) and **DOP** (Dominican Peso) to the
supported currency list for both accounts and user primary currency.

## Compatibility

Both are supported by the conversion API (fawazahmed0 currency-api):
- 1 USD = 3686.83 COP
- 1 USD = 58.74 DOP

No migration needed — `currency_code` columns are plain strings and
validation reads the whitelist from `config/currencies.php`.

## Changes

- `config/currencies.php` — add COP + DOP (primary + account)
- `resources/js/utils/currency.ts` — add `RD$` symbol for DOP
- `tests/Feature/Settings/AccountTest.php` — acceptance tests for both

## Testing

`php artisan test --filter="Colombian|Dominican"` → passing
This commit is contained in:
Víctor Falcón 2026-06-01 18:14:16 +02:00 committed by GitHub
parent f9d1303d98
commit e5b493329a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 51 additions and 6 deletions

View File

@ -86,12 +86,6 @@ return [
'allows_primary' => true,
'allows_account' => true,
],
[
'code' => 'COP',
'name' => 'Colombian Peso',
'allows_primary' => true,
'allows_account' => true,
],
[
'code' => 'PYG',
'name' => 'Paraguayan Guarani',
@ -122,6 +116,18 @@ return [
'allows_primary' => true,
'allows_account' => true,
],
[
'code' => 'COP',
'name' => 'Colombian Peso',
'allows_primary' => true,
'allows_account' => true,
],
[
'code' => 'DOP',
'name' => 'Dominican Peso',
'allows_primary' => true,
'allows_account' => true,
],
[
'code' => 'SAR',
'name' => 'Saudi Riyal',

View File

@ -23,6 +23,7 @@ export function getCurrencySymbol(currencyCode: string): string {
EUR: '€',
GBP: '£',
JPY: '¥',
DOP: 'RD$',
};
return symbols[currencyCode] || currencyCode;
}

View File

@ -132,6 +132,44 @@ it('accepts new latam currency when creating account', function () {
]);
});
it('accepts Colombian peso when creating account', function () {
actingAs($this->user);
$response = $this->post(route('accounts.store'), [
'name' => 'Colombia Account',
'bank_id' => $this->bank->id,
'currency_code' => 'COP',
'type' => AccountType::Checking->value,
]);
$response->assertRedirect();
assertDatabaseHas('accounts', [
'user_id' => $this->user->id,
'bank_id' => $this->bank->id,
'currency_code' => 'COP',
]);
});
it('accepts Dominican peso when creating account', function () {
actingAs($this->user);
$response = $this->post(route('accounts.store'), [
'name' => 'Dominican Account',
'bank_id' => $this->bank->id,
'currency_code' => 'DOP',
'type' => AccountType::Checking->value,
]);
$response->assertRedirect();
assertDatabaseHas('accounts', [
'user_id' => $this->user->id,
'bank_id' => $this->bank->id,
'currency_code' => 'DOP',
]);
});
it('accepts Pakistani rupee when creating account', function () {
actingAs($this->user);