Bill Generation Preview Bill Generation Preview (FY: {{ $financialYear }})
@if (count($results) > 0)
@csrf
@foreach ($results as $index => $item) @endforeach
Select Conn No Consumer Name No. of Conn Ward Vibhag Status Approval Date Billing Period (From – To) Calculated Months Rate (Yearly) Bill Amount Arrears Total Action
@if ($item['can_generate']) @else @endif {{ $item['connection']->connection_no }} {{ $item['connection']->consumer_name }} {{ $item['connection']->no_of_connections > 0 ? $item['connection']->no_of_connections : 1 }} {{ $item['prabhag'] }} {{ $item['zone'] }} @if ($item['status'] == 'Pending') {{ $item['status'] }} @else {{ $item['status'] }} @endif {{ $item['connection']->approval_date ? \Carbon\Carbon::parse($item['connection']->approval_date)->format('d-m-Y') : '-' }} {{ $item['bill_from'] }} to {{ $item['bill_to'] }} {{ $item['months'] }} {{ $item['rate'] }} @if ($item['rate'] == 0 && $item['can_generate'])
Rate Not Found @endif @if (isset($item['rate_debug_params']) && $item['rate'] == 0)
{{ $item['rate_debug_params'] }}
@endif
{{ number_format($item['bill_amount'], 2) }} {{ number_format($item['arrears'], 2) }} @if (isset($item['arrears_source']))
{{ $item['arrears_source'] }} @endif
{{ number_format($item['total_amount'], 2) }} @if (!$item['can_generate'] && isset($item['bill_id'])) @if ($item['status'] != 'Paid' && (!isset($item['paid_amount']) || $item['paid_amount'] == 0)) @endif @endif
Back @php $canGenerateAny = collect($results)->where('can_generate', true)->count() > 0; @endphp @if ($canGenerateAny) @else
All selected connections already have bills for this FY. Revert one to regenerate.
@endif
@else
No connections found to process.
Back @endif