@extends('layouts.app') @section('title', 'Rent Collection') @section('page-title', 'Rent Collection') @section('content')

Rent Collection

Month-by-month collection status for managed rental properties — FY {{ $fyStart->format('Y') }}–{{ $fyStart->copy()->addYear()->format('y') }}
@if(session('success'))
{{ session('success') }}
@endif @php $totalRows = $rows->count(); $issueRows = $rows->where('rowClass', 'table-danger')->count(); $warningRows = $rows->where('rowClass', 'table-warning')->count(); @endphp
{{ $totalRows }}
Managed Properties
{{ $rows->sum('paidCount') }}
Collected (FY)
{{ $issueRows }}
Need Attention
{{ $warningRows }}
Overdue Previous Month
{{-- Legend --}}
Red — Current month unpaid (past 5th) Amber — Previous month unpaid Collected Not Collected Not Marked
@forelse($rows as $row) @php /** @var \App\Models\LeadAgreement $agr */ $agr = $row['agreement']; $property = $agr->property; $client = $agr->lead && $agr->lead->requirement ? $agr->lead->requirement->client : null; $statusBadge = [ 'collected' => ['bg-success bg-opacity-10 text-success', 'Collected'], 'not_collected' => ['bg-danger bg-opacity-10 text-danger', 'Not Collected'], 'not_marked' => ['bg-secondary bg-opacity-10 text-secondary', 'Not Marked'], ]; [$badgeCls, $badgeLabel] = $statusBadge[$row['thisStatus']] ?? $statusBadge['not_marked']; @endphp @empty @endforelse
Property Owner Tenant Agreement Period {{ $thisMonth->format('M Y') }} Paid (FY) Unpaid (FY) Actions
@if($property) {{ $property->title }} @if($property->city)
{{ $property->city }}
@endif @else @endif
@if($property && $property->owner) {{ $property->owner->name }} @else {{ $agr->owner_name ?: '—' }} @endif @if($client) {{ $client->full_name }} @else {{ $agr->client_name ?: '—' }} @endif {{ $agr->agreement_start_date ? $agr->agreement_start_date->format('d M Y') : '—' }} — {{ $agr->agreement_end_date ? $agr->agreement_end_date->format('d M Y') : '—' }} {{ $badgeLabel }} {{ $row['paidCount'] }} {{ $row['unpaidCount'] }} @if($property) Checklist @endif
No managed properties with active tenants found.
Mark a rental property as Managed by {{ \App\Models\AppSetting::get('company_name', 'Agrawal Properties') }} on its detail page.
@endsection