2014-12-25 02:50:01 -06:00
|
|
|
<table class="table table-bordered">
|
2014-12-26 14:08:44 -06:00
|
|
|
<?php $tableSum = 0;?>
|
2014-12-25 02:50:01 -06:00
|
|
|
@foreach($journals as $journal)
|
2014-12-26 14:08:44 -06:00
|
|
|
|
2014-12-25 02:50:01 -06:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href="{{route('transactions.show',$journal->id)}}" title="{{{$journal->description}}}">{{{$journal->description}}}</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
2014-12-26 14:08:44 -06:00
|
|
|
<?php $tableSum += floatval($journal->transactions[1]->amount);?>
|
2014-12-25 02:50:01 -06:00
|
|
|
@if($journal->transactiontype->type == 'Withdrawal')
|
2014-12-29 23:30:20 -06:00
|
|
|
<span class="text-danger">{{mft($journal->transactions[1],false)}}</span>
|
2014-12-25 02:50:01 -06:00
|
|
|
@endif
|
|
|
|
@if($journal->transactiontype->type == 'Deposit')
|
2014-12-29 23:30:20 -06:00
|
|
|
<span class="text-success">{{mft($journal->transactions[1],false)}}</span>
|
2014-12-25 02:50:01 -06:00
|
|
|
@endif
|
|
|
|
@if($journal->transactiontype->type == 'Transfer')
|
2014-12-29 23:30:20 -06:00
|
|
|
<span class="text-info">{{mft($journal->transactions[1],false)}}</span>
|
2014-12-25 02:50:01 -06:00
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{{$journal->date->format('j F Y')}}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
@if($journal->transactions[1]->account->accounttype->description == 'Cash account')
|
|
|
|
<span class="text-success">(cash)</span>
|
|
|
|
@else
|
|
|
|
<a href="{{route('accounts.show',$journal->transactions[1]->account_id)}}">{{{$journal->transactions[1]->account->name}}}</a>
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
2014-12-26 14:08:44 -06:00
|
|
|
@if(isset($displaySum) && $displaySum === true)
|
|
|
|
<tr>
|
|
|
|
<td><em>Sum</em></td>
|
|
|
|
<td colspan="3">{{mf($tableSum)}}</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
@endif
|
2014-12-25 02:50:01 -06:00
|
|
|
</table>
|