@php $gt_atb_total = 0; @endphp

{{ session('company_name') }}

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

ADD TO BILL SUMMARY REPORT

BILL PERIOD: {{ $year }}-{{ sprintf("%02d", $month) }}

@foreach($data AS $d) @if(count($d->details) > 1) @foreach($d->details AS $i => $r) @if($i == 0) @else @endif @endforeach @else @endif @php $gt_atb_total += $d->others; @endphp @endforeach
ACCOUNT NO CLASS BOOK CUSTOMER'S NAME ADDRESS METER NO BILL NO REFERENCE AMOUNT
{{ $d->acct_number }} {{ $d->acct_class }} {{ $d->book }} {{ strtoupper($d->cust_name) }} {{ strtoupper(substr($d->complete_address, 0, 60)) }} {{ $d->meter_no }} {{ $d->bill_number }} {{ $d->details[$i]['reference'] }} {{ number_format($d->details[$i]['atb'],2,".",",") }}
{{ $d->details[$i]['reference'] }} {{ number_format($d->details[$i]['atb'],2,".",",") }}
{{ $d->acct_number }} {{ $d->acct_class }} {{ $d->book }} {{ strtoupper($d->cust_name) }} {{ strtoupper(substr($d->complete_address, 0, 60)) }} {{ $d->meter_no }} {{ $d->bill_number }} {{ $d->details[0]['reference'] }} {{ number_format($d->details[0]['atb'],2,".",",") }}
GRAND TOTAL {{ number_format((float)$gt_atb_total, 2,".",",") }}