@if($AuthCheck && (count($pirep->fares) > 0 || count($pirep->transactions) > 0))
@foreach($pirep->fares->sortBy('count', SORT_NATURAL) as $fare) @endforeach
@lang('pireps.class') @lang('pireps.count')
{{ optional($fare)->name.' ('.optional($fare)->code.')' }} {{ $fare->count }} @if(filled($fare) && $fare->type === 1) {{ $units['weight'] }} @else pax @endif
@foreach($pirep->transactions->where('journal_id', $pirep->airline->journal->id) as $entry) @endforeach
Items Credit Debit
{{ $entry->memo }} @if($entry->credit){{ money($entry->credit, $units['currency']) }}@endif @if($entry->debit){{ money($entry->debit, $units['currency']) }}@endif
@php $p_credit = $pirep->transactions->where('journal_id', $pirep->airline->journal->id)->sum('credit'); $p_debit = $pirep->transactions->where('journal_id', $pirep->airline->journal->id)->sum('debit'); $p_balance = $p_credit - $p_debit; @endphp {{ money($p_credit, $units['currency']) }} {{ money($p_debit, $units['currency']) }}
@endif