@extends('app.master') @section('title',$title) @section('breadcrumb') @include('app.layouts.rent.breadcrumb',[ 'pageTitle' => $title, 'lists' => [ [ 'link' => '#', 'name' => 'Rent Reports', ], [ 'link' => 'rent.reports.statement', 'name' => 'Statement', ] ] ]) @endsection @php $totals = $arrears = [] @endphp @section('content')
@yield('title')
Year
Month
Tenants

@yield('title')

{{ $company['company.name'] }}
@foreach($collections as $head => $name) @php $totals[$head] = $arrears[$head] = 0; @endphp @if(in_array($head, $hasArrear)) @endif @endforeach @foreach($deductions as $head => $name) @php $totals[$head] = $arrears[$head] = 0; @endphp @if(in_array($head, $hasArrear)) @endif @endforeach @php $totalGross = 0; $totalDeduction = 0; @endphp @foreach($rents as $rent) @php $gross = $deduction = 0; @endphp @foreach($collections as $head => $name) @php $gross += $rent->heads->$head->total; $totalGross += $rent->heads->$head->total; $totals[$head] += $rent->heads->$head->amount; $arrears[$head] += $rent->heads->$head->arrear; @endphp @if(in_array($head, $hasArrear)) @endif @endforeach @foreach($deductions as $head => $name) @php $deduction += $rent->heads->$head->total; $gross -= $rent->heads->$head->total; $totalDeduction += $rent->heads->$head->total; $totals[$head] += $rent->heads->$head->amount; $arrears[$head] += $rent->heads->$head->arrear; @endphp @if(in_array($head, $hasArrear)) @endif @endforeach @endforeach @foreach($collections as $head => $name) @if(in_array($head, $hasArrear)) @endif @endforeach @foreach($deductions as $head => $name) @if(in_array($head, $hasArrear)) @endif @endforeach
Sl. Name House Contract Area (S.F) Rent Per S.F{{ $name }}Arrear of {{ $name }}Gross{{ $name }}Arrear of {{ $name }}Total Deduction Net Payable
{{ $loop->index+1 }} {{ $rent->tenant_name }} {{ $rent->house }} {{ $rent->contract_start }} | {{ $rent->contract_end }} {{ $rent->sf }} {{ $rent->ppsf }}{{ $rent->heads->$head->amount }}{{ $rent->heads->$head->arrear }}{{ number_format($gross,2) }}{{ $rent->heads->$head->amount }}{{ $rent->heads->$head->arrear }}{{ number_format($deduction,2) }} {{ number_format($gross,2) }}
Sl. Name House Contract Area (S.F) Rent Per S.F{{ number_format($totals[$head],2) }}{{ number_format($arrears[$head],2) }}{{ number_format($totalGross,2) }}{{ number_format($totals[$head],2) }}{{ number_format($arrears[$head],2) }}{{ number_format($totalDeduction,2) }} {{ number_format($totalGross - $totalDeduction,2) }}
@endsection