@extends('layouts.admin') @section('content')
Agent sales report
Clear

@foreach($users as $member) @php $month_sell = member_last_3month_sell($member->id); $p_target_amount = p_target($member->id); @endphp @endforeach
Name {{now()->subMonth(2)->format('M')}}, {{now()->subMonth(1)->format('M')}}, {{now()->format('M')}} Sell {{now()->subMonth(1)->format('M')}} Sell {{now()->format('M')}} Sell {{now()->subMonth(2)->format('M')}}, {{now()->subMonth(1)->format('M')}}, {{now()->format('M')}} Team Sell {{now()->subMonth(1)->format('M')}} Team Sell {{now()->format('M')}} Team Sell Current Commission Target Percentage Applicable Personal Sell Applicable Team Sell Expiry Start Date Expiry End Date Action
{{ $member->name }} ({{$member->user_id }}){{ $month_sell }} {{ agent_last_month_sell($member->id) }} {{ agent_this_month_sell($member->id) }} {{ agent_last_3month_team_sell($member->id) }} {{ agent_last_month_team_sell($member->id) }} {{ agent_this_month_team_sell($member->id) }} {{ round(current_commission($member->id)) }} P:{{ $p_target_amount }} T:{{ t_target($member->id) }} @if($month_sell>0 && $p_target_amount>0) @php $per_amount = $p_target_amount/100; @endphp {{round($month_sell/$per_amount)}}% @else @endif
@csrf
@csrf
{{ $member->commission_expiry_start_date != '' ? date('d-m-Y', strtotime($member->commission_expiry_start_date)) : '' }} {{ $member->commission_expiry_end_date != '' ? date('d-m-Y', strtotime($member->commission_expiry_end_date)) : '' }}
@csrf @if( $member->commission_status == 0) @endif
{{ $users->appends(request()->query())->links() }}
@push('alljs') @endpush @endsection