@extends('layouts.page', ['title' => 'تاریخچه سفارشات کاربر']) @section('content') @php $setting = App\Models\Setting::first(); $tax = $setting->tax; @endphp

سفارشات تلگرامی کاربر

@php $total = 0 ; $ShowPrice = 1; @endphp @php $num=1; $status_card=0; $is_card = 0; @endphp @foreach(\DB::select('select * from tg_carts where user_id ='. $user_id .' and status<>0',array()) as $item) @else استعلام قیمت @endif @if($ShowPrice==1 || ( $item->status== 2 || $item->status== 3 || $item->status== 4 || $item->status== 7 || $item->status== 15 || $item->status== 16)) @else @endif @php $num++; @endphp @endforeach
ردیف شماره‌ پیگیری تاریخ پرداخت آنلاین جمع کل بن استفاده شده کد تخفیف مبلغ قابل پرداخت وضعیت
{{ $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, '', ',') }} تومان {{ $item->used_bons }} {{ number_format($item->discount_accepted + $item->discount_admin, 0, '', ',') }} {{ number_format($item->total_amount - ($item->discount_accepted + $item->discount_admin ) - $item->discount_bons + ($item->shipping_amount < 10 ? 0 : $item->shipping_amount), 0, '', ',') }} تومان استعلام قیمت {{ $AdminTelegramOrdersController->getStatusTitle( $item->status) }} @if( $item->status==6) تکمیل خرید @elseif( $item->status==8 || $item->status==10) تکمیل خرید @endif مدارک
نمایش جزئیات این سفارش
@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 $item2) @php $amount = $item2->amount; $amount_num = $item2->amount * $item2->num ; if($item2->tax == 0 && $status_card != 6 && $is_card ==0){ $amount += $tax * $amount / 100; $amount_num += $tax * $amount_num / 100; } @endphp @if(App\Models\Product::find($item2->product_id)->ShowPrice() || ( $item->status== 2 || $item->status== 3 || $item->status== 4 || $item->status== 7 || $item->status== 15 || $item->status== 16)) @else @endif @endforeach
شرح محصول تعداد قیمت واحد قیمت کل
{{ $item2->title }} {{ ($item2->color !="" ? " - " . $item2->color : "" ) }} {{ $item2->num }}{{ number_format($amount, 0, '', ',') }} تومان {{ number_format($amount_num, 0, '', ',') }} تومان استعلام قیمت استعلام قیمت
روش ارسال: {{ ($item->shipping_type==0 ? '-' : '') }} {{ ($item->shipping_type==1 ? 'باربری' : '') }} {{ ($item->shipping_type==2 ? 'پست' : '') }} {{ ($item->shipping_type==3 ? 'اکسپرس' : '') }} {{ ($item->shipping_type==4 ? 'تیپاکس' : '') }} {{ ($item->shipping_type==5 ? 'دنت اکسپرس' : '') }} {{ ($item->shipping_type==6 ? 'پست DTS' : '') }}
هزینه ارسال : @if($item->shipping_amount==2) پس‌کرایه @else {{ number_format($item->shipping_amount , 0, '', ',') }} تومان @endif
تحویل گیرنده : {{ $item->first_name . " " . $item->last_name }}
{{ $item->address }} {{ $item->zipcode }}
{{ $item->mobile }}
اطلاعات ارسال: {{ ( $item->posting_info !="" ? $item->posting_info : "-") }}
@stop @section('javascript') @stop