@if($filter_type == 'monthly' || $filter_type == 'yearly' || ($filter_type == 'customer' && $customer_id))
@if($filter_type == 'customer' && $selected_customer)
ڕاپۆرتی مانگانەی {{$selected_customer->name}}
@else
چارتی باشترین کڕیارەکان
@endif
@endif
@if($filter_type == 'customer' && $customer_id && $selected_customer)
{{number_format($customer_details['total_orders'])}}
کۆی داواکاریەکان
{{number_format($customer_details['total_amount'], 0)}} د.ع
کۆی کڕین
{{number_format($customer_details['avg_order'], 0)}} د.ع
مامناوەندی داواکاری
@if($customer_details['first_order'])
{{date('Y-m-d', strtotime($customer_details['first_order']->created_at))}}
یەکەم داواکاری
@endif
@if($customer_details['last_order'])
{{date('Y-m-d', strtotime($customer_details['last_order']->created_at))}}
دوا داواکاری
@endif
ئامارەکانی مانگانە بۆ ساڵی {{$year}}
| مانگ |
ژمارەی داواکاریەکان |
کۆی کڕین |
@foreach($customer_monthly_stats as $stat)
| {{$stat['month']}} |
{{$stat['orders']}} |
{{number_format($stat['total'], 0)}} د.ع |
@endforeach
@if(count($customer_top_products) > 0)
کاڵا زۆرترین کڕینەکان
@foreach($customer_top_products as $index => $product)
{{ $index + 1 }}
@if($product->image)

@else
@endif
{{$product->kurdish}}
{{number_format($product->total_qty)}} دانە لە {{number_format($product->order_count)}} داواکاری
{{number_format($product->total_amount, 0)}} د.ع
@endforeach
@endif
@if($customer_orders->count() > 0)
داواکاریە دواییەکان
| ژمارە |
بەروار |
کۆی نرخ |
دۆخ |
کردار |
@foreach($customer_orders as $order)
| #{{$order->id}} |
{{date('Y-m-d H:i', strtotime($order->created_at))}} |
{{number_format($order->total, 0)}} د.ع |
@if($order->status == 'new')
نوێ
@elseif($order->status == 'processing')
لە ژێر پرۆسەدا
@elseif($order->status == 'completed')
تەواو بووە
@else
هەڵوەشێنراوە
@endif
|
|
@endforeach
{{ $customer_orders->appends(request()->query())->links() }}
@endif
@endif
@if($filter_type != 'customer')
باشترین 10 کڕیار (هەموو کاتەکان)
@foreach($top_customers_all_time as $index => $customer)
{{number_format($customer->order_count)}}
ژمارەی داواکاریەکان
{{number_format($customer->total_amount, 0)}} د.ع
کۆی کڕین
{{number_format($customer->total_amount / $customer->order_count, 0)}} د.ع
مامناوەندی
@if($customer->last_order)
{{date('Y-m-d', strtotime($customer->last_order))}}
دوا داواکاری
@endif
@endforeach
@endif
@if(($filter_type == 'monthly' || $filter_type == 'yearly') && count($top_customers_monthly) > 0)
لیستی باشترین کڕیارەکان بەپێی {{ $filter_type == 'monthly' ? 'مانگ' : 'ساڵ' }}
| {{ $filter_type == 'monthly' ? 'مانگ' : 'ساڵ' }} |
ناوی کڕیار |
ژمارەی داواکاریەکان |
کۆی کڕین |
کردار |
@foreach($chart_labels as $index => $label)
| {{$label}} |
@if($top_customers_monthly[$index])
{{$top_customers_monthly[$index]->name}} |
{{$top_customers_monthly[$index]->order_count}} |
{{number_format($top_customers_monthly[$index]->total_amount, 0)}} د.ع |
|
@else
هیچ داواکاریەک نییە |
@endif
@endforeach
@endif
@endsection