@extends('layouts.admin') @section('header-content') @endsection @section('content')
Profile information
@if(Auth::user()->can('modify_members')) @endif
Name {{$user->firstname.' '.$user->lastname }} Father Name {{$user->fathername}}
Religion {{$user->religion}} Gender {{$user->gender}}
CNIC # {{$user->cnic}} Landline # {{$user->landline}}
Phone 1 {{$user->phone_1}} Phone 2 {{$user->phone_2}}
Date of Birth {{$user->dob}} Address {{$user->address}}
Account information
@if($user->roles->first()->name!='rsm') @endif
Username {{$user->username}} Email {{$user->email}}
Role {{$user->roles->first()->display_name}} Joining Date {{$user->joining_date}}
Regional Sales Manager @if(isset($user->region) && isset($user->region->rsm)){{$user->region->rsm->firstname.' '.$user->region->rsm->lastname}} @endif
Country {{$user->country->name}} Region @if(isset($user->region)){{$user->region->name}} @endif
Created At {{$user->created_at}} Updated At {{$user->updated_at}}
Total Customers : {{count($user->shops)}}
@if(count($user->shops)>0)
@foreach($user->shops as $key=>$shop) @endforeach
# Customers Balance Location Customer Type Action
{{$key+1}} {{$shop->name}} {{(-1)*$shop->balance}} {{$shop->location}} {{$shop->customer_type}}
{!! method_field('DELETE') !!} {!! csrf_field() !!}

@else

No Records Found

@endif
Sale & Recovery
Sales: {{$user->CMonthSale($user->id)}}
Recovery: {{$user->CMonthRecovery($user->id)}}
@php $salesSummary=$user->CMonthSalesAndRecovery($user->id);@endphp @if(count($salesSummary)>0)
@foreach($salesSummary as $key=>$tenure) @endforeach
Date Sales Recovery
{{$tenure['date']}} @if($tenure['ledger_type']=='order'){{$tenure['payment']}} @endif @if($tenure['ledger_type']=='payment'){{$tenure['amount']}} @endif
@else

No Records Found

@endif
Current Month Expense
@php $ExpenseSummary=$user->CMonthExpense($user->id);@endphp @if(count($ExpenseSummary)>0)
@foreach($ExpenseSummary as $key=>$expense) @endforeach
Date Expense Type Amount
{{$expense['date']}} {{$expense->expense->name}} {{$expense['amount']}}
@else

No Records Found

@endif
Available Stock :
@if(count($user->avalableStocks)>0)
@foreach($user->avalableStocks as $key=>$stock) @endforeach
# Product Quantity
{{$key+1}} @if(isset($stock->product->name)){{$stock->product->name}} @endif @if(!empty($stock->qty)) @php $rem=0; $rem=($stock->qty)%12 @endphp {{round(($stock->qty)/12).' Dozen ' }} @if(!empty($rem) && $rem!=0) {{(' + '.$rem . ' piece ')}} @endif @endif

@else

No Records Found

@endif
@endsection @section('footer-content') {{----}} @endsection