From ba3873ab85d20a0e2e6c0775434ecc0dec5bfc24 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 23 Jul 2023 09:49:58 +1000 Subject: [PATCH] Updates for currencies --- ..._currency_format_for_indonesian_rupiah.php | 34 +++++++++++++++++++ database/seeders/CurrenciesSeeder.php | 4 ++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2023_07_22_234329_change_currency_format_for_indonesian_rupiah.php diff --git a/database/migrations/2023_07_22_234329_change_currency_format_for_indonesian_rupiah.php b/database/migrations/2023_07_22_234329_change_currency_format_for_indonesian_rupiah.php new file mode 100644 index 000000000000..643813468287 --- /dev/null +++ b/database/migrations/2023_07_22_234329_change_currency_format_for_indonesian_rupiah.php @@ -0,0 +1,34 @@ +first(); + + if($ir){ + $ir->thousand_separator = '.'; + $ir->decimal_separator = ','; + $ir->save(); + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}; diff --git a/database/seeders/CurrenciesSeeder.php b/database/seeders/CurrenciesSeeder.php index 82d92b6595b7..49ecce7e9d43 100644 --- a/database/seeders/CurrenciesSeeder.php +++ b/database/seeders/CurrenciesSeeder.php @@ -49,7 +49,7 @@ class CurrenciesSeeder extends Seeder ['id' => 24, 'name' => 'Bangladeshi Taka', 'code' => 'BDT', 'symbol' => 'Tk', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 25, 'name' => 'United Arab Emirates Dirham', 'code' => 'AED', 'symbol' => 'DH ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 26, 'name' => 'Hong Kong Dollar', 'code' => 'HKD', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], - ['id' => 27, 'name' => 'Indonesian Rupiah', 'code' => 'IDR', 'symbol' => 'Rp', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], + ['id' => 27, 'name' => 'Indonesian Rupiah', 'code' => 'IDR', 'symbol' => 'Rp', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','], ['id' => 28, 'name' => 'Mexican Peso', 'code' => 'MXN', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 29, 'name' => 'Egyptian Pound', 'code' => 'EGP', 'symbol' => 'E£', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 30, 'name' => 'Colombian Peso', 'code' => 'COP', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => '.', 'decimal_separator' => ','], @@ -136,6 +136,8 @@ class CurrenciesSeeder extends Seeder ['id' => 111, 'name' => 'Cuban Peso', 'code' => 'CUP', 'symbol' => '₱', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 112, 'name' => 'Cayman Island Dollar', 'code' => 'KYD', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], ['id' => 113, 'name' => 'Swazi lilangeni', 'code' => 'SZL', 'symbol' => 'E', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], + ['id' => 114, 'name' => 'BZ Dollar', 'code' => 'BZD', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'], + ['id' => 115, 'name' => 'Libyan Dinar', 'code' => 'LYD', 'symbol' => 'LD', 'precision' => '3', 'thousand_separator' => ',', 'decimal_separator' => '.'], ]; foreach ($currencies as $currency) {