@extends('layouts.app') @section('content')

Billing Summary by Court/Tenant Report (Electricity Charges) - {{ $billingPeriod }}

Export PDF
@foreach($lineDescriptions as $description) @endforeach @foreach($customerTotals as $customer) @foreach($lineDescriptions as $id => $desc) @php $amount = $customer['lines'][$id]['amount'] ?? 0; $cellClass = $amount > 0 ? 'text-end' : 'text-end text-muted'; @endphp @endforeach @endforeach @if($customerTotals->currentPage() === $customerTotals->lastPage()) @foreach($lineDescriptions as $id => $desc) @php $total = $columnTotals[$id] ?? 0; $cellClass = $total > 0 ? 'text-end fw-bold' : 'text-end text-muted fw-bold'; @endphp @endforeach @endif
{{ $description }}Total (KSh)
{{ $customer['name'] }} {{ $amount > 0 ? number_format($amount, 2) : '-' }} {{ number_format($customer['total'], 2) }}
Total {{ $total > 0 ? number_format($total, 2) : '-' }} {{ number_format($totalAmount, 2) }}
{{ $customerTotals->links() }}
@endsection @push('styles') @endpush