@extends('layouts.app') @section('title', 'Monthly Orders Summary') @section('content')

Monthly Orders โ€“ {{ $year }}

@php $prevYear = $year - 1; $nextYear = $year + 1; $months = [ 1 => 'January', 2 => 'February', 3 => 'March', 4 => 'April', 5 => 'May', 6 => 'June', 7 => 'July', 8 => 'August', 9 => 'September', 10 => 'October', 11 => 'November', 12 => 'December' ]; $maxPrice = max(array_map(fn($d) => $d['total_price'] ?? 0, $monthlyData)); @endphp
« Prev Year Next Year »
{{-- MONTHLY SUMMARY GRID --}}
@foreach ($months as $m => $name) @php $data = $monthlyData[$m] ?? ['total_price' => 0, 'total_qty' => 0]; $totalPrice = $data['total_price'] ?? 0; $totalQty = $data['total_qty'] ?? 0; // Color intensity based on total sales $intensity = $maxPrice > 0 ? min(1, $totalPrice / $maxPrice) : 0; $bgColor = "rgba(33, 150, 243, $intensity)"; // blue intensity $textColor = $intensity > 0.5 ? '#fff' : '#000'; @endphp @endforeach
{{-- YEARLY TOTAL SUMMARY --}}

แžแž˜แŸ’แž›แŸƒแžŸแžšแžปแž”แž€แŸ’แž“แžปแž„แžšแž™แŸˆแž–แŸแž› แŸกแŸข แžแŸ‚ โ€“ {{ $year }}

๐Ÿ’ฐ แžแž˜แŸ’แž›แŸƒแžŸแžšแžปแž”

{{ number_format($yearTotalPrice, 2) }} $

๐Ÿ“ฆ แž…แŸ†แž“แžฝแž“แžŸแžšแžปแž”

{{ number_format($yearTotalQty) }}

@endsection