@foreach ($reportData as $index => $record) @php $master = $record['connection']; $transactions = $record['transactions']; @endphp
@php $logoPath = public_path('admin/images/bncmc-logo.png'); $logoSrc = ''; if (file_exists($logoPath)) { $logoData = base64_encode(file_get_contents($logoPath)); $mimeType = mime_content_type($logoPath); $logoSrc = 'data:' . $mimeType . ';base64,' . $logoData; } else { $logoSrc = asset('admin/images/bncmc-logo.png'); } @endphp
Bhiwandi Nizampur City Municipal Corporation
भिवंडी निजामपूर शहर महानगरपालिका
Water Tax Department / पाणीपुरवठा कर विभाग
WATER LEDGER REPORT / पाणी खाते अहवाल
From Date /पासून : {{ $fromDate }} To Date /पर्यंत : {{ $toDate }}
Consumer Details / ग्राहक तपशील
Connection No: {{ $master->connection_no }}
Name: {{ $master->consumer_name }}
Address: {{ $master->address }}
Type: {{ $master->connection_type_name }}
Ward: {{ $master->prabhag_name }}
Zone: {{ $master->zone_name }}
Block: {{ $master->bhubhag_name }}
Bill Details / देयक तपशील
@php if (!function_exists('indian_format')) { function indian_format($number) { $decimal = round($number - ($no = floor($number)), 2) * 100; $hundred = null; $digits_length = strlen($no); $i = 0; $str = array(); $words = array(0 => '', 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9', 10 => '10', 11 => '11', 12 => '12', 13 => '13', 14 => '14', 15 => '15', 16 => '16', 17 => '17', 18 => '18', 19 => '19', 20 => '20', 30 => '30', 40 => '40', 50 => '50', 60 => '60', 70 => '70', 80 => '80', 90 => '90'); $digits = array('', 'Hundred', 'Thousand', 'Lakh', 'Crore'); $num = explode('.', number_format($number, 2, '.', '')); $whole = $num[0]; $decimal = $num[1]; $last3 = substr($whole, -3); $rest = substr($whole, 0, -3); if($rest) { $rest = preg_replace("/\B(?=(\d{2})+(?!\d))/", ",", $rest); return $rest . "," . $last3 . "." . $decimal; } else { return $last3 . "." . $decimal; } } } $totalDemand = 0; $totalCollection = 0; @endphp @forelse($transactions as $tIndex => $row) @php $totalDemand += $row->demand; $totalCollection += $row->collection; @endphp @empty @endforelse
SR / अ.क्र. DATE / दिनांक BILL NO / बिल क्र. BILL AMT / बिल रक्कम PAID AMT / भरलेली रक्कम BALANCE / शिल्लक MODE / पद्धत RCPT NO / पावती क्र. RCPT DATE / पावती दिनांक
{{ $tIndex + 1 }} {{ $row->date }} {{ $row->bill_no }} {{ $row->demand > 0 ? indian_format($row->demand) : '-' }} {{ $row->collection > 0 ? indian_format($row->collection) : '-' }} {{ indian_format($row->balance) }} {{ $row->payment_mode }} {{ $row->receipt_no }} {{ $row->receipt_date }}
No Transactions Found
TOTAL / एकूण {{ indian_format($totalDemand) }} {{ indian_format($totalCollection) }} {{ indian_format($transactions->last()->balance ?? 0) }}
@if (!$loop->last)
@endif @endforeach