@extends('layouts.app') @section('content')
{{ __('Profit Loss') }}
@if (session('status')) @endif
@php $headingArray = array(); @endphp @foreach($pl_template as $templates) @php $headingArray[] = $templates->name; @endphp @php $totalamount = 0; @endphp @foreach($templates->innerData as $template) @if(count($template->report) > 0) @if($template->getValue($id,$template->report[0],$companyDetails->id)) @php $totalamount += $template->getValue($id,$template->report[0],$companyDetails->id); @endphp @endif @endif @endforeach @php $headingArray[$templates->name] = $totalamount; @endphp @if($loop->iteration == 2) @php $grossProfit = $headingArray['Revenue'] - $headingArray['Cost of revenue']; @endphp @endif @if($loop->iteration == 5) @php $operatingProfit = $grossProfit - $headingArray['Administrative & general expenses'] - $headingArray['Management remunerations'] - $headingArray['Depreciation - indirect']; @endphp @endif @if($loop->iteration == $loop->last) @endif @endforeach
{{$companyDetails->taxpayer}}
United Arab Emirates

Statement of Total Comprehensive Income

Amount
{{$templates->name}}
{{$template->name}} {{$template->getValue($id,$template->report[0],$companyDetails->id)}}
Gross profit {{$grossProfit}}
Operating profit {{$operatingProfit}}
Net profit/(loss) for the year {{$operatingProfit - $headingArray['Finance cost'] + $headingArray['Other income']}}
@endsection