@php $total = $orders->total ?? 0; $items = $orders->items ?? []; $products = $orders->products ?? []; $responseTimes = $orders->responseTimes ?? []; $currentPage = $args->page ?? 1; $limitPage = $args->limit ?? 50; @endphp @extends('shared.admin') @section('content')

CS Report

@include('admin.order.elements.location')
@include('admin.order.elements.channel')

All CS Report

@if(count($items) > 0) @foreach($items as $k=>$item) @php $qnty = 0; $totalAmount = 0; $prods = $products[$item->id] ?? []; $countProd = count($prods); $rsTime = $responseTime[$item->id] ?? 0; @endphp @endforeach @else @endif
{{trans('admin::order.number.label')}} {{trans('admin::order.date.created_at')}} {{trans('admin::order.item.label')}} {{trans('admin::order.product.label')}} {{trans('admin::order.quantity.label')}} Thành tiền Giảm giá Tổng tiền Trạng thái Thời gian response CS
{{ (($currentPage - 1) * $limitPage + $k + 1) }} {{Common::date($item->created_at)}} ORDER{{$item->id}} @if(!empty($item->promotion_name ?? ''))

{{trans('admin::order.promotion.label')}}: {{$item->promotion_name}}

@endif @if($countProd > 0)

@foreach($prods as $j=>$prod) @php $qnty += $prod->quanlity ?? 0; $totalPrice = ($prod->quanlity ?? 0) * ($prod->price ?? 0); $totalAmount += $totalPrice; @endphp @if($j > 0)
@endif {{$prod->quanlity}} x {{$prod->title}} = {{Common::numberFormat($totalPrice)}} @endforeach

@endif
{{Common::numberFormat($qnty)}} {{Common::numberFormat($totalPrice ?? 0)}} {{Common::numberFormat($item->discount ?? 0)}} {{Common::numberFormat((($item->totalprice ?? 0) > 0) ? $item->totalprice : ($totalAmount - $item->discount ?? 0))}} @php $orderColor = config('status.order_color.' . $item->status); $orderStatus = config('status.order.' . $item->status); @endphp {{trans('admin::message.status.' . $orderStatus)}} {{ gmdate('H:i:s', $rsTime ?? 0) }} {{$item->cs_name ?? ''}}
@include('admin.components.elements.paging')
@endsection @section('style') @endsection @section('script') @endsection