@extends('Customer.customer-layout') @section('body') @include('Customer.left-menu')

Dashboard

Balance | Inquiry
@if (isset($details['account']->dueAmount) && $details['account']->dueAmount < 1) {{ abs($details['account']->dueAmount) }} @else 0 @endif
Due @if (isset($details['account']->dueAmount) && $details['account']->dueAmount > 0) {{ abs($details['account']->dueAmount) }} @else 0 @endif
Packages | @if (checkSettings('package-name-show-in-customer-dashboard') == 'enable') {{ $details['package']->package_name }} @endif
@if (checkSettings('ResellerClientOnlineRecharge') == 'enable' && $details['userinfo']->pop->bill_generate == 'no') @if (checkSettings('setClientPaymentAmountToClient') == 'enable' && $details['userinfo']->client_payment_amount > 0)
{{ $details['userinfo']->client_payment_amount }}TK
@else
{{ $details['package']->client_payment_amount }}TK
@endif @else
{{ $details['package']->package_rate }}TK
@endif Expire: {{ date('d-M-Y', strtotime($details['userinfo']->expire_date)) }}
Recharge | Account
Pay Now
Click Pay Now for Recharge
Payment History
@if (checkSettings('radius_customer_bandwidth_limit') == 'enable') @php $downMb = (float) ($details['userinfo']->down_bandwidth ?? 0); $upMb = (float) ($details['userinfo']->up_bandwidth ?? 0); // Value and unit come back separately so the unit can be // set smaller than the figure it belongs to. $formatUsage = function ($mb) { return $mb >= 1024 ? ['value' => number_format($mb / 1024, 2, '.', ''), 'unit' => 'GB'] : ['value' => number_format($mb, 2, '.', ''), 'unit' => 'MB']; }; $down = $formatUsage($downMb); $up = $formatUsage($upMb); $total = $formatUsage($downMb + $upMb); @endphp
Data Usage | Download / Upload
Download
{{ $down['value'] }}{{ $down['unit'] }}
Upload
{{ $up['value'] }}{{ $up['unit'] }}
Total
{{ $total['value'] }}{{ $total['unit'] }}
@endif
Token | List
{{ $tokenListCount->count() }}
Pending | Token
{{ $pendingTokenCount->count() }}
Change Package
Note: After changing the package, refund is not possible. @php // On a subreseller POP $packages holds SubPackage rows, which // name their columns `name`/`rate`; everywhere else they are // Packages rows with `package_name`/`package_rate`. Normalise // once here so the two loops below can't read the wrong column. $isSubresellerPop = $details['userinfo']->pop->subreseller == 'yes'; $currentRate = $details['package']->package_rate; $packageOptions = collect($packages) ->map(function ($package) use ($isSubresellerPop, $currentRate, $days_left_to_expire) { $rate = $isSubresellerPop ? $package->rate : $package->package_rate; $name = $isSubresellerPop ? $package->name : $package->package_name; // Only an upgrade is charged, and only for the days left. $cost = 0; if ($days_left_to_expire > 0 && $currentRate < $rate) { $cost = ($rate / 30) * $days_left_to_expire; } return [ 'id' => $package->id, 'name' => $name, 'rate' => $rate, 'cost' => $cost, ]; }); @endphp
Select a package
@foreach ($packageOptions as $option)
{{ $option['name'] }}
Rate: {{ number_format($option['rate']) }} TK Cost: {{ number_format($option['cost']) }} TK
@endforeach
@if (checkSettings('livespeed-client-portal') == 'enable') @include('Customer.customerLiveSpeed') @endif
New Customer | Request
Notice Board | Latest
Complaints and Help Center
@endsection @section('script') @endsection