@extends('layouts.default') @section('content') {!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $journal) !!}
Metadata
@foreach($journal->budgets()->get() as $budget) @endforeach @foreach($journal->categories()->get() as $category) @endforeach
Date {{{$journal->date->format('jS F Y')}}}
Type {{{$journal->transactiontype->type}}}
Completed @if($journal->completed == 1) Yes @else No @endif
Budget {{{$budget->name}}}
Category {{{$category->name}}}
@if(count($journal->piggyBankEvents) > 0)
Piggy banks
@include('list.piggy-bank-events',['events' => $journal->piggyBankEvents,'showPiggyBank' => true])
@endif
Related transactions
@if($journal->transactiongroups()->count() == 0)

No related transactions

@else @foreach($journal->transactiongroups()->get() as $group) @foreach($group->transactionjournals()->where('transaction_journals.id','!=',$journal->id)->get() as $jrnl) @endforeach @endforeach
Group #{{$group->id}} ({{$group->relation}})
{{{$jrnl->description}}} @foreach($jrnl->transactions()->get() as $t) @if($t->amount > 0) {!! Amount::formatTransaction($t) !!} @endif @endforeach
@endif
@foreach($journal->transactions as $t)
@if($t->account->accounttype->type == 'Asset account') @endif @if($t->account->accounttype->type == 'Default account') @endif @if($t->account->accounttype->type == 'Expense account') @endif @if($t->account->accounttype->type == 'Beneficiary account') @endif @if($t->account->accounttype->type == 'Revenue account') @endif {{{$t->account->name}}}
{{{$t->account->accounttype->description}}}
@if(!is_null($t->description)) @endif
Amount {!! Amount::formatTransaction($t) !!}
New balance {!! Amount::format($t->before) !!} → {!! Amount::format($t->after) !!}
Description {{{$t->description}}}
@endforeach
@stop @section('scripts') @stop