@for ($i = 0; $i < count($list); $i++) @php $m = $list[$i]; $product = $listProduct[$i]; $quanlity = 0; $price = 0; @endphp @endfor
ID Ngày Mã Đơn Mã Hàng Tên hàng Số lượng bán Thành tiền Trạng thái Thời gian response CS
{{ $i + 1 }} {{ Carbon\Carbon::parse($m->created_at)->format('d-m-Y') }} {{ 'ORDER' . $m->id }} @if($product != null && count($product) > 0) {{ $product[0]->name }} @endif @if($product != null && count($product) > 0 ) {{ $product[0]->title }} @endif @if($product != null && count($product) > 0 ) {{ $product[0]->quanlity }} @endif @if($product != null && count($product) > 0) {{ $product[0]->quanlity * $product[0]->price }} @endif @if($m->status == 1) Pending @elseif($m->status == 6) Redial @elseif($m->status == 2) Confirmed @elseif($m->status == 3) In Progress @elseif($m->status == 4) Completed @elseif($m->status == 5) Cancel @endif {{ \App\Http\Controllers\ReportController::duration($m->created_at, $m->updated_at) }} {{ $m->csname }}