@if($company) @if($company->CompanyName)
C/O {{ strtoupper($company->CompanyName) }}
@endif @if($company->Address1 || $company->Address2 || $company->City || $company->PostalCode)
{{ $company->Address1 }} {{ $company->Address2 }} @if($company->City) {{ $company->City }} @endif @if($company->PostalCode) , {{ $company->PostalCode }} @endif @if($company->Country) , {{ $company->Country }} @endif
@endif @if($company->Phone1 || $company->Phone2)
TEL: {{ $company->Phone1 }}{{ $company->Phone2 ? ', ' . $company->Phone2 : '' }}
@endif @if($company->Email)
EMAIL: {{ strtolower($company->Email) }}
@endif @endif
@if($company->CompanyLogo) Logo @else Logo @endif

Billing Summary by Court/Tenant Report (Electricity Charges) - Period: {{ \Carbon\Carbon::createFromFormat('Ym', $billingPeriod)->format('F Y') }}

@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 @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
Court/Tenant{{ $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) }}