Chọn khoảng thời gian hợp lệ, tối đa 10 năm.
@else
@livewire(\App\Filament\ReportWidgets\OrderSeriesChart::class, [
'kind' => 'bar',
'title' => 'Số thùng đã giao theo giống',
'unit' => 'Thùng',
'series' => $varieties,
], key('order-varieties-'.md5(json_encode($varieties))))
@if ($varieties)
| Giống chanh dây |
Thùng |
Cây |
@foreach ($varieties as $row)
@php
$quantity = (int) round($row['amount'] * 100);
@endphp
| {{ $row['label'] }} |
{{ number_format(intdiv($quantity, 100), 0, ',', '.') }} |
{{ $quantity % 100 }} |
@endforeach
@else
Chưa có giống nào được giao trong kỳ này.
@endif
@php
$pieTitles = ['Đơn đã giao theo nhóm khách', 'Đơn đã giao theo tỉnh'];
$chartGroups = [
'pie' => array_intersect_key($charts, array_flip($pieTitles)),
'bar' => array_diff_key($charts, array_flip($pieTitles)),
];
@endphp
@foreach ($chartGroups as $kind => $group)
@foreach ($group as $title => [$rows, $unit])
@livewire(\App\Filament\ReportWidgets\OrderSeriesChart::class, [
'kind' => $kind, 'title' => $title, 'unit' => $unit, 'series' => $rows,
], key('order-breakdown-'.md5(json_encode([$kind, $title, $rows]))))
@endforeach
@endforeach
@endif