@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
| Rank | Customer Name | @foreach($top_customers['industrial']['periods'] as $period) @php $monthNames =[ '001' => 'Jan', '002' => 'Feb', '003' => 'Mar', '004' => 'Apr', '005' => 'May', '006' => 'Jun', '007' => 'Jul', '008' => 'Aug', '009' => 'Sep', '010' => 'Oct', '011' => 'Nov', '012' => 'Dec' ]; $monthName = $monthNames[$period] ?? $period; @endphp{{ $monthName }} {{ $selected_year }} | @endforeach||
|---|---|---|---|---|
| Sales (kg) | Amount (USD) | Avg Price | @endforeach||
| {{ $customer['rank'] }} | {{ $customer['customer_name'] }} | @foreach($top_customers['industrial']['periods'] as $period){{ number_format($customer['monthly_data'][$period]['sales_kg'] ?? 0, 2) }} | {{ number_format($customer['monthly_data'][$period]['amount_usd'] ?? 0, 2) }} | {{ number_format($customer['monthly_data'][$period]['avg_price'] ?? 0, 2) }} | @endforeach
Showing Top 10 Customers
| Rank | Customer Name | @foreach($top_customers['hygiene_medical']['periods'] as $period) @php $monthNames =[ '001' => 'Jan', '002' => 'Feb', '003' => 'Mar', '004' => 'Apr', '005' => 'May', '006' => 'Jun', '007' => 'Jul', '008' => 'Aug', '009' => 'Sep', '010' => 'Oct', '011' => 'Nov', '012' => 'Dec' ]; $monthName = $monthNames[$period] ?? $period; @endphp{{ $monthName }} {{ $selected_year }} | @endforeach||
|---|---|---|---|---|
| Sales (kg) | Amount (USD) | Avg Price | @endforeach||
| {{ $customer['rank'] }} | {{ $customer['customer_name'] }} | @foreach($top_customers['hygiene_medical']['periods'] as $period){{ number_format($customer['monthly_data'][$period]['sales_kg'] ?? 0, 2) }} | {{ number_format($customer['monthly_data'][$period]['amount_usd'] ?? 0, 2) }} | {{ number_format($customer['monthly_data'][$period]['avg_price'] ?? 0, 2) }} | @endforeach
Showing Top 10 Customers