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