Kỳ báo cáo

Tính theo ngày giao hoặc ngày tạo nếu đơn chưa có ngày giao.

@unless ($invalidPeriod)

đến

@endunless
@foreach ($presets as $key => $preset) @endforeach
@if ($invalidPeriod)

Chọn khoảng thời gian hợp lệ, tối đa 10 năm.

@else

Kết quả bán hàng

Chỉ tính các đơn đã giao thành công.

@php $primary = [ 'Tổng thành tiền đã giao' => ['₫', 'Cộng thành tiền của các đơn đã giao.'], 'Số đơn đã giao' => ['đơn', 'Giao thành công trong kỳ báo cáo.'], ]; $secondary = [ 'Tiền cọc ghi nhận' => '₫', ]; @endphp
@foreach ($primary as $label => [$unit, $note])
{{ $label }}
{{ number_format($metrics[$label], 0, ',', '.') }} {{ $unit }}
{{ $note }}
@endforeach @foreach ($secondary as $label => $unit)
{{ $label }}
{{ number_format($metrics[$label], 0, ',', '.') }} {{ $unit }}
@endforeach
@livewire(\App\Filament\ReportWidgets\OrderSeriesChart::class, [ 'kind' => 'line', 'title' => $monthly ? 'Thành tiền đã giao theo tháng' : 'Thành tiền đã giao theo ngày', 'unit' => 'Đồng', 'series' => $line, ], key('order-revenue-'.md5(json_encode([$monthly, $line]))))
@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) @foreach ($varieties as $row) @php $quantity = (int) round($row['amount'] * 100); @endphp @endforeach
Giống chanh dây Thùng Cây
{{ $row['label'] }} {{ number_format(intdiv($quantity, 100), 0, ',', '.') }} {{ $quantity % 100 }}
@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