@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' => $title, ] ] ]) @endsection @php $totals = $arrears = []; $year = request()->year ?? date('Y'); $month = request()->month ?? (int)date('m'); $period = date('F',strtotime($month)).' '.$year; $fileName = str_replace(' ','_',$title).'_'.str_replace(' ','_',$period); $companyLogo = asset($company['company.logo']); $companyFooterLogo = getBase64($company['company.footerLogo']); @endphp @section('content')
@yield('title')
Year
Month
Tenants

@yield('title')

{{ $company['company.name'] }}
@if(!in_array($company['company.logo'],['','undefined'])) @endif @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 += isset($rent->heads->$head) ? $rent->heads->$head->total : 0; $totalGross += isset($rent->heads->$head) ? $rent->heads->$head->total : 0; $totals[$head] += isset($rent->heads->$head) ? $rent->heads->$head->amount : 0; $arrears[$head] += isset($rent->heads->$head) ? $rent->heads->$head->arrear : 0; @endphp @if(in_array($head, $hasArrear)) @endif @endforeach @foreach($deductions as $head => $name) @php $deduction += isset($rent->heads->$head) ? $rent->heads->$head->total : 0; $gross -= isset($rent->heads->$head) ? $rent->heads->$head->total : 0; $totalDeduction += isset($rent->heads->$head) ? $rent->heads->$head->total : 0; $totals[$head] += isset($rent->heads->$head) ? $rent->heads->$head->amount : 0; $arrears[$head] += isset($rent->heads->$head) ? $rent->heads->$head->arrear : 0; @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
Company: {{ $company['company.name'] }}
Report: {{ $title }}
Period: {{ $period }}
Sl. Name House Contract Period 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 }} To
{{ $rent->contract_end }}
{{ $rent->sf }} {{ $rent->ppsf }}{!! numberFormat(isset($rent->heads->$head) ? $rent->heads->$head->amount : 0) !!}{!! numberFormat(isset($rent->heads->$head) ? $rent->heads->$head->arrear : 0) !!}{!! numberFormat($gross) !!}{!! numberFormat(isset($rent->heads->$head) ? $rent->heads->$head->amount : 0) !!}{!! numberFormat(isset($rent->heads->$head) ? $rent->heads->$head->arrear : 0) !!}{!! numberFormat($deduction) !!} {!! numberFormat($gross) !!}
{!! text("Total") !!}{!! numberFormat($totals[$head]) !!}{!! numberFormat($arrears[$head]) !!}{!! numberFormat($totalGross) !!}{!! numberFormat($totals[$head]) !!}{!! numberFormat($arrears[$head]) !!}{!! numberFormat($totalDeduction) !!} {!! numberFormat($totalGross - $totalDeduction) !!}
Export to Excel
@endsection