@if (Auth::user()->avatar_original != null) @else @endif @if(Auth::user()->user_type == 'customer' || Auth::user()->user_type == 'delivery_boy')

{{ Auth::user()->name }}

@else

{{ Auth::user()->name }} @if(Auth::user()->seller->verification_status == 1) @else @endif

@endif
@if (get_setting('vendor_system_activation') == 1 && Auth::user()->user_type == 'customer')
{{ translate('Be A Seller') }}
@endif @if(Auth::user()->user_type == 'seller')

{{ translate('Sold Amount')}}

@php $date = date("Y-m-d"); $days_ago_30 = date('Y-m-d', strtotime('-30 days', strtotime($date))); $days_ago_60 = date('Y-m-d', strtotime('-60 days', strtotime($date))); @endphp
@php $orderTotal = \App\Order::where('seller_id', Auth::user()->id)->where("payment_status", 'paid')->where('created_at', '>=', $days_ago_30)->sum('grand_total'); //$orderDetails = \App\OrderDetail::where('seller_id', Auth::user()->id)->where('created_at', '>=', $days_ago_30)->get(); //$total = 0; //foreach ($orderDetails as $key => $orderDetail) { //if($orderDetail->order != null && $orderDetail->order != null && $orderDetail->order->payment_status == 'paid'){ //$total += $orderDetail->price; //} //} @endphp {{ translate('Your sold amount (current month)')}} {{ single_price($orderTotal) }}
@php $orderTotal = \App\Order::where('seller_id', Auth::user()->id)->where("payment_status", 'paid')->sum('grand_total'); @endphp @php $orderTotal = \App\Order::where('seller_id', Auth::user()->id)->where("payment_status", 'paid')->where('created_at', '>=', $days_ago_60)->where('created_at', '<=', $days_ago_30)->sum('grand_total'); @endphp
{{ translate('Total Sold')}}: {{ single_price($orderTotal) }}
{{ translate('Last Month Sold')}}: {{ single_price($orderTotal) }}
@endif