@extends('layouts.sidebar') @section('content') @php use App\Models\AccountChannel; // Get all AccountChannels with their related properties $accountChannels = AccountChannel::with('property')->where('account_id', request('account_number'))->get(); // Extract the property IDs safely from the related models $propertyIds = $accountChannels ->pluck('property') ->filter() // remove nulls ->pluck('id') // get the actual property IDs ->all(); $startDate = request('start_date'); $endDate = request('end_date'); @endphp
@foreach ($properties as $prop)
{{ $prop->property->property_name ?? 'No Property' }}
@endforeach
Month: {{ \DateTime::createFromFormat('!m', request('month'))->format('F') }}
Year: {{ request('year') }}
Action | Status | Unit | Renters | Previous Reading | Present Reading | Consumption | Total Amount | Percentage of Total Collection | Percentage x Difference = Additonal Consumption | Total | Payable | 0-10 | 11-20 | 21-30 | 31-40 | 41-up | total | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@if ($waterbill->is_approve == null) Pending @else Approved @endif | {{ $waterbill->billing->lease->unit->unit_name ?? 'N/A' }} | {{ $waterbill->billing->lease->client->owners_name ?? 'N/A' }} | {{ $waterbill->previous_reading ?? 'N/A' }} | {{ $waterbill->present_reading ?? 'N/A' }} | {{ number_format($waterbill->consumption, 2) ?? 'N/A' }} | {{ $waterbill->rate ?? 'N/A' }} | {{ number_format($waterbill->amount, 2) ?? 'N/A' }} | @if ($totalWaterAmountpaid > 0) {{ ($waterbill->amount / $totalWaterAmountpaid) * 100 }}% @else 0.00% @endif | N/A | N/A | N/A | {{ isset($details[0]) ? $details[0] : 'N/A' }} | {{ isset($details[1]) ? $details[1] : 'N/A' }} | {{ isset($details[2]) ? $details[2] : 'N/A' }} | {{ isset($details[3]) ? $details[3] : 'N/A' }} | {{ isset($details[4]) ? $details[4] : 'N/A' }} | {{ number_format($amount, 2) ?: 'N/A' }} | |
No data available | ||||||||||||||||||
Total: | {{ $totalWaterAmountpaid }} | 0.00% | 0.00 | 0.00 | 0.00 |
Difference: 0.00