@if(isset($data['journalEntries']) )
| @lang('reports::reports.journal_report.journal_date') | @lang('reports::reports.journal_report.transaction_type') | @lang('reports::reports.journal_number') | @lang('reports::reports.journal_report.journal_description') | @lang('reports::reports.account') | @lang('reports::reports.reference_name') | @lang('reports::reports.debit') | @lang('reports::reports.credit') | |
|---|---|---|---|---|---|---|---|---|
| {{ $journalEntry['journal_date'] }} | {{ $journalEntry['transaction_type'] }} | {{ $journalEntry['code'] }} | {{ $journalEntry['description'] }} | {{ (@$journalEntry['journalRecords'][0]->account) ? $journalEntry['journalRecords'][0]->account->name : ''}} | {{-- if supplier is null then it must be customer, so check if the first operand is null it will get the second --}}@if(@$journalEntry['journalRecords'][0]->supplier) {{$journalEntry['journalRecords'][0]->supplier->name}} @elseif(@$journalEntry['journalRecords'][0]->customer) {{$journalEntry['journalRecords'][0]->customer->name}} @endif | {{-- THIS IN THE SERVICE ... COST A NESTED LOOP TO JUST GET THE CREDIT AND DEBIT, why not just do it in the view ??? --}} {{--{{ $journalEntry['journalRecords'][0]->description}} | --}}{{ number_format(@$journalEntry['journalRecords'][0]->debit ?? 0 ,2)}} | {{ number_format(@$journalEntry['journalRecords'][0]->credit ?? 0,2)}} |
| last) rowspan="2" @endif>{{ ($journalRecord->account)?$journalRecord->account->name:''}} | {{-- if supplier is null then it must be customer, so check if the first operand is null it will get the second --}}last) rowspan="2" @endif> @if($journalRecord->supplier) {{$journalRecord->supplier->name}} @elseif($journalRecord->customer) {{$journalRecord->customer->name}} @endif | {{-- THIS IN THE SERVICE ... COST A NESTED LOOP TO JUST GET THE CREDIT AND DEBIT, why not just do it in the view ??? --}} {{--last) rowspan="2" @endif>{{ $journalRecord->description}} | --}}{{ number_format($journalRecord->debit, 2)}} | {{ number_format($journalRecord->credit, 2)}} | ||||
| {{ $journalEntry['totalDebit'] }} | {{ $journalEntry['totalCredit'] }} | |||||||
| @lang('reports::reports.journal_report.total') | {{ number_format($data['totalDebit'], 2) }} | {{ number_format($data['totalCredit'], 2) }} |