mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-18 00:53:10 +01:00
Added Pakistani Rupee
This commit is contained in:
parent
32c912f7b1
commit
5249ae0291
@ -341,6 +341,7 @@ class Utils
|
||||
$currency = self::getFromCache($currencyId, 'currencies');
|
||||
$thousand = $currency->thousand_separator;
|
||||
$decimal = $currency->decimal_separator;
|
||||
$precision = $currency->precision;
|
||||
$code = $currency->code;
|
||||
$swapSymbol = false;
|
||||
|
||||
@ -355,7 +356,7 @@ class Utils
|
||||
}
|
||||
}
|
||||
|
||||
$value = number_format($value, $currency->precision, $decimal, $thousand);
|
||||
$value = number_format($value, $precision, $decimal, $thousand);
|
||||
$symbol = $currency->symbol;
|
||||
|
||||
if ($showCode || !$symbol) {
|
||||
|
@ -8,6 +8,7 @@ class CurrenciesSeeder extends Seeder
|
||||
{
|
||||
Eloquent::unguard();
|
||||
|
||||
// http://www.localeplanet.com/icu/currency.html
|
||||
$currencies = [
|
||||
['name' => 'US Dollar', 'code' => 'USD', 'symbol' => '$', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['name' => 'Pound Sterling', 'code' => 'GBP', 'symbol' => '£', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
@ -56,6 +57,7 @@ class CurrenciesSeeder extends Seeder
|
||||
['name' => 'Japanese Yen', 'code' => 'JPY', 'symbol' => '¥', 'precision' => '0', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['name' => 'Maldivian Rufiyaa', 'code' => 'MVR', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['name' => 'Costa Rican Colón', 'code' => 'CRC', 'symbol' => '', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
['name' => 'Pakistani Rupee', 'code' => 'PKR', 'symbol' => 'Rs ', 'precision' => '0', 'thousand_separator' => ',', 'decimal_separator' => '.'],
|
||||
];
|
||||
|
||||
foreach ($currencies as $currency) {
|
||||
|
@ -66,6 +66,7 @@
|
||||
}
|
||||
|
||||
var currency = currencyMap[currencyId];
|
||||
var precision = currency.precision;
|
||||
var thousand = currency.thousand_separator;
|
||||
var decimal = currency.decimal_separator;
|
||||
var code = currency.code;
|
||||
@ -82,7 +83,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
value = accounting.formatMoney(value, '', 2, thousand, decimal);
|
||||
value = accounting.formatMoney(value, '', precision, thousand, decimal);
|
||||
var symbol = currency.symbol;
|
||||
|
||||
if (hideSymbol) {
|
||||
|
Loading…
Reference in New Issue
Block a user