@if(checkSettings('enforce-download-permission') != 'enable' || auth()->user()->can('offline-customer-download')) @endif

Total Offline: {{ checkAPI() ? sizeof($list) : count($list) }}

@if (checkAPI()) {{-- The on-screen cell packs userid, password, name and contact together, so it is excluded from the CSV (no-csv) and the three csv-only columns below carry the clean values. Those are hidden on screen by the DataTable. --}} @if (checkSettings('show_client_password_in_exports') == 'enable' && in_array('view-client-password', userPermissions())) @endif @foreach ($list as $r) @if (checkSettings('show_client_password_in_exports') == 'enable' && in_array('view-client-password', userPermissions())) @endif @endforeach
IdUserName UserNamePasswordName Contact No Client Status Billing Date Bill Info Package POP User Info Expire Date Last Logout Time
CID: {{ $r->id }} {{ $r['userid'] }}
@if (in_array('view-client-password', userPermissions())) {{ $r->password }}
@endif Name: {{ $r->clientsinfo->clients_name ?? '' }}
{{ $r->clientsinfo->contact_no ?? '' }}
{{ $r['userid'] }}{{ $r->password }}{{ $r->clientsinfo->clients_name ?? '' }} {{ $r->clientsinfo->contact_no ?? '' }} BD: {{ date('d-M-Y', strtotime($r->expire_date)) }}
PD: {{ \Carbon\Carbon::parse($r->expire_date)->addDay($r->payment_dadeline)->format('d-M-Y') }}

B Cycle: {{ $r->billing_cycle }}
@if (isset($r->pop->bill_generate) && $r->pop->bill_generate == 'yes') B Amount: @role('Sub Reseller') @if ($r->pop->subreseller == 'yes') {{ $r->subpack->rate ?? 0 }} @else {{ $r->packages->package_rate }} @endif @else {{ $r->packages->package_rate }} @endrole
OTC : {{ $r->clientsinfo->otc ?? 0 }}
@if (isset($r->clientsinfo->otc_due)) @if ($r->clientsinfo->otc_due > 0) OTC Due: {{ $r->clientsinfo->otc_due ?? 0 }} @endif @endif @endif

@if ($r->pop->bill_generate == 'yes')

Due: {{ $r->customerAccount->dueAmount ?? 0 }}

@endif
@can('show-sub-package') {{ $r->subpack->name ?? '' }} @endcan @can('show-mother-package') {{ $r->packages->package_name ?? '' }} @endcan {{ $r->pop->popname ?? '' }}

@if ($r->clientsinfo->flat_no) Flat No: {{ $r->clientsinfo->flat_no ?? '' }}, @endif @if ($r->clientsinfo->building_name) Building Name: {{ $r->clientsinfo->building_name ?? '' }},
@endif @if ($r->clientsinfo->road_no) Road No: {{ $r->clientsinfo->road_no ?? '' }},
@endif @if ($r->clientsinfo->block_sector) Block/Sector: {{ $r->clientsinfo->block_sector ?? '' }}, @endif @if ($r->clientsinfo->area) Area : {{ $r->clientsinfo->area ?? '' }},
@endif @if ($r->clientsinfo->box) Box : {{ $r->clientsinfo->box ?? '' }} @endif

{{ date('d-M-Y', strtotime($r['expire_date'])) }} @if (isset($all_customer[$r->userid]['last-logged-out'])) {{ $all_customer[$r->userid]['last-logged-out'] }} @endif
@if (isset($all_customer[$r->userid]['last-disconnect-reason'])) {{ $all_customer[$r->userid]['last-disconnect-reason'] }} @endif
@else @php $clientInfoMap = $clientInfoMap ?? []; @endphp @foreach ($list as $r) @php $info = $clientInfoMap[strtolower($r->username)] ?? ['name' => '', 'contact' => '']; @endphp @endforeach
UserName Name Contact No Nas IP Assigned IP Mac Address Logout Reason Last Update Time Logout Time
{{ $r->username }} {{ $info['name'] }} {{ $info['contact'] }} {{ $r->nasipaddress }} {{ $r->framedipaddress }} {{ $r->callingstationid }} {{ $r->acctterminatecause }} {{ $r->acctupdatetime }} {{ $r->acctstoptime }}
@endif