{{-- HEADER --}}
@include('templates.pdf_header', [
'organisation' => $organisation,
'title' => 'Income Statement',
'currency_code' => $currency
])
| Particulars |
Amount ({{ $currency }}) |
{{-- REPORT SECTIONS --}}
@foreach($data as $section)
{{-- SECTION HEADER --}}
{{-- SUBCATEGORIES --}}
@foreach($section->subcategories as $subcat)
| {{ $subcat->name }} |
{{ number_format($subcat->total ?? 0, 2) }}
|
@endforeach
@php
$total = $section->group_total ?? 0;
$isProfit = $total >= 0;
$currency = $currency ?? '';
@endphp
| Net Total |
{{ $isProfit
? $currency . ' ' . number_format($total, 2)
: '(' . $currency . ' ' . number_format(abs($total), 2) . ')'
}}
|
@endforeach