Date-Time Generated: {{ \Carbon\Carbon::now()->format('M d, Y g:i A') }}

{{ strtoupper(session('company_name')) }}

{{ strtoupper(session('branch_name')) }}

BILLING STATISTIC CONSOLIDATED REPORT{{ session('report_exception') == "0" ? " ACCTG" : "" }}

{{ $bill_month }} {{ $bill_year }} {{ $acct_class != 'ALL' ? '/ '.$acct_class : '' }}

@if($closed == false)

*** This billing period is not yet closed. ***

@else

{{ $type }} BILL STATS REPORT

@endif @foreach($data AS $d) @endforeach
Consumption Range No. of Customers Consumption Bill Amount Ave. CuM Ave. Bill Amt Ave. Rate
{{ $d['cum_range'] }} {{ $d['customer_no'] }} {{ $d['consumption'] }} {{ $d['bill_amount'] }} {{ $d['ave_cum'] }} {{ $d['ave_amount'] }} {{ $d['ave_rate'] }}
TOTAL {{ number_format(array_sum(array_map(function($d) { return str_replace(',', '', $d['customer_no']); }, $data))) }} {{ number_format(array_sum(array_map(function($d) { return str_replace(',', '', $d['consumption']); }, $data))) }} {{ number_format(array_sum(array_map(function($d) { return str_replace(',', '', $d['bill_amount']); }, $data)), 2) }}