Most views now show the transaction the current journal/transaction is set in, even if it's not the current default currency. See issue #37

This commit is contained in:
James Cole
2014-12-30 06:30:20 +01:00
parent 89363ecfa3
commit c0c37eec7b
9 changed files with 208 additions and 143 deletions

View File

@@ -58,13 +58,13 @@
</td>
<td>
@if($journal->transactiontype->type == 'Withdrawal')
<span class="text-danger">{{mf($journal->transactions[1]->amount,false)}}</span>
<span class="text-danger">{{mft($journal->transactions[1],false)}}</span>
@endif
@if($journal->transactiontype->type == 'Deposit')
<span class="text-success">{{mf($journal->transactions[1]->amount,false)}}</span>
<span class="text-success">{{mft($journal->transactions[1],false)}}</span>
@endif
@if($journal->transactiontype->type == 'Transfer')
<span class="text-info">{{mf($journal->transactions[1]->amount,false)}}</span>
<span class="text-info">{{mft($journal->transactions[1],false)}}</span>
@endif
</td>
<td>

View File

@@ -9,13 +9,13 @@
<td>
<?php $tableSum += floatval($journal->transactions[1]->amount);?>
@if($journal->transactiontype->type == 'Withdrawal')
<span class="text-danger">{{mf($journal->transactions[1]->amount,false)}}</span>
<span class="text-danger">{{mft($journal->transactions[1],false)}}</span>
@endif
@if($journal->transactiontype->type == 'Deposit')
<span class="text-success">{{mf($journal->transactions[1]->amount,false)}}</span>
<span class="text-success">{{mft($journal->transactions[1],false)}}</span>
@endif
@if($journal->transactiontype->type == 'Transfer')
<span class="text-info">{{mf($journal->transactions[1]->amount,false)}}</span>
<span class="text-info">{{mft($journal->transactions[1],false)}}</span>
@endif
</td>
<td>

View File

@@ -18,13 +18,13 @@
@if(isset($account))
@foreach($journal->transactions as $index => $t)
@if($t->account_id == $account->id)
{{mf($t->amount)}}
{{mft($t)}}
@endif
@endforeach
@else
@foreach($journal->transactions as $index => $t)
@if($index == 0)
{{mf($t->amount)}}
{{mft($t)}}
@endif
@endforeach
@endif

View File

@@ -74,7 +74,7 @@
<tr>
<td><input type="checkbox" checked="checked" data-relatedto="{{$journal->id}}" data-id="{{$jrnl->id}}" class="unrelate-checkbox" /></td>
<td><a href="#">{{{$jrnl->description}}}</a></td>
<td>{{mf($jrnl->getAmount())}}</td>
<td>{{mfj($jrnl, $jrnl->getAmount())}}</td>
</tr>
@endforeach
</table>
@@ -97,7 +97,7 @@
<table class="table table-striped table-bordered">
<tr>
<td>Amount</td>
<td>{{mf($t->amount)}}</td>
<td>{{mft($t)}}</td>
</tr>
<tr>
<td>New balance</td>