From 899ea6a939787e567a41566aeb6fbeee6885600d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Falc=C3=B3n?= Date: Mon, 8 Jun 2026 09:18:17 +0200 Subject: [PATCH] feat(currency): add NZD (New Zealand Dollar) (#504) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What Add New Zealand Dollar (NZD) as a supported currency. ## Compatibility Conversion provider `@fawazahmed0/currency-api` covers NZD (standard ISO 4217). Conversion service lowercases codes and fetches `nzd.min.json` — same path AUD uses. `exchange_rates` table stores rates as JSON, so any 3-letter code works. Validation rules and Inertia currency props auto-derive from config via `CurrencyOptions`. ## Changes - `config/currencies.php` — NZD entry (`allows_primary` + `allows_account`) - `resources/js/utils/currency.ts` — `NZ$` symbol - `lang/es.json` — Spanish translation (name passes through `__()`) ## Tests Currency + translation suites pass. --- config/currencies.php | 6 ++++++ lang/es.json | 1 + resources/js/utils/currency.ts | 1 + 3 files changed, 8 insertions(+) diff --git a/config/currencies.php b/config/currencies.php index 13e5f44b..76fc241d 100644 --- a/config/currencies.php +++ b/config/currencies.php @@ -44,6 +44,12 @@ return [ 'allows_primary' => true, 'allows_account' => true, ], + [ + 'code' => 'NZD', + 'name' => 'New Zealand Dollar', + 'allows_primary' => true, + 'allows_account' => true, + ], [ 'code' => 'CNY', 'name' => 'Chinese Yuan', diff --git a/lang/es.json b/lang/es.json index bcc994c6..4d0c63ee 100644 --- a/lang/es.json +++ b/lang/es.json @@ -976,6 +976,7 @@ "Neutral": "Neutro", "Never": "Nunca", "New": "Nuevo", + "New Zealand Dollar": "Dólar neozelandés", "New password": "Nueva contraseña", "New transactions from connected banks": "Nuevas transacciones de bancos conectados", "New transactions synced, :name!": "¡Nuevas transacciones sincronizadas, :name!", diff --git a/resources/js/utils/currency.ts b/resources/js/utils/currency.ts index 47526853..739a6cdf 100644 --- a/resources/js/utils/currency.ts +++ b/resources/js/utils/currency.ts @@ -23,6 +23,7 @@ export function getCurrencySymbol(currencyCode: string): string { EUR: '€', GBP: '£', JPY: '¥', + NZD: 'NZ$', DOP: 'RD$', }; return symbols[currencyCode] || currencyCode;