@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')
| Sl. | Name | House | Contract Period | Area (S.F) | Rent Per S.F | @foreach($collections as $head => $name) @php $totals[$head] = $arrears[$head] = 0; @endphp{{ $name }} | @if(in_array($head, $hasArrear))Arrear of {{ $name }} | @endif @endforeachGross | @foreach($deductions as $head => $name) @php $totals[$head] = $arrears[$head] = 0; @endphp{{ $name }} | @if(in_array($head, $hasArrear))Arrear of {{ $name }} | @endif @endforeachTotal Deduction | Net Payable |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->index+1 }} | {{ $rent->tenant_name }} | {{ $rent->house }} | {{ $rent->contract_start }} To {{ $rent->contract_end }} |
{{ $rent->sf }} | {{ $rent->ppsf }} | @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{!! numberFormat(isset($rent->heads->$head) ? $rent->heads->$head->amount : 0) !!} | @if(in_array($head, $hasArrear)){!! numberFormat(isset($rent->heads->$head) ? $rent->heads->$head->arrear : 0) !!} | @endif @endforeach{!! numberFormat($gross) !!} | @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{!! numberFormat(isset($rent->heads->$head) ? $rent->heads->$head->amount : 0) !!} | @if(in_array($head, $hasArrear)){!! numberFormat(isset($rent->heads->$head) ? $rent->heads->$head->arrear : 0) !!} | @endif @endforeach{!! numberFormat($deduction) !!} | {!! numberFormat($gross) !!} |
| {!! text("Total") !!} | @foreach($collections as $head => $name){!! numberFormat($totals[$head]) !!} | @if(in_array($head, $hasArrear)){!! numberFormat($arrears[$head]) !!} | @endif @endforeach{!! numberFormat($totalGross) !!} | @foreach($deductions as $head => $name){!! numberFormat($totals[$head]) !!} | @if(in_array($head, $hasArrear)){!! numberFormat($arrears[$head]) !!} | @endif @endforeach{!! numberFormat($totalDeduction) !!} | {!! numberFormat($totalGross - $totalDeduction) !!} | |||||