@extends('layouts.app') @section('title') Team Income @endsection @section('content')
Team Income {{' = $'.number_format($totalSum,2)}}
@if((Auth::user()->user_role == 1 || Auth::user()->user_role == 2) && isset($agent_manager))
@csrf
@endif

{{ __('Team Income') }}

@csrf
From
To
Reset
@if(count($leadListingPaginated) > 0) @foreach ($leadListingPaginated as $leadListingItem) @if($leadListingItem['leadclient']->curr_status != 'Repeat')
ID Name Agent Name Invoiced Total Payment Payment Date Status @if(request('sort_by') === 'curr_status') @if(request('sort_order') === 'asc') {{-- Ascending --}} @else {{-- Descending --}} @endif @else {{-- Default Sort --}} @endif Deduction($) Agent Income($) Team Income($) Paid Out
#{{ $leadListingItem['leadclient']->id }} {{ ucfirst($leadListingItem['leadclient']->fname).' '.ucfirst($leadListingItem['leadclient']->lname) }} {{ $leadListingItem['leadclient']->agent_name ?? '' }} {{ isset($leadListingItem['leadcalculatdata']['invoiced_total']) && is_numeric($leadListingItem['leadcalculatdata']['invoiced_total']) ? '$'.number_format($leadListingItem['leadcalculatdata']['invoiced_total'] ?? 0, 2) : '' }} {{ isset($leadListingItem['leadclient']->payment) ? '$'.number_format($leadListingItem['leadclient']->payment,2) : ''}} {{ ($leadListingItem['leadcalculation']['paid_date'] == '01/01/1970' || $leadListingItem['leadcalculation']['paid_date'] == '01-01-1970') ? '' : $leadListingItem['leadcalculation']['paid_date'] }} {{ set_status_name($leadListingItem['leadclient']->curr_status) }}