@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")
@include('user.sidebar')
{{ __('Order') }} #{{ $inv_cus->order_prefix }}{{ $order->order_id }} @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
{{ __('staticwords.ShippingAddress') }} {{ __('staticwords.BillingAddress') }}

{{ $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 }}

{{ $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.TranscationID') }}: {{ $order->transaction_id }} {{ __('staticwords.PaymentMethod') }}: {{ $order->payment_method }} {{ __('staticwords.OrderDate') }}: {{ date('d-m-Y',strtotime($order->created_at)) }}
@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
  @if(isset($orivar->products)) @if($orivar->products->cancel_avl == '1') @if($o->status == 'pending' || $o->status == 'processed') @php $secureid = Crypt::encrypt($o->id); @endphp @else @endif @endif @else @if(!in_array($o->status,['shipped','delivered','refunded','return_request','ret_ref','Refund Pending','canceled'])) @if($o->simple_product->cancel_avbl == '1') @else @endif @endif @endif @if($o->status == 'refunded') {{ __('Refunded') }} @elseif($o->status == 'shipped') {{ __('Shipped') }} @elseif($o->status == 'Refund Pending') {{ __('Refund in progress') }} @elseif($o->status == 'returned') {{ __('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 {{ __('Return') }} @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 {{ __('Return') }} @endif @else @endif @endif @if($o->status == 'delivered' || $o->status == 'return_request') {{ __('Invoice') }} @endif @if($o->status == 'delivered') @if(isset($o->simple_product) && $o->simple_product->type == 'd_product') {{ __('Download') }} @endif @endif
@if(isset($orivar)) @if(isset($orivar->variantimages) && file_exists(public_path().'/variantimages/thumbnails/'.$orivar->variantimages->main_image)) product name @else product name @endif @endif @if($o->simple_product) @if($o->simple_product->thumbnail != '' && file_exists(public_path().'/images/simple_products/'.$o->simple_product->thumbnail)) @else product name @endif @endif
@if(isset($orivar->products)) {{substr($orivar->products->name, 0, 30)}}{{strlen($orivar->products->name)>30 ? '...' : ""}} ({{variantname($o->variant)}})
{{ __('Sold By:') }} {{$orivar->products->store->name}} @endif @if(isset($o->simple_product)) {{ $o->simple_product->product_name }}
{{ __('staticwords.SoldBy') }}: {{$o->simple_product->store->name}} @endif
{{ __('Qty:') }} {{$o->qty}}
@if($o->status == 'delivered')

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

@endif @if($o->status == 'return_request') {{ __('Return Requested') }}
@endif @if($o->status == 'ret_ref') {{ __('Returned & Refunded') }}
@endif @if($o->status == 'cancel_request') {{ __('Cancellation requested') }} @endif @if($o->status == 'canceled') {{ __('Cancelled') }}

@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') {{ __('Return Request Intiated with Ref. No:') }} [{{ $refundlog->txn_id }}] @if($refundlog->method_choosen == 'bank')
{{ __('Choosen bank:') }} @if(!$refundlog->bank) {{ __('Choosen bank has been deleted !') }} @else {{$refundlog->bank->bankname}} (XXXX{{ substr($refundlog->bank->acno, -4) }}) @endif @endif
@else @if($refundlog->method_choosen == 'orignal') {{ __('Refund Amount') }} {{ $refundlog->amount }} {{ __('is') }} {{$refundlog->status}} {{ __('to your Requested payment source') }} {{ $refundlog->pay_mode }} {{ __('and will be reflected to your a/c in 1-2 working days.') }}
({{ __('TXN ID:') }} {{ $refundlog->txn_id }})
@else {{ __('Refund Amount') }} {{ $refundlog->amount }} is {{$refundlog->status}} {{ __('to your Requested bank a/c') }} {{$refundlog->bank->bankname ?? 'Bank account deleted'}} (XXXX{{ substr($refundlog->bank->acno, -4) }}) @if($refundlog->status !='refunded') {{ __('and will be reflected to your a/c in 1-2 working days.') }}@endif
(TXN ID: {{ $refundlog->txn_id }}) .
@if($refundlog->txn_fee != '') {{ __('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') Refund Amount {{$log->amount}} {{ __('is refunded to original source') }} ({{ $o->order->payment_method }}). {{ __("IF it don't than it will take 1-2 days to reflect in your account.") }}
({{ __("TXN ID:") }} {{ $log->transaction_id }})
@elseif($log->method_choosen == 'bank' && $log->is_refunded == 'pending' ) {{ __('Refund Amount') }} {{$log->amount}} {{ __('is proceeded to your bank ac, amount will be reflected to your bank ac in 14 working days.') }}
({{ __('Refrence No.') }} {{ $log->transaction_id }})
@if(isset($log->bank))
Choosen Bank: {{ $log->bank->bankname }} ({{ $log->bank->acno }}) @else {{ __('Choosen Bank ac deleted !') }} @endif @elseif($log->method_choosen == 'bank' && $log->is_refunded == 'completed' ) {{ __('Amount') }} {{$log->amount}} {{ __('is refunded to your bank ac.') }}
@if($log->txn_fee !='') {{ __('Transcation FEE:') }} {{ $log->txn_fee }} @if(isset($log->bank))
{{ __('Choosen Bank:') }} {{ $log->bank->bankname }} ({{ $log->bank->acno }}) @else {{ __('Choosen Bank ac deleted !') }} @endif @endif
({{ __('TXN ID:') }} {{ $log->transaction_id }})
@endif @elseif(isset($orderlog)) @if(in_array($o->id, $orderlog->inv_id)) @if($orderlog->method_choosen == 'orignal') {{ __('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) {{ 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 {{ __('is refunded to original source') }} ({{ $o->order->payment_method }}). {{ __("IF it don't than it will take 1-2 days to reflect in your account.") }}
({{ __("TXN ID:") }} {{ $orderlog->txn_id }})
@elseif($orderlog->method_choosen == 'bank' && $orderlog->is_refunded == 'pending' ) {{ __("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 {{ __("is proceeded to your bank ac, amount will be reflected to your bank ac in 14 working days.") }}
({{ __('Refrence No.') }} {{ $orderlog->txn_id }})
@if(isset($orderlog->bank))
{{ __("Choosen Bank:") }} {{ $orderlog->bank->bankname }} ({{ $orderlog->bank->acno }}) @else {{ __("Choosen Bank ac modified or deleted !") }} @endif @endif @if($orderlog->method_choosen == 'bank' && $orderlog->is_refunded == 'completed' ) @if(in_array($o->id, $orderlog->inv_id)) {{ __('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) {{ 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 {{ __("is refunded to your bank ac.") }}
@if($orderlog->txn_fee !='') {{ __("Transcation FEE:") }} {{ $orderlog->txn_fee }} @endif
({{ __("TXN ID:") }} {{ $orderlog->txn_id }})
@php $bank = $orderlog->bank; @endphp @if(isset($bank))
{{ __("Choosen Bank:") }} {{ $bank->bankname }} ({{ $bank->acno }}) @else {{ __("Choosen Bank ac deleted !") }} @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 != '')

{{__("Your order has been shipped via")}} {{ $o->courier_channel }} {{ __("you can track your package here with ") }} {{ $o->tracking_link }} {{__('and expected delivery date is :date',['date' => 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)) }} • {{__('Expand more')}}

@endif @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( isset($o->variant) || isset($o->simple_product) ) @endif @if($o->status != 'delivered' && $o->local_pick != '') @endif @endforeach
@endsection @section('script') @endsection