Change currency from settings #671 (#672)

This commit is contained in:
Nabeel S
2020-04-26 11:55:20 -04:00
committed by GitHub
parent 03cfc648b0
commit 99f4f3b3d8
15 changed files with 63 additions and 29 deletions

View File

@@ -23,13 +23,7 @@ return [
// Overrides config/phpvms.php
'phpvms' => [
/**
* The ISO "Currency Code" to use, the list is in config/money.php
*
* Note, do not change this after you've set it, unless you don't
* care that the currencies aren't "exchanged" into the new format
*/
'currency' => 'USD',
],
//

View File

@@ -14,7 +14,7 @@
@if(count($aircraft->expenses) > 0)
<thead>
<th>Name</th>
<th>Cost&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
<th>Cost&nbsp;<span class="small">{{ currency(setting('units.currency')) }}</span></th>
<th>Type</th>
<th></th>
</thead>

View File

@@ -11,7 +11,7 @@
@if(count($airport->expenses))
<thead>
<th>Name</th>
<th>Cost&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
<th>Cost&nbsp;<span class="small">{{ currency(setting('units.currency')) }}</span></th>
<th>Type</th>
<th></th>
</thead>

View File

@@ -7,12 +7,12 @@
<td>{{ $entry->memo }}</td>
<td>
@if($entry->credit)
{{ money($entry->credit, config('phpvms.currency')) }}
{{ money($entry->credit, setting('units.currency')) }}
@endif
</td>
<td>
@if($entry->debit)
{{ money($entry->debit, config('phpvms.currency')) }}
{{ money($entry->debit, setting('units.currency')) }}
@endif
</td>
</tr>

View File

@@ -37,6 +37,12 @@
list_to_assoc($themes),
$setting->value,
['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) }}
@elseif($setting->id === 'units_currency')
{{ Form::select(
$setting->id,
$currencies,
$setting->value,
['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) }}
@else
{{ Form::select(
$setting->id,

View File

@@ -10,7 +10,7 @@
@if(count($subfleet->expenses))
<thead>
<th>Name</th>
<th>Cost&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
<th>Cost&nbsp;<span class="small">{{ currency(setting('units.currency', 'USD')) }}</span></th>
<th>Type</th>
<th></th>
</thead>