@extends('layouts.page', ['title' => 'تاریخچه سفارشات کاربر']) @section('content') @php $setting = App\Models\Setting::first(); $tax = $setting->tax; @endphp
| ردیف | شماره پیگیری | تاریخ | پرداخت آنلاین | جمع کل | بن استفاده شده | کد تخفیف | مبلغ قابل پرداخت | وضعیت | ||
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $num }} | DO-{{ $item->id }} | @if($item->status== 6|| $item->status== 8 || $item->status== 0 ){{ GetShamsiDate($item->updated_at) }}@else{{ $item->paid_at != '0000-00-00 00:00:00' && $item->paid_at != '' ? GetShamsiDate($item->paid_at) : GetShamsiDate($item->updated_at) }}@endif | {{ $item->paid }} تومان | @php $total = 0 ; @endphp @foreach(\DB::select('select *,(select title from products where id=tg_cart_items.product_id) as title,(select link from products where id=tg_cart_items.product_id) as link, amount,(select tax from products where id=tg_cart_items.product_id) as tax from tg_cart_items where tg_cart_id = ' . $item->id,array()) as $item_p) @php if(!App\Models\Product::find($item_p->product_id)->ShowPrice()) { $ShowPrice = 0; } $amount = $item_p->amount; $amount_num = $item_p->amount * $item_p->num ; $is_card=$item->is_card; $status_card=$item->status; if($item_p->tax == 0 && $item->status != 6 && $item->is_card ==0){ $amount += $tax * $amount / 100; $amount_num += $tax * $amount_num / 100; } @endphp @php $total +=$amount_num ; //$item->paid if($item->discount_amount!=0) $item->used_bons = 0; if($item->discount_amount!=0) $item->discount_bons = 0; @endphp @endforeach @if($ShowPrice==1 || ( $item->status== 2 || $item->status== 3 || $item->status== 4 || $item->status== 7 || $item->status== 15 || $item->status== 16)) {{ number_format($total, 0, '', ',') }} تومان | @else استعلام قیمت @endif{{ $item->used_bons }} | {{ number_format($item->discount_accepted + $item->discount_admin, 0, '', ',') }} | @if($ShowPrice==1 || ( $item->status== 2 || $item->status== 3 || $item->status== 4 || $item->status== 7 || $item->status== 15 || $item->status== 16)){{ number_format($item->total_amount - ($item->discount_accepted + $item->discount_admin ) - $item->discount_bons + ($item->shipping_amount < 10 ? 0 : $item->shipping_amount), 0, '', ',') }} تومان | @elseاستعلام قیمت | @endif{{ $AdminTelegramOrdersController->getStatusTitle( $item->status) }} @if( $item->status==6) تکمیل خرید @elseif( $item->status==8 || $item->status==10) تکمیل خرید @endif | مدارک |
|
نمایش جزئیات این سفارش
|
||||||||||