@extends('backend.layouts.app') @section('content')
{{--
{{ translate('Sellers') }}
--}} @php $salesmans = \App\Models\User::where('user_type', 'salesman')->orderBy('created_at', 'desc')->get(); @endphp
@php $total_recharge = '0.00'; $total_withdraw_money = '0.00'; $total_difference = '0.00'; @endphp @foreach($shops as $key => $shop) @php $wallets = $shop->user->wallets; $recharge = 0; foreach ($wallets as $wallet) { if ($wallet->approval==1) $recharge += $wallet->amount; } $withdraws = $shop->user->seller_withdraw_requests; $withdraw_money = '0.00'; foreach ($withdraws as $withdraw) { if ($withdraw->status==1) $withdraw_money += $withdraw->amount; } $difference = $recharge - $withdraw_money; $total_recharge += $recharge; $total_withdraw_money += $withdraw_money; $total_difference += $difference; @endphp {{--Total recharge--}} @endforeach @if(count($shops)) @endif
{{translate('Name')}} {{translate('Phone')}} {{translate('Email Address')}} {{translate('Verification Info')}} {{translate('Approval')}} {{ translate('Num. of Products') }} {{ translate('Pending Balance') }} {{ translate('Wallet Money') }} {{ translate('Guarantee Money') }} {{ translate('Views') }} {{ translate('Comment Permission') }} {{ translate('Home Display') }} {{ translate('Total recharge') }} {{ translate('Total withdrawal amount') }} {{ translate('Recharge difference') }} {{ translate('Salesman') }} {{translate('Options')}}
@if($shop->user->banned == 1) @endif {{$shop->name}} @if($shop->user->is_virtual == 1) ({{translate('Virtual')}}) @endif {{$shop->user->phone}} {{$shop->user->email}} @if ($shop->verification_info != null) {{translate('Show')}} @endif {{ $shop->user->products->count() }} @if ($shop->admin_to_pay >= 0) {{ single_price($shop->admin_to_pay) }} @else {{ single_price(abs($shop->admin_to_pay)) }} ({{ translate('Due to Admin') }}) @endif {{single_price($shop->user->balance)}} {{single_price($shop->bzj_money)}} {{translate('base num')}}:{{$shop->view_base_num}}
{{translate('inc num')}}:{{$shop->view_inc_num}}
{{single_price($recharge)}} {{single_price($withdraw_money)}} {{single_price($difference)}} @php $uid = $shop->user->leader_id; if( $uid == '') { echo '---'; } else { $r = \App\Models\User::where('id',$uid)->first() ; echo $r['name']; } @endphp
{{single_price($total_recharge)}} {{single_price($total_withdraw_money)}} {{single_price($total_difference)}}
{{ $shops->appends(request()->input())->links() }}
@endsection @section('modal') @include('modals.delete_modal') @endsection @section('script') @endsection