@php $canFullDelete = auth()->user()->can('customer-recharge-full-delete'); $canPartialDelete = auth()->user()->can('customer-recharge-partial-delete'); $canBatchDelete = $canFullDelete || $canPartialDelete; @endphp
@if ($canBatchDelete) 0 selected @if ($canFullDelete) @endif @if ($canPartialDelete) @endif @endif
Total Row: {{ $list->count() }}
Total Amount: {{ number_format($list->sum('amount'), 2) }} TK
@can('show_commission_reseller_balance_log')
Total Manager Miscellaneous Expense: {{ number_format($list->sum('commission'), 2) }} TK
@endcan
@if ($canBatchDelete) @endif @can('reseller_balance_log_with_pop') @endcan @can('show_commission_reseller_balance_log') @endcan @can('show_commission_percentage_reseller_balance_log') @endcan {{-- @if (checkSettings('ResellerClientOnlineRecharge') == 'enable') @endif --}} @php $total = 0; $manager_commission = 0; // $total_client_bill = 0; @endphp @foreach ($list as $r) @php $amount = $r->amount ?? 0; $total += $amount; $percentageCommission = $amount > 0 && ($r->reseller_commission_percentage ?? 0) > 0 ? ($amount * $r->reseller_commission_percentage) / 100 : 0; $manager_commission += $percentageCommission; $clientbill = 0; if ( checkSettings('setClientPaymentAmountToClient') == 'enable' && optional($r->client)->client_payment_amount > 0 ) { $clientbill = $r->client->client_payment_amount; } else { $clientbill = optional(optional($r->client)->packages)->client_payment_amount ?? 0; } // $total_client_bill += $clientbill; @endphp @if ($canBatchDelete) @endif @can('reseller_balance_log_with_pop') @endcan @can('show_commission_reseller_balance_log') @endcan @can('show_commission_percentage_reseller_balance_log') @endcan {{-- @if (checkSettings('ResellerClientOnlineRecharge') == 'enable') @endif --}} @endforeach {{-- TOTAL ROW --}} @php // Columns before "Amount": ID, Date, Reseller Name, (Pop Name optional), CID, Userid, Name, Address, Action $totalLabelColspan = 9; if (auth()->user()->can('reseller_balance_log_with_pop')) { $totalLabelColspan++; } if ($canBatchDelete) { $totalLabelColspan++; } @endphp @can('show_commission_reseller_balance_log') @endcan @can('show_commission_percentage_reseller_balance_log') @endcan {{-- @if (checkSettings('ResellerClientOnlineRecharge') == 'enable') @endif --}}
ID Date Type Reseller NamePop NameCID Username Name Address Action AmountManager ExpenseManager Expense (%)Client BillRemarks
{{ $r->id }} @if ($r->partial_deleted_at) PARTIAL DELETED @endif {{ $r->created_at->format('d-M-Y h:i:sa') }} {{ $r->logTypeLabel() }} @if (!is_null($r->refund_balance_before) || !is_null($r->refund_balance_after)) refund: {{ number_format((float) $r->refund_balance_before, 2) }} → {{ number_format((float) $r->refund_balance_after, 2) }} @endif {{ $r->reseller->name ?? '' }}{{ $r->pop->popname ?? '' }}{{ $r->client_id ?: '' }} {{ $r->client->userid ?? '' }} {{ $r->client->clientsinfo->clients_name ?? '' }} @cannot('area_hide_bill_sheet') @if (!empty($r->client->clientsinfo->area)) Area : {{ $r->client->clientsinfo->area ?? '' }}. @endif @endcannot @if (!empty($r->client->clientsinfo->block_sector)) Block/Sector : {{ $r->client->clientsinfo->block_sector ?? '' }}. @endif @if (!empty($r->client->clientsinfo->road_name)) R Name : {{ $r->client->clientsinfo->road_name ?? '' }}. @endif @if (!empty($r->client->clientsinfo->road_no)) R No : {{ $r->client->clientsinfo->road_no ?? '' }}. @endif @if (!empty($r->client->clientsinfo->building_name)) B Name : {{ $r->client->clientsinfo->building_name ?? '' }}. @endif @if (!empty($r->client->clientsinfo->building_no)) B No : {{ $r->client->clientsinfo->building_no ?? '' }}. @endif @if (!empty($r->client->clientsinfo->flat_no)) F No : {{ $r->client->clientsinfo->flat_no ?? '' }}. @endif @if (!empty($r->client->clientsinfo->owner_name)) H O : {{ $r->client->clientsinfo->owner_name ?? '' }}. @endif @if (!empty($r->client->clientsinfo->box)) Box : {{ $r->client->clientsinfo->box ?? '' }} @endif {{ $r->action ?? '' }} {{ number_format($amount, 2) }} @php $commissionVal = $r->commission ?? 0; @endphp {{ number_format($commissionVal, 2) }} {{ number_format($percentageCommission, 2) }}{{ number_format($clientbill, 2) }}{{ $r->remarks }}
Total {{ number_format($total, 2) }}{{ number_format($list->sum('commission'), 2) }}{{ number_format($manager_commission, 2) }}{{ number_format($total_client_bill, 2) }}