@php if (!function_exists('numberToWords')) { function numberToWords($number) { $no = floor($number); $point = round($number - $no, 2) * 100; $hundred = null; $digits_1 = strlen($no); $i = 0; $str = []; $words = [ '0' => '', '1' => 'One', '2' => 'Two', '3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six', '7' => 'Seven', '8' => 'Eight', '9' => 'Nine', '10' => 'Ten', '11' => 'Eleven', '12' => 'Twelve', '13' => 'Thirteen', '14' => 'Fourteen', '15' => 'Fifteen', '16' => 'Sixteen', '17' => 'Seventeen', '18' => 'Eighteen', '19' => 'Nineteen', '20' => 'Twenty', '30' => 'Thirty', '40' => 'Forty', '50' => 'Fifty', '60' => 'Sixty', '70' => 'Seventy', '80' => 'Eighty', '90' => 'Ninety', ]; $digits = ['', 'Hundred', 'Thousand', 'Lakh', 'Crore']; while ($i < $digits_1) { $divider = $i == 2 ? 10 : 100; $number = floor($no % $divider); $no = floor($no / $divider); $i += $divider == 10 ? 1 : 2; if ($number) { $plural = ($counter = count($str)) && $number > 9 ? 's' : null; $hundred = $counter == 1 && $str[0] ? ' and ' : null; $str[] = $number < 21 ? $words[$number] . ' ' . $digits[$counter] . $plural . ' ' . $hundred : $words[floor($number / 10) * 10] . ' ' . $words[$number % 10] . ' ' . $digits[$counter] . ' ' . $plural . ' ' . $hundred; } else { $str[] = null; } } $str = array_reverse($str); $result = implode('', $str); $points = $point ? '.' . $words[$point / 10] . ' ' . $words[($point = $point % 10)] : ''; return $result . 'Rupees Only'; } } if (!function_exists('getReportFilterNames')) { function getReportFilterNames($modelClass, $ids, $column) { if (empty($ids)) return 'All'; $ids = is_array($ids) ? $ids : [$ids]; if (in_array('all', $ids)) return 'All'; return $modelClass::whereIn('id', $ids)->pluck($column)->implode(', ') ?: 'All'; } } @endphp Service Head-wise Collection Report
BNCMC Logo

Bhiwandi Nizampur City Municipal Corporation /
भिवंडी निजामपूर शहर महानगरपालिका

Service Head-wise Collection Report / सेवा निहाय जमा अहवाल

Prabhag / प्रभाग: {{ getReportFilterNames(\App\Models\Prabhag::class, $request->prabhag_id, 'prabhag_name') }} Department / विभाग: {{ getReportFilterNames(\App\Models\Department::class, $request->department_id, 'department_name') }}
Service / सेवा: {{ getReportFilterNames(\App\Models\Service::class, $request->service_id, 'service_name') }} Payment Mode / देयक मोड: {{ is_array($request->payment_mode) ? implode(', ', $request->payment_mode) : ($request->payment_mode ?: 'All') }}
Date / दिनांक: {{ $request->from_date ? \Carbon\Carbon::parse($request->from_date)->format('d-m-Y') : 'Start' }} to {{ $request->to_date ? \Carbon\Carbon::parse($request->to_date)->format('d-m-Y') : 'Today' }}
@php $gtAmount = 0; $gtSGST = 0; $gtCGST = 0; $gtTotal = 0; @endphp @foreach ($reportData as $data) @php $gtAmount += $data['amount']; $gtSGST += $data['sgst']; $gtCGST += $data['cgst']; $gtTotal += $data['total_amount']; // Skip empty rows if needed, but reportData usually has data @endphp @endforeach
Sr No
अ. क्र.
Department
विभाग
Service Name
सेवेचे नाव
Function Code
कार्य संकेतांक
Budget Code
अर्थसंकल्प संकेतांक
Amount
रक्कम
SGST
एसजीएसटी
CGST
सीजीएसटी
Total Amount
एकूण रक्कम
{{ $loop->iteration }} {{ $data['dept_name'] }} {{ $data['service_name'] }} {{ $data['function_code'] }} {{ $data['budget_code'] }} {{ number_format($data['amount'], 2) }} {{ number_format($data['sgst'], 2) }} {{ number_format($data['cgst'], 2) }} {{ number_format($data['total_amount'], 2) }}
Grand Total / एकूण बेरीज: {{ number_format($gtAmount, 2) }} {{ number_format($gtSGST, 2) }} {{ number_format($gtCGST, 2) }} {{ number_format($gtTotal, 2) }}
Total Amount in Words / अक्षरी एकूण रक्कम: {{ numberToWords($gtTotal) }}
Printed On / मुद्रित केले: {{ \Carbon\Carbon::now('Asia/Kolkata')->format('d-m-Y h:i A') }}
Day / दिवस: {{ \Carbon\Carbon::now('Asia/Kolkata')->format('l') }}