@extends('layouts.app') @section('content')
{{ __('Balance Sheet') }}
@if (session('status')) @endif
{{$companyDetails->taxpayer}}
United Arab Emirates
Statement of Financial Position
@php $headTotal = 0; @endphp @foreach($bs_template as $heads) @php $bsTemplateArray[$heads->name] = array(); @endphp @php $SubHeadTotal = 0; @endphp @foreach($heads->innerData as $subhead) @php $bsTemplateArray[$heads->name][] = $subhead->name; @endphp @php $TitleTotal = 0; @endphp @foreach($subhead->innerData as $title) @php $bsTemplateArray[$heads->name][$subhead->name][] = $title->name; @endphp @php $entryTotal = 0; @endphp @foreach($title->innerData as $entry) @if(count($entry->report) > 0) @php $entryCurrentAmount = $entry->getValue($id,$entry->report->all(),$companyDetails->id); @endphp @if($entryCurrentAmount) @endif @php $entryTotal += $entryCurrentAmount; @endphp @endif @php $bsTemplateArray[$heads->name][$subhead->name][$title->name][] = $entry->name; @endphp @if($entry->is_total == 1) @endif @endforeach @php $TitleTotal += $entryTotal; @endphp @if($title->is_total == 1) @endif @endforeach @php $SubHeadTotal += $TitleTotal; @endphp @if($subhead->is_total == 1) @endif @endforeach @php $headTotal = $SubHeadTotal; @endphp @if($heads->is_total == 1) @endif @endforeach
Amount
{{$heads->name}}
{{$subhead->name}}
{{$title->name}}
{{$entry->report->first()->reportableable->name}} {{$entryCurrentAmount}}
Total {{$entry->name}}
Total {{$title->name}} {{$TitleTotal}}
Total {{$subhead->name}} {{$SubHeadTotal}}
Total {{$heads->name}} {{$headTotal}}
@endsection