Working on enabling showing currency code

This commit is contained in:
Hillel Coren 2016-02-04 16:19:49 +02:00
parent 8d69d4334b
commit 8a9eb97134
4 changed files with 6 additions and 1 deletions

View File

@ -861,6 +861,7 @@ class AccountController extends BaseController
$account->currency_id = Input::get('currency_id') ? Input::get('currency_id') : 1; // US Dollar
$account->language_id = Input::get('language_id') ? Input::get('language_id') : 1; // English
$account->military_time = Input::get('military_time') ? true : false;
$account->show_currency_code = Input::get('show_currency_code') ? true : false;
$account->save();
event(new UserSettingsChanged());

View File

@ -290,6 +290,8 @@ class Account extends Eloquent
$countryId = false;
}
$hideSymbol = $this->show_currency_code || $hideSymbol;
return Utils::formatMoney($amount, $currencyId, $countryId, $hideSymbol);
}

View File

@ -1143,5 +1143,5 @@ return array(
'invoice_currency' => 'Invoice Currency',
'enable_https' => 'We strongly recommend using HTTPS to accept credit card details online.',
'quote_issued_to' => 'Quote issued to',
'show_currency_code' => 'Currency Code',
);

View File

@ -6,6 +6,7 @@
{!! Former::open_for_files()->addClass('warn-on-exit') !!}
{{ Former::populate($account) }}
{{ Former::populateField('military_time', intval($account->military_time)) }}
{{ Former::populateField('show_currency_code', intval($account->show_currency_code)) }}
@include('accounts.nav', ['selected' => ACCOUNT_LOCALIZATION])
@ -28,6 +29,7 @@
{!! Former::select('datetime_format_id')->addOption('','')
->fromQuery($datetimeFormats, 'label', 'id') !!}
{!! Former::checkbox('military_time')->text(trans('texts.enable')) !!}
{{-- Former::checkbox('show_currency_code')->text(trans('texts.enable')) --}}
</div>
</div>