@extends('layout.app') @section('content')
Print with Due Print without Due Total Customer: {{ $list->count() }} Total Due Amount: {{ $list->sum('dueAmount') }}
@if (request()->type != 'all') @foreach ($poplist as $pop) @if (request()->search == 'pop') @if ($pop->id == request()->type)

View Customer Billing Information Of: {{ $pop->popname }} ( {{ date('M-Y') }} )

@endif @endif @endforeach @foreach ($reseller as $r) @if (request()->search == 'resellers') @if ($r->id == request()->type)

View Customer Billing Information Of: {{ $r->name }} ( {{ date('M-Y') }} )

@endif @endif @endforeach @if (request()->search == 'area')

View Customer Billing Information Of: {{ request()->type }} ( {{ date('M-Y') }} )

@endif
@php $total_previous_due = 0; $currentTotalDue = 0; @endphp @foreach ($list as $r) @php if ($r->dueAmount - $r->package_rate > 0) { $total_previous_due += $r->dueAmount - $r->package_rate; } else { $total_previous_due += 0; } $currentTotalDue += $r->dueAmount; @endphp @endforeach
# ID Invoice User name Name Contact Joining Date Zone/POP Package Type Bill Date Expire Date OTC Bill Amount Previous Due Due Amount Address
{{ $loop->iteration }} @php(printf('CID%04d', $r->id)) {{ $r->userid }} {{ $r->clients_name ?? '' }} {{ $r->contact_no ?? '' }} {{ date('d-M-Y', strtotime($r->joinDate)) }} {{ $r->popname }} {{ $r->package_name }} {{ $r->billing_type }} @if ($r->billing_type == 'new') {{ date('d-M-Y', strtotime($r->created_at)) }} @else {{ date('d-M-Y', strtotime($r->due_date)) }} @endif {{ date('d-M-Y', strtotime($r->expire_date)) }} @if ($r->otc_due == null) {{ 0 }} @else {{ $r->otc_due }} @endif {{ $r->billamount }} @if ($r->dueAmount - $r->package_rate > 0) {{ $r->dueAmount - $r->package_rate }} @else {{ 0 }} @endif {{ $r->dueAmount }} @cannot('area_hide_bill_sheet') @if (!empty($r->area)) Area : {{ $r->area ?? '' }}. @endif @endcannot @if (!empty($r->block_sector)) Block/Sector : {{ $r->block_sector ?? '' }}. @endif @if (!empty($r->road_name)) R Name : {{ $r->road_name ?? '' }}. @endif @if (!empty($r->road_no)) R No : {{ $r->road_no ?? '' }}. @endif @if (!empty($r->building_name)) B Name : {{ $r->building_name ?? '' }}. @endif @if (!empty($r->building_no)) B No : {{ $r->building_no ?? '' }}. @endif @if (!empty($r->flat_no)) F No : {{ $r->flat_no ?? '' }}. @endif @if (!empty($r->owner_name)) H O : {{ $r->owner_name ?? '' }}. @endif @if (!empty($r->box)) Box : {{ $r->box ?? '' }} @endif
BDT {{ $list->sum('billamount') }} BDT {{ $total_previous_due }} BDT {{ $currentTotalDue ?? '' }}
@else @foreach ($poplist as $pop)

View Customer Billing Information Of: {{ $pop->popname }} ( {{ date('M-Y') }} )


@php($currentDue = 0) @foreach ($list as $r) @if ($r->pop_id == $pop->id) @php($currentDue += $r->dueAmount) @endif @endforeach
# ID Invoice User name Name Contact Zone/POP Package Type Bill Date Previous Due Due Amount Address
{{ $loop->iteration }} @php(printf('CID%04d', $r->id)) {{ $r->userid }} {{ $r->clients_name ?? '' }} {{ $r->contact_no ?? '' }} {{ $r->popname }} {{ $r->package_name }} {{ $r->billing_type }} @if ($r->billing_type == 'new') {{ date('d-M-Y', strtotime($r->created_at)) }} @else {{ date('d-M-Y', strtotime($r->due_date)) }} @endif @if ($r->dueAmount - $r->package_rate > 0) {{ $r->dueAmount - $r->package_rate }} @else {{ 0 }} @endif {{ $r->dueAmount }} @if (!empty($r->area)) Area : {{ $r->area ?? '' }}. @endif @if (!empty($r->block_sector)) Block/Sector : {{ $r->block_sector ?? '' }}. @endif @if (!empty($r->road_name)) R Name : {{ $r->road_name ?? '' }}. @endif @if (!empty($r->road_no)) R No : {{ $r->road_no ?? '' }}. @endif @if (!empty($r->building_name)) B Name : {{ $r->building_name ?? '' }}. @endif @if (!empty($r->building_no)) B No : {{ $r->building_no ?? '' }}. @endif @if (!empty($r->flat_no)) F No : {{ $r->flat_no ?? '' }}. @endif @if (!empty($r->owner_name)) H O : {{ $r->owner_name ?? '' }}. @endif @if (!empty($r->box)) Box : {{ $r->box ?? '' }} @endif
Total Due Amount BDT {{ $currentDue }}
@endforeach @endif
@endsection @section('ajax') @endsection