@extends("front.layout.master") @php $sellerac = App\Store::where('user_id','=', $user->id)->first(); @endphp @section('title',"View Order #$inv_cus->order_prefix$order->order_id |") @section("body")
{{ __('staticwords.Order Details') }} @php $checkOrderCancel = $order->cancellog; $orderlog = $order->fullordercancellog; $deliverycheck = array(); $tstatus = 0; $cancel_valid = array(); @endphp @if(count($order->invoices)>1) @foreach($order->invoices as $inv) @if($inv->variant) @if($inv->variant->products->cancel_avl != 0) @php array_push($cancel_valid,1); @endphp @else @php array_push($cancel_valid,0); @endphp @endif @endif @endforeach @else @php array_push($cancel_valid,0); @endphp @endif @if(isset($order)) @foreach($order->invoices as $sorder) @if($sorder->status == 'delivered' || $sorder->status == 'cancel_request' || $sorder->status =='return_request' || $sorder->status == 'returned' || $sorder->status == 'refunded' || $sorder->status == 'ret_ref') @php array_push($deliverycheck, 0); @endphp @else @php array_push($deliverycheck, 1); @endphp @endif @endforeach @endif @if(in_array(0, $deliverycheck)) @php $tstatus = 1; @endphp @endif
@if(!isset($checkOrderCancel) || !isset($orderlog)) @endif @php if($order->discount != 0){ if($order->distype == 'category'){ $findCoupon = App\Coupan::where('code','=',$order->coupon)->first(); $catarray = collect(); foreach ($order->invoices as $key => $os) { if(isset($os->variant->products) && $os->variant->products->category_id == $findCoupon->cat_id){ $catarray->push($os); } if(isset($os->simple_product) && $os->simple_product->category_id == $findCoupon->cat_id){ $catarray->push($os); } } } } @endphp @foreach($order->invoices as $o) @php $orivar = $o->variant; @endphp
{{ __('staticwords.OrderNumber') }}

#{{ $inv_cus->order_prefix }}{{ $order->order_id }}

{{ __('staticwords.PaymentMethod') }}:

{{ $order->payment_method }}

{{ __('staticwords.OrderDate') }}:

{{ date('d-m-Y',strtotime($order->created_at)) }}

{{ __('staticwords.OrderTotal') }}:

{{ price_format(($order->order_total+$order->handlingcharge),2) }}

{{ __('staticwords.OrderStatus') }}:
@if($o->status == 'delivered') {{ ucfirst($o->status) }} @elseif($o->status == 'processed') {{ ucfirst($o->status) }} @elseif($o->status == 'shipped') {{ ucfirst($o->status) }} @if($o->courier_channel != '' && $o->tracking_link != '' && $o->exp_delivery_date != '')

{{__('Expected delivery by '. date("d-M-Y",strtotime($o->exp_delivery_date)) )}}.

@endif @elseif($o->status == 'return_request') {{ __('Return Request') }} @elseif($o->status == 'returned') {{ __('Returned') }} @elseif($o->status == 'refunded') {{ __('Refunded') }} @elseif($o->status == 'cancel_request') {{ __('Cancelation Request') }} @elseif($o->status == 'canceled') {{ __('Canceled') }} @elseif($o->status == 'Refund Pending') {{ __('Refund in progress') }} @elseif($o->status == 'ret_ref') {{ __('Returned & Refunded') }} @else {{ ucfirst($o->status) }} @endif
@if($o->simple_product) @if($o->simple_product->thumbnail != '') @if($o->simple_product->thumbnail != '' && file_exists(public_path().'/images/simple_products/'.$o->simple_product->thumbnail)) @else @endif @else product name @endif @endif
@if(isset($o->simple_product)) @php $category = App\Category::with('simpleproducts')->where('id','=',$o->simple_product->category_id)->first(); $cat_slug = str_slug($category->title, '-', app()->getLocale()); $subcategory =App\Subcategory::with('simpleproducts')->where('id','=',$o->simple_product->subcategory_id)->first(); $subcat_slug = str_slug($subcategory->title, '-', app()->getLocale()); @endphp {{ $o->simple_product->product_name }}
{{ __('staticwords.SoldBy') }}: {{$o->simple_product->store->name}} @endif

@if($o->order->discount !=0) @if($o->order->distype == 'product') {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} {{ $order->coupon }} applied @elseif($o->order->distype == 'simple_product') {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} {{ $order->coupon }} applied @elseif($o->order->distype == 'category') @if($o->discount != 0) {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} {{ $order->coupon }} applied @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif @elseif($o->order->distype == 'cart') {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} {{ $order->coupon }} applied @endif @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif
({{ __('staticwords.inctax') }})

@if($o->status == 'delivered')

{{ __('staticwords.Your Product is deliverd on') }}
{{ date('d-m-Y @ h:i:a',strtotime($o->updated_at)) }}

@endif @if($o->status == 'return_request') @endif @if($o->status == 'ret_ref')
@endif @if($o->status == 'cancel_request') {{ __('staticwords.Cancellation requested') }} @endif @if($o->status == 'canceled') {{ __('Order is canceled') }} @endif @if($o->status == 'refunded' || $o->status == 'return_request' || $o->status == 'returned' || $o->status == 'ret_ref') @php $refundlog = $o->refundlog; @endphp @if(isset($refundlog)) @if($refundlog->status == 'initiated') {{ __('staticwords.Return Request Intiated with Ref. No:') }} [{{ $refundlog->txn_id }}] @if($refundlog->method_choosen == 'bank')
{{ __('staticwords.Choosen bank:') }} @if(!$refundlog->bank) {{ __('staticwords.Choosen bank has been deleted !') }} @else {{$refundlog->bank->bankname}} (XXXX{{ substr($refundlog->bank->acno, -4) }}) @endif @endif
@else @if($refundlog->method_choosen == 'orignal') @else {{ __('staticwords.Refund Amount') }} {{ $refundlog->amount }} is {{$refundlog->status}} {{ __('staticwords.to your Requested bank a/c') }} {{$refundlog->bank->bankname ?? 'Bank account deleted'}} (XXXX{{ substr($refundlog->bank->acno, -4) }}) @if($refundlog->status !='refunded') {{ __('staticwords.and will be reflected to your a/c in 1-2 working days.') }}@endif
({{ __('staticwords.TXN ID:') }} {{ $refundlog->txn_id }}) .
@if($refundlog->txn_fee != '') {{ __('staticwords.Transcation FEE Charge:') }} {{ $refundlog->txn_fee }} @endif
@endif @endif @endif @endif @php $log = App\CanceledOrders::where('inv_id', '=', $o->id) ->where('user_id',Auth::user()->id) ->with('bank') ->first(); $orderlog = App\FullOrderCancelLog::where('order_id','=',$order->id) ->with('bank') ->first(); @endphp @if(isset($log)) @if($log->method_choosen == 'orignal') @elseif($log->method_choosen == 'bank' && $log->is_refunded == 'pending' ) {{ __('staticwords.Refund Amount') }} {{$log->amount}} {{ __('staticwords.refelect14days') }}
({{ __('staticwords.refno') }} {{ $log->transaction_id }})
@if(isset($log->bank))
{{ __('staticwords.Choosen bank:') }} {{ $log->bank->bankname }} ({{ $log->bank->acno }}) @else {{ __('staticwords.bankkdelete') }} @endif @elseif($log->method_choosen == 'bank' && $log->is_refunded == 'completed' ) {{ __('staticwords.amt') }} {{$log->amount}} {{ __('staticwords.refundbank') }}
@if($log->txn_fee !='') {{ __('Transcation FEE:') }} {{ $log->txn_fee }} @if(isset($log->bank))
{{ __('staticwords.Choosen bank:') }} {{ $log->bank->bankname }} ({{ $log->bank->acno }}) @else {{ __('Choosen Bank ac deleted !') }} @endif @endif
({{ __('staticwords.TXN ID:') }} {{ $log->transaction_id }})
@endif @elseif(isset($orderlog)) @if(in_array($o->id, $orderlog->inv_id)) @if($orderlog->method_choosen == 'orignal') {{ __('staticwords.Refund Amount111') }} @if($o->order->discount !=0) @if($o->order->distype == 'product') @if($o->discount != 0) {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif @elseif($o->order->distype == 'category') @if($o->discount != 0) {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif @elseif($o->order->distype == 'cart') {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} @endif @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif {{ __('staticwords.is refunded to original source') }} ({{ $o->order->payment_method }}). {{ __('staticwords.reflect12days') }}
({{ __('staticwords.TXN ID:') }} {{ $orderlog->txn_id }})
@elseif($orderlog->method_choosen == 'bank' && $orderlog->is_refunded == 'pending' ) {{ __('staticwords.Refund Amount') }} @if($o->order->discount !=0) @if($o->order->distype == 'product') @if($o->discount != 0) {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif @elseif($o->order->distype == 'category') @if($o->discount !=0 || $o->discount !='') {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif @elseif($o->order->distype == 'cart') {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} @endif @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif {{ __('staticwords.refelect14days') }}
({{ __('staticwords.refno') }} {{ $orderlog->txn_id }})
@if(isset($orderlog->bank))
{{ __('staticwords.Choosen bank:') }} {{ $orderlog->bank->bankname }} ({{ $orderlog->bank->acno }}) @else {{ __('staticwords.bankmodifyordelete') }} @endif @endif @if($orderlog->method_choosen == 'bank' && $orderlog->is_refunded == 'completed' ) @if(in_array($o->id, $orderlog->inv_id)) {{ __('staticwords.amt') }} @if($o->order->discount !=0) @if($o->order->distype == 'product') @if($o->discount != 0) {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif @elseif($o->order->distype == 'category') @if($o->discount != 0) {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif @else {{ price_format(($o->qty*$o->price+$o->tax_amount+$o->shipping)-$o->discount,2) }} @endif @else {{ price_format($o->qty*$o->price+$o->tax_amount+$o->shipping,2) }} @endif {{ __('staticwords.refundbank') }}
@if($orderlog->txn_fee !='') {{ __("Transcation FEE:") }} {{ $orderlog->txn_fee }} @endif
({{ __('staticwords.TXN ID:') }} {{ $orderlog->txn_id }})
@php $bank = $orderlog->bank; @endphp @if(isset($bank))
{{ __('staticwords.Choosen bank:') }} {{ $bank->bankname }} ({{ $bank->acno }}) @else {{ __('staticwords.bankkdelete') }} @endif @endif @endif @endif @endif @if($o->local_pick =='') @if($o->status == 'pending' || $o->status == 'processed' || $o->status == 'shipped') {{ __('staticwords.Track') }} @if($o->courier_channel != '' && $o->tracking_link != '' && $o->exp_delivery_date != '')

{{ __('staticwords.ordershippedvia') }} {{ $o->courier_channel }} {{ __('staticwords.trackpkg') }} {{ $o->tracking_link }} {{__('staticwords.expecteddelivery'. date("d-M-Y",strtotime($o->exp_delivery_date)) )}}.

@endif @endif @else @if($o->status != 'delivered' && $o->status !='refunded' && $o->status !='ret_ref' && $o->status !='returned' && $o->status != 'canceled' && $o->status != 'return_request')

{{ __('staticwords.lpickupdatetext') }}

{{ $o->loc_deliv_date == '' ? "Yet to update" : date('d/m/Y',strtotime($o->loc_deliv_date)) }} • {{ __('staticwords.expandmore') }}

@endif @endif
@if(isset($orivar->products) && $orivar->products->cancel_avl == '1') @if($o->status == 'pending' || $o->status == 'processed') @php $secureid = Crypt::encrypt($o->id); @endphp @endif @else @if(!in_array($o->status,['shipped','delivered','refunded','return_request','ret_ref','Refund Pending','canceled'])) @if($o->simple_product->cancel_avbl == '1') @if($o->status != 'returned') @endif @else @endif @endif @endif @if($o->status == 'refunded') {{ __('staticwords.refund') }} @elseif($o->status == 'shipped') {{ __('staticwords.shipped') }} @elseif($o->status == 'Refund Pending')

@elseif($o->status == 'returned') {{ __('Order is returned') }} @endif @if(isset($orivar->products)) @if($orivar->products->return_avbl == '1' && $o->status == 'delivered') @php $days = $orivar->products->returnPolicy->days; $endOn = date("d-M-Y", strtotime("$o->updated_at +$days days")); $today = date('d-M-Y'); @endphp @if($today == $endOn) @else {{ __('staticwords.rtn') }} @endif @else @endif @elseif(isset($o->simple_product) && $o->status == 'delivered') @if($o->simple_product->return_avbl == '1') @php $days = $o->simple_product->returnPolicy->days; $endOn = date("d-M-Y", strtotime("$o->updated_at +$days days")); $today = date('d-M-Y'); @endphp @if($today == $endOn) @else {{ __('staticwords.rtn') }} @endif @else @endif @endif @if($o->status == 'delivered' || $o->status == 'return_request') {{ __('staticwords.invoice') }} @endif @if($o->status == 'delivered') @if(isset($o->simple_product) && $o->simple_product->type == 'd_product') {{ __('Download') }} @endif @endif
@if( isset($o->variant) || isset($o->simple_product) ) @endif @if($o->status != 'delivered' && $o->local_pick != '') @endif
@endforeach

{{ __('staticwords.ShippingAddress') }}


{{ $address->name }}, {{ $address->phone }}
{{ strip_tags($address->address) }}, @php $c = App\Allcountry::where('id',$address->country_id)->first()->nicename; $s = App\Allstate::where('id',$address->state_id)->first()->name; $ci = App\Allcity::where('id',$address->city_id)->first() ? App\Allcity::where('id',$address->city_id)->first()->name : ''; @endphp {{ $ci }}, {{ $s }}, {{ $ci }} {{ $address->pin_code }}

{{ __('staticwords.BillingAddress') }}


{{ $order->billing_address['firstname'] }}, {{ $order->billing_address['mobile'] }}
{{ strip_tags($order->billing_address['address']) }}, @php $c = App\Allcountry::where('id',$order->billing_address['country_id'])->first()->nicename; $s = App\Allstate::where('id',$order->billing_address['state'])->first()->name; $ci = App\Allcity::where('id',$order->billing_address['city'])->first() ? App\Allcity::where('id',$order->billing_address['city'])->first()->name : ''; @endphp {{ $ci }}, {{ $s }}, {{ $ci }} @if(isset($order->billing_address['pincode'])) {{ $order->billing_address['pincode'] }} @endif

{{ __('staticwords.PaymentDetails') }}


{{ __('staticwords.Total') }}: {{ price_format($order->order_total,2) }}
{{ __('staticwords.TotalGiftCharge') }}: {{ price_format($order->gift_charge,2) }}
{{ __('staticwords.HandlingCharge') }}: {{ price_format($order->handlingcharge,2) }}
{{ __('staticwords.OrderTotal') }}: {{ price_format(($order->order_total+$order->handlingcharge),2) }}
@endsection @section('script') @endsection