@php $locale = app()->getLocale() != 'vi' ? 'en' : 'vi'; $dateFormat = config('datetime.' . $locale . '.format'); $dateFormatUpperCase = strtoupper($dateFormat); $startsAt = !empty($args->starts_at ?? '') ? Common::date($args->starts_at) : ''; $endsAt = !empty($args->ends_at ?? '') ? Common::date($args->ends_at) : ''; $totalOrder = $report->total_order ?? 0; $totalRevenue = $report->total_revenue ?? 0; $promotion = $report->promotion ?? new stdClass; $avergrate = $report->avergrate ?? new stdClass; $orders = $report->orders ?? []; @endphp @extends('shared.admin') @section('content')

Dashboard

@foreach(config('status.order') as $k=>$v) @php $statusBg = config('status.order_bg.' . $k); $statusIcon = config('status.order_icon.' . $k); $statusCount = $orders[$k] ?? 0; @endphp
{{trans('admin::message.status.' . $v)}} {{Common::numberFormat($statusCount)}}@if($totalOrder > 0) / {{Common::numberFormat($totalOrder)}}
{{round(($statusCount/$totalOrder)*100,1)}}% @endif
@endforeach
Total Revenue {{ Common::numberFormat($totalRevenue) }}
Khuyến mãi/ giảm giá {{ Common::numberFormat($promotion->amount ?? 0) }}đ @if(($promotion->count ?? 0) > 0) ( {{Common::numberFormat($promotion->count ?? 0)}} @if($totalOrder > 0)/ {{Common::numberFormat($totalOrder)}} ~ {{round(($promotion->count/$totalOrder)*100,1)}}% @endif @endif
Thời gian xử lý đơn hàng {{ gmdate('H:i:s', $avergrate->time ?? 0) }} @if(($avergrate->count ?? 0) > 0) / {{Common::numberFormat($avergrate->count ?? 0)}} H.Đ @endif

Tiki Order Status

@if(count($report->products ?? []) > 0 )

Sản phẩm chốt đơn thành công

@foreach($report->products as $product) @endforeach
Sản phẩm Số lượng Thành tiền
{{$product->title}} {{Common::numberFormat($product->count ?? 0)}} {{Common::numberFormat($product->amount ?? 0)}}
@endif
@endsection @section('style') @parent @endsection @section('script') @parent @endsection @section('js-ext') @parent @endsection