@extends('layouts.report') @section('content') @if(isset($reportData))
@if(isset($reportData['business']))

@capitalize($reportData['business'])

@endif

Profit and loss (by month)

@if(isset($reportData['from_date']) && isset($reportData['to_date']))

From: @date($reportData['from_date']) - To: @date($reportData['to_date'])

@endif
@if($reportData['data']) @foreach ($reportData['data']['header'] as $headerRow) @foreach($headerRow['data'] as $key => $value) @endforeach @endforeach @foreach ($reportData['data']['body'] as $bodyRow) @foreach($bodyRow['data'] as $key => $value) @endforeach @if(isset($bodyRow['children'])) @foreach($bodyRow['children'] as $subRow) @if($subRow['data'][13] != 0) @foreach($subRow['data'] as $key => $value) @endforeach @endif @endforeach @endif @endforeach @foreach ($reportData['data']['footer'] as $footerRow) @foreach($footerRow['data'] as $key => $value) @endforeach() @endforeach
{{$headerRow['name']}}{{ $value }}
{{ $bodyRow['name'] }} @currency($value)
{{ $subRow['name'] }} @currency($value)
{{ $footerRow['name'] }} @currency($value)
@endif
@endif @endsection