@php($permissions = userPermissions())
@if (request()->path() == 'admin/list/new-join' || request()->path() == 'admin/newClientSearchReport')
Total : {{ $list->total() }}
@if ($export == 'yes') Download CSV @endif @endif @if (request()->path() == 'admin/list/close-list') Export
Total Closed: {{ $closeTotal ?? 0 }}
@endif @if (request()->path() == 'admin/close-search-list') Download CSV @endif @if (request()->path() == 'admin/list/expired-Clients' || request()->path() == 'admin/expire-customer-search')
@if (request()->path() == 'admin/expire-customer-search') Download CSV {{-- @else --}} @endif
@endif @if (request()->path() == 'admin/free-cleint' || request()->path() == 'admin/freeClientSearch')
Total Free Client: {{ $list->count() }}
@endif
@if (request()->path() == 'admin/pending-customer' || request()->path() == 'admin/pending-customer-search')
@if (checkSettings('local-user-first-approve') == 'enable') @if (in_array('local-user-first-approve', $permissions)) @elseif (in_array('new-customer-approve', $permissions)) @endif @else @if (in_array('new-customer-approve', $permissions)) @endif @endif
@endif @if (checkSettings('all-client-dataTable') == 'enable' && request()->path() == 'admin/clients') @elseif (request()->path() == 'admin/expire-customer-search' || request()->path() == 'admin/getResellerPopList' || request()->path() == 'admin/online-customer-search' || request()->path() == 'admin/list/new-join' || request()->path() == 'admin/newClientSearchReport' || request()->path() == 'admin/disable-customer-search' || request()->path() == 'admin/deactive-customer' || request()->path() == 'admin/active-customer' || request()->path() == 'admin/free-client' || request()->path() == 'admin/freeClientSearch')
@else
@endif @if (request()->path() == 'admin/clientSearchReport') @endif @if (request()->path() == 'admin/pending-customer' || request()->path() == 'admin/clientSearchReport' || request()->path() == 'admin/pending-customer-search') @endif @if (request()->path() == 'admin/list/close-list' || request()->path() == 'admin/close-search-list') @endif @if (request()->path() == 'admin/pending-customer') @endif @if (auth()->user()->hasRole(['Sub Reseller'])) @endif @php($catTotalLength = 0) @php($totalOtc = 0) @php($totalMrc = 0) @php($apiCheck = checkAPI()) @if (request()->path() == 'admin/list/disable-customer' || request()->path() == 'admin/list/expired-Clients' || request()->path() == 'admin/pending-customer')

Total = {{ $list->total() }}

@endif @if (request()->path() == 'admin/disable-customer-search' || request()->path() == 'admin/expire-customer-search' || request()->path() == 'admin/pending-customer-search' || request()->path() == 'admin/active-customer-search' || request()->path() == 'admin/close-search-list')

Total = {{ $list->count() }}

@endif @foreach ($list as $r) {{-- {{ dd($r)}} --}} clients_status == 'deactive') class="deactive" @endif> @if (request()->path() == 'admin/clientSearchReport') @elseif(request()->path() == 'admin/pending-customer' || request()->path() == 'admin/pending-customer-search') @endif @if (request()->path() == 'admin/list/close-list' || request()->path() == 'admin/close-search-list') @endif @if (request()->path() == 'admin/pending-customer') @endif @php($totalOtc += $r->clientsinfo->otc) @php($totalMrc += $r->packages->package_rate ?? 0) @php($catTotalLength += $r->clientsinfo->cat_length ?? 0) @endforeach @if (request()->path() == 'admin/list/new-join' || request()->path() == 'admin/list/close-list' || request()->path() == 'admin/close-search-list' || request()->path() == 'admin/newClientSearchReport' || request()->path() == 'admin/clientSearchReport') @if (request()->path() == 'admin/clientSearchReport') @endif @if (auth()->user()->hasPermissionTo('source_mrc_hide')) @else @endif @if (checkSettings('radius_customer_bandwidth_limit') == 'enable')
@endif @endif

{{ $status }}

{!! $packages_count !!}

ID User name Status Expire Bill Info Package POP Name Contact User Info DateClose DateRemarksCreated By
@if (in_array('customer-recharge', $permissions)) @if ($r->pops->bill_generate != 'yes') @if (auth()->user()->hasRole(['Reseller Admin', 'Admin', 'Accounts Executive', 'Reseller'])) @elseif(auth()->user()->hasRole(['Sub Reseller'])) @endif expire_date)) }}> billing_cycle }}> @else @endif @endif @if ($r->pop->bill_generate == 'yes' ) @if (!globalPermission('payment-bill-by-bill')) @endif CID: {{ $r->id }} @else @if (in_array('customer-recharge', $permissions)) @if (checkSettings('reseller-client-dynamic-recharge') == 'enable' && in_array('dynamic-recharge', $permissions)) @else @if ($r->client_approval == 'approved') @endif @endif @endif @if (globalPermission('reseller-client-billing') && in_array('view-client-account-balance', $permissions)) CID: {{ $r->id }} @else CID {{ $r->id }} @endif @endif @if (!checkAPI() || checkSettings('api_bandwidth_usage') == 'enable') Log @endif @if ($r->deleted_at != null) Details @else Details @endif @if (checkSettings('singleInvoice') == 'enable' && $r->pop->bill_generate == 'yes') @endif
@if ($r->deleted_at != null) @else @endif
{{ $r->isStatic ? $r->ip_address : $r->userid }} @if (in_array('view-client-password', $permissions)) @if (!$r->isStatic)
{{ $r->password }}
@endif @endif @if (checkSettings('customer_code') == 'enable') {{ $r->customer_code ?? '' }} @endif @if ($r->is_free == 1)

Free

@endif @if (request()->path() == 'admin/clientSearchReport' && checkAPI()) @endif @if (request()->path() == 'admin/list/close-list' || (request()->path() == 'admin/close-search-list' && $r->deleted_at != null)) Closed at
{{ $r->deleted_at }}
@endif @if (request()->path() == 'admin/list/disable-customer' || request()->path() == 'admin/disable-customer-search') @foreach ($con_history as $con) @isset($con->client_id) @if ($r->id == $con->client_id) {{ $con->created_at }} @endif @endisset @endforeach @endif @if (request()->path() == 'admin/clients' || request()->path() == 'admin/customer_search')
@if (checkAPI()) @if (!$r->isStatic) @if (array_key_exists($r->userid, $online['onlineUsers'])) @can('router-remote-access') {{-- --}} @endcan @if (globalPermission('online-offline-using-api')) Online @else {{ $online['onlineUsers'][$r->userid]['address'] ?? '' }} @endif @else @if (isset($online['allUsers'][$r->userid]['last-logged-out'])) @if (preg_match('/\b\d{4}\b/', $online['allUsers'][$r->userid]['last-logged-out'], $matches) == 1) @if ($matches[0] != '1970') @if (globalPermission('online-offline-using-api')) Offline @else {{ parseDate($online['allUsers'][$r->userid]['last-logged-out']) }} @endif @else Never Connected @endif @endif @endif @endif @else @if (array_key_exists($r->ip_address, $online['ipArpListsGlobal'])) @if ($online['ipArpListsGlobal'][$r->ip_address]['disabled'] == 'false') ARP-Enabled @else ARP-Disabled @endif @endif @endif @if (checkSettings('showClientUpDownInfo') == 'enable') @if (array_key_exists($r->userid, $online['usersBandwidth'])) Download⬇️ {{ number_format($online['usersBandwidth'][$r->userid]['tx-byte'] / 1048576, 2, '.', '') }}MB Upload⬆️ {{ number_format($online['usersBandwidth'][$r->userid]['rx-byte'] / 1048576, 2, '.', '') }}MB @endif @endif @else @if (isset($online) && in_array($r->userid, $online)) Online @else Offline @endif @endif
@if ($r->ignoreMKCheck == 1)

Ignore MK : ✅

@endif @endif
@if (checkSettings('radius_customer_bandwidth_limit') == 'enable')

D⬇️ @if ($r->down_bandwidth >= 1024) {{ number_format($r->down_bandwidth / 1024, 2, '.', '') }}GB @else {{ $r->down_bandwidth }}MB @endif

U⬆️ @if ($r->up_bandwidth >= 1024) {{ number_format($r->up_bandwidth / 1024, 2, '.', '') }}GB @else {{ $r->up_bandwidth }}MB @endif

@endif
@if($r->experity_check == "No")
VIP
@endif
@if ($r->clients_status == 'active') Active @elseif($r->clients_status == 'deactive') Deactive @elseif($r->clients_status == 'expired') Expired @elseif($r->clients_status == 'disable') Disabled @endif BD: {{ date('d-M-Y', strtotime($r->expire_date)) }}
@if ($r->payment_dadeline != 0) PD: {{ \Carbon\Carbon::parse($r->expire_date)->addDay($r->payment_dadeline)->format('d-M-Y') }} @else PD: {{ \Carbon\Carbon::parse($r->expire_date)->addDay($r->payment_dadeline)->format('d-M-Y') }} @endif @can('change-expire-date') @endcan @if (checkSettings('auto_deactive_check') == 'enable')

@if (!empty($r->auto_deactive)) AD: {{ date('d-M-Y', strtotime($r->auto_deactive ?? '')) }} @endif @endif

Bill Date: {{ $r->billing_cycle }}
@if (isset($r->pops->bill_generate) && $r->pops->bill_generate == 'yes') Package Rate: @role('Sub Reseller') @if ($r->pops->subreseller == 'yes') {{ $r->subpack->rate ?? 0 }} @else {{ $r->packages->package_rate ?? 0 }} @endif @else {{ $r->packages->package_rate ?? 0 }} @endrole
Discount: {{ $r->parmanent_discount }}
Monthly Bill: @role('Sub Reseller') @if ($r->pops->subreseller == 'yes') {{ ($r->subpack->rate ?? 0) - ($r->parmanent_discount ?? 0) >= 0 ? ($r->subpack->rate ?? 0) - ($r->parmanent_discount ?? 0) : 0 }} @else {{ ($r->packages->package_rate ?? 0) - ($r->parmanent_discount ?? 0) >= 0 ? ($r->packages->package_rate ?? 0) - ($r->parmanent_discount ?? 0) : 0 }} @endif @else {{ ($r->packages->package_rate ?? 0) - ($r->parmanent_discount ?? 0) >= 0 ? ($r->packages->package_rate ?? 0) - ($r->parmanent_discount ?? 0) : 0 }} @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 @else @if (globalPermission('ResellerClientOnlineRecharge')) Client Bill: {{ getResellerClientPaymentAmount($r) }}
Pending Amount: {{ $r->un_recharge_amount ?? 0 }} @endif @if (globalPermission('reseller-client-billing') && in_array('view-client-account-balance', $permissions)) @php($resellerClientBalance = isset($r->customer_account_balance_reseller) ? $r->customer_account_balance_reseller : 0) @if ($resellerClientBalance >= 0) Due: {{ number_format($resellerClientBalance, 2) }} @elseif ($resellerClientBalance < 0) Advance: {{ number_format(abs($resellerClientBalance), 2) }} @endif @endif @endif

@if ($r->pops->bill_generate == 'yes') @php($due_amount = isset($r->customerAccount) ? $r->customerAccount->dueAmount : 0);

0) style="background: #fb7185;" @else style="background: #008000;" @endif> @if ($due_amount >= 0) Due: @else Advance: @endif @if ($due_amount >= 0) {{ $due_amount ?? 0 }} @else {{ $due_amount * -1 ?? 0 }} @endif

@endif
@if (in_array('show-sub-package', $permissions) && $r->pops->subreseller == 'yes') {{ $r->subpack->name ?? '' }} @if (in_array('show-sub-package-rate', $permissions)) ({{ $r->subpack->rate ?? '' }}) @endif @endif @if (in_array('show-mother-package', $permissions)) {{ $r->packages->package_name ?? '' }} @if (in_array('show-motherpackage-rate', $permissions)) ({{ $r->packages->package_rate ?? '' }}) @endif @endif @if (in_array('package_change_without_cost', $permissions)) Package Change @else @if (in_array('package_change_without_cost_expire', $permissions) && $r->clients_status == 'expired') Package Change @endif @endif @if (checkCrmRansferPermission(request()->path())) {{ $r->crm_status }} -> Transfer @if ($r->crm_status == 'Fiber') Item Return @endif @if ($r->crm_status == 'Store') Show Return Item @endif History @if (getLastCRMDate($r->id)) Check Date : {{ \Carbon\Carbon::parse(getLastCRMDate($r->id))->format('d-M-Y') }} @endif @endif @if ($r->pops->experity_check == 'Yes') {{ $r->pops->popname ?? '' }} @else {{ $r->pops->popname ?? '' }} @endif {{ $r->clientsinfo->clients_name ?? '' }} {{ $r->clientsinfo->contact_no ?? '' }}

@if ($r->ip_address) IP: {{ $r->ip_address ?? '' }},
@endif @if ($r->mac) MAC: {{ $r->mac ?? '' }},
@endif @if ($r->distribution_point) Distribution point: {{ $r->distribution_point ?? '' }},
@endif @if ($r->connection_type) Connection type: {{ $r->connection_type ?? '' }},
@endif @if ($r->customer_type) Client type: {{ $r->customer_type ?? '' }},
@endif @if ($r->clientsinfo->dob) DOB: {{ $r->clientsinfo->dob ?? '' }},
@endif @if ($r->clientsinfo->father_name) Father: {{ $r->clientsinfo->father_name ?? '' }},
@endif @if ($r->clientsinfo->mother_name) Mother: {{ $r->clientsinfo->mother_name ?? '' }},
@endif @if ($r->clientsinfo->national_id) NID: {{ $r->clientsinfo->national_id ?? '' }},
@endif @if ($r->clientsinfo->passport_no) Passport: {{ $r->clientsinfo->passport_no ?? '' }},
@endif @if ($r->clientsinfo->division) Division: {{ $r->clientsinfo->divisions->name ?? '' }},
@endif @if ($r->clientsinfo->district) District: {{ $r->clientsinfo->districts->name ?? '' }},
@endif @if ($r->clientsinfo->thana) Upazila: {{ $r->clientsinfo->thanas->name ?? '' }},
@endif @if ($r->clientsinfo->area) Area :{{ $r->clientsinfo->area ?? '' }},
@endif @if ($r->clientsinfo->road_name) Road Name: {{ $r->clientsinfo->road_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->building_no) Building No: {{ $r->clientsinfo->building_no ?? '' }},
@endif @if ($r->clientsinfo->building_name) Building Name: {{ $r->clientsinfo->building_name ?? '' }},
@endif @if ($r->clientsinfo->flat_no) Flat No: {{ $r->clientsinfo->flat_no ?? '' }},
@endif @if ($r->clientsinfo->owner_name) House Owner : {{ $r->clientsinfo->owner_name ?? '' }},
@endif @if ($r->clientsinfo->owner_number) House Owner No: {{ $r->clientsinfo->owner_number ?? '' }},
@endif @if ($r->clientsinfo->other_contact) Clients Other Contact : {{ $r->clientsinfo->other_contact ?? '' }},
@endif @if ($r->clientsinfo->email) Email : {{ $r->clientsinfo->email ?? '' }},
@endif @if ($r->clientsinfo->client_latitude) Latitude : {{ $r->clientsinfo->client_latitude ?? '' }},
@endif @if ($r->clientsinfo->client_longitude) Longitude : {{ $r->clientsinfo->client_longitude ?? '' }},
@endif @if ($r->clientsinfo->box) Box :{{ $r->clientsinfo->box ?? '' }},
@endif @if ($r->clientsinfo->cable_type) Cable Type :{{ $r->clientsinfo->cable_type ?? '' }},
@endif @if ($r->required_cable != 0) Cable(Meter): {{ $r->required_cable ?? '' }},
@endif @if ($r->clientsinfo->olt_pon) OLT/PON : {{ $r->clientsinfo->olt_pon ?? '' }},
@endif @if ($r->clientsinfo->cable_id) Cable ID : {{ $r->clientsinfo->cable_id ?? '' }},
@endif @if ($r->clientsinfo->cat_type) Cable(CAT-5/CAT-6): {{ $r->clientsinfo->cat_type ?? '' }},
@endif @if ($r->clientsinfo->cat_length) {{ $r->clientsinfo->cat_type ?? 'CAT' }} Length(Meter): {{ $r->clientsinfo->cat_length ?? '' }},
@endif @if ($r->clientsinfo->onu_serial) ONU MAC/Pon No/Serial No: {{ $r->clientsinfo->onu_serial ?? '' }},
@endif @if ($r->clientsinfo->olt_pon) OLT No: {{ $r->clientsinfo->olt_pon ?? '' }},
@endif @if ($r->clientsinfo->olt_no) OLT Card Slot No: {{ $r->clientsinfo->olt_no ?? '' }},
@endif @if ($r->clientsinfo->pon_port) PON Module Port No: {{ $r->clientsinfo->pon_port ?? '' }}
@endif @if ($r->clientsinfo->client_latitude && $r->clientsinfo->client_longitude) View Map @endif

CD: {{ date('d-M-Y h:i:sa', strtotime($r->created_at)) }}
@if ($r->clientsinfo->joinDate) JD: {{ date('d-M-Y', strtotime($r->clientsinfo->joinDate)) }} @endif @can('billing_start_time') @if ($r->billing_start_date) Bill Start Date: {{ date('d-M-Y', strtotime($r->billing_start_date)) }} @endif @endcan
{{ $r->deleted_at->format('d-M-Y h:s:a') }}{{ $r->clientsinfo->remarks ?? '' }}{{ $r->adminUser->name ?? '' }}
Total Fiber: {{ $list->sum('required_cable') }} Meter,
CAT: {{ $catTotalLength }} Meter,
OTC: {{ $totalOtc }} Taka
Fiber: {{ $list->sum('required_cable') }} Meter,
CAT: {{ $catTotalLength }} Meter,
OTC: {{ $totalOtc }} Taka
MRC: {{ $totalMrc }} TK

Total D⬇️ {{ number_format($list->sum('down_bandwidth') / 1024, 2, '.', '') }} GB

Total U⬆️ {{ number_format($list->sum('up_bandwidth') / 1024, 2, '.', '') }} GB

Total ⬆️ {{ number_format(($list->sum('down_bandwidth') + $list->sum('up_bandwidth')) / 1024, 2, '.', '') }} GB @if (isset($package_limit))

Total Limit ⬆️ {{ number_format($package_limit / 1024, 2, '.', '') }} GB

@endif
@if (request()->path() == 'admin/clientSearchReport') @endif