@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
{{ translate('Total Sold')}}:
|
{{ single_price($orderTotal) }}
|
@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('Last Month Sold')}}:
|
{{ single_price($orderTotal) }}
|