@if(file_exists(public_path('logo/sulis.jpg'))) @endif

BLOCK REPORT

Property: {{ $property->PropertyName }}

Location: {{ $property->City ?? 'N/A' }}

Block: {{ $block->BlockName }} ({{ $block->BlockCode }})

Generated: {{ now()->format('M j, Y h:i A') }}

Block Information & Occupancy Overview

Block Details

Block Name: {{ $block->BlockName }}
Block Code: {{ $block->BlockCode }}
Floors: {{ $block->Floors }}
Total Units: {{ $total_units }}

Occupancy Overview

Occupied: {{ $units->where('OccupationStatus', 'Occupied')->count() }} ({{ $total_units > 0 ? number_format(($units->where('OccupationStatus', 'Occupied')->count() / $total_units) * 100, 1) : 0 }}%)
Vacant: {{ $units->where('OccupationStatus', 'Vacant')->count() }} ({{ $total_units > 0 ? number_format(($units->where('OccupationStatus', 'Vacant')->count() / $total_units) * 100, 1) : 0 }}%)
Under Maintenance: {{ $units->where('OccupationStatus', 'Under Maintenance')->count() }} ({{ $total_units > 0 ? number_format(($units->where('OccupationStatus', 'Under Maintenance')->count() / $total_units) * 100, 1) : 0 }}%)
Financial Overview
Total Billed
Ksh {{ number_format($paymentSummary['total_billed'] ?? 0, 2) }}
Total Received
Ksh {{ number_format($paymentSummary['total_paid'] ?? 0, 2) }}
Pending Payments
{{ $paymentSummary['pending_payments'] ?? 0 }} bills
@if(isset($recentPayments) && count($recentPayments) > 0)
RECENT PAYMENTS
@foreach($recentPayments as $payment) @endforeach
Date Unit Amount Receipt #
{{ \Carbon\Carbon::parse($payment->PaymentDate)->format('M j, Y') }} {{ $payment->UnitIdentity ?? 'N/A' }} Ksh {{ number_format($payment->TotalPayment, 2) }} {{ $payment->ReceiptNo ?? 'N/A' }}
@endif
Block Statistics
Occupancy Rate {{ number_format($occupancyRate, 1) }}%
{{ $occupiedUnits ?? 0 }} of {{ $total_units }} units occupied
Total Units
{{ $total_units }}
Occupied Units
{{ $occupiedUnits ?? 0 }}
Vacant Units
{{ $total_units - ($occupiedUnits ?? 0) }}
Unit Directory
@foreach($units as $unit) @endforeach
Unit ID Unit Name Floor Status Monthly Rent Details
{{ $unit->UnitID }} {{ $unit->UnitIdentity }} {{ $unit->FloorNo }} @php $statusClass = match($unit->OccupationStatus) { 'Occupied' => 'status-occupied', 'Vacant' => 'status-vacant', 'Under Maintenance' => 'status-maintenance', default => '' }; @endphp {{ $unit->OccupationStatus }} KSh {{ number_format($unit->MonthlyRent, 2) }} @if($unit->UnitDesc)
{{ Str::limit($unit->UnitDesc, 50) }}
@else No description @endif