1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Merge branch 'bSzala-develop' into develop

This commit is contained in:
Hillel Coren 2016-05-17 10:28:19 +03:00
commit e59bcbd234
4 changed files with 35 additions and 3 deletions

View File

@ -344,7 +344,7 @@ class Utils
$decimal = $currency->decimal_separator;
$precision = $currency->precision;
$code = $currency->code;
$swapSymbol = false;
$swapSymbol = $currency->swap_currency_symbol;
if ($countryId && $currencyId == CURRENCY_EURO) {
$country = self::getFromCache($countryId, 'countries');

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddSwapCurrencySymbolToCurrency extends Migration
{
const TABLE_NAME = 'currencies';
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table(self::TABLE_NAME,function(Blueprint $table){
$table->boolean('swap_currency_symbol')->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table(self::TABLE_NAME,function(Blueprint $table){
$table->dropColumn('swap_currency_symbol');
});
}
}

View File

@ -58,7 +58,7 @@ class CurrenciesSeeder extends Seeder
['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' => '.'],
['name' => 'Polish Zloty', 'code' => 'PLN', 'symbol' => 'zł', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => ','],
['name' => 'Polish Zloty', 'code' => 'PLN', 'symbol' => 'zł', 'precision' => '2', 'thousand_separator' => ' ', 'decimal_separator' => ',', 'swap_currency_symbol' => true],
];
foreach ($currencies as $currency) {

View File

@ -70,7 +70,7 @@
var thousand = currency.thousand_separator;
var decimal = currency.decimal_separator;
var code = currency.code;
var swapSymbol = false;
var swapSymbol = currency.swap_currency_symbol;
if (countryId && currencyId == {{ CURRENCY_EURO }}) {
var country = countryMap[countryId];