@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')
{{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) |
{{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 ?? ''}} |