@extends('layouts.app') @section('title', __('dashboard.Laundry Statistics')) @section('page_heading', __('dashboard.Laundry Statistics')) @section('content') @php $formattedStart = $startDate->format('Y-m-d'); $formattedEnd = $endDate->format('Y-m-d'); $totalOps = collect($chartData['operations'])->sum(); $totalAmount = collect($chartData['amount'])->sum(); $daysCount = max(count($chartData['labels']), 1); $avgPerDay = $totalAmount / $daysCount; $maxOps = collect($chartData['operations'])->max() ?? 0; $maxOpsLabel = $maxOps > 0 ? ($chartData['labels'][collect($chartData['operations'])->search($maxOps)] ?? '—') : '—'; $avgOpsPerDay = $totalOps / $daysCount; @endphp @include('dashboard.statistics.partials.nav') @include('dashboard.statistics.partials.filter', [ 'filterAction' => route('dashboard.statistics.laundry'), 'range' => $range, 'formattedStart' => $formattedStart, 'formattedEnd' => $formattedEnd, 'exportRoute' => route('dashboard.statistics.laundry.export', ['custom_start'=>$formattedStart,'custom_end'=>$formattedEnd,'range'=>$range]), 'exportXlsRoute' => route('dashboard.statistics.laundry.export', ['custom_start'=>$formattedStart,'custom_end'=>$formattedEnd,'range'=>$range,'format'=>'xls']), ]) {{-- KPIs --}}
| {{ $h }} | @endforeach||||
|---|---|---|---|---|
| {{ $i+1 }} | {{ $date }} | {{ number_format($chartData['operations'][$i]) }} |
{{ number_format($chartData['amount'][$i],2) }}
ج.م
|
{{ number_format($pct,1) }}%
|
| الإجمالي | {{ number_format($totalOps) }} | {{ number_format($totalAmount,2) }} ج.م | 100% | |