@extends('admin.layouts.master-soyuz') @section('title',__("View Order : :order | ",['order' => $inv_cus->order_prefix.$order->order_id])) @section('body') @component('admin.component.breadcumb',['thirdactive' => 'active']) ​ @slot('heading') {{ __('View Order') }} @endslot ​ @slot('menu1') {{ __("Order") }} @endslot ​ @slot('menu2') {{ __("View Order") }} @endslot ​ @slot('button')
{{ __("Back")}} {{ __("Print")}} {{ __("Edit")}}
@endslot ​ @endcomponent
​ ​
@if ($errors->any()) @endif
{{ __("View Order") }} #{{ $inv_cus->order_prefix.$order->order_id }}
​@php $orderlog = App\FullOrderCancelLog::where('order_id',$order->id)->first(); $i=0; @endphp @if($order->manual_payment == '1')
{{__("This order is placed using")}} {{ ucfirst($order->payment_method) }} {{__("method and purchase proof you can view")}} order_id }}">here {{__("and after verify you can change the order status.")}}
@endif @if(isset($orderlog[0])) @if(count($orderlog[0]->inv_id) != count($order->invoices))

{{ date('d-m-Y | h:i A',strtotime($orderlog->updated_at)) }} • For Order #{{ $inv_cus->order_prefix.$order->order_id }} Few Items has been cancelled {{ $order->payment_method == 'COD' ? "." : "" }} @if($orderlog->method_choosen == 'orignal') and Amount {{ $orderlog->amount }} {{__("is refunded to its orignal source with TXN ID")}} [{{ $orderlog->txn_id }}]. @elseif($orderlog->method_choosen == 'bank') @if($orderlog->is_refunded == 'completed') {{__("and Amount")}} {{ $orderlog->amount }} {{__('is refunded to')}} {{ $orderlog->user->name }}{{ __("'s") }} {{__("bank ac")}} @if(isset($orderlog->bank->acno)) XXXX{{ substr($orderlog->bank->acno, -4) }} @endif {{__("with TXN/REF No")}} {{ $orderlog->txn_id }} @if($orderlog->txn_fee !='')
({{__("TXN FEE APPLIED")}}) {{ $orderlog->txn_fee }} @endif.
@else {{__("Amount")}} {{ $orderlog->amount }} {{__("is pending to")}} {{ $orderlog->user->name }}{{ __("'s") }} {{__("bank ac")}} @if(isset($orderlog->bank->acno)) XXXX{{ substr($orderlog->bank->acno, -4) }} @endif {{__("with TXN/REF. No:")}} {{ $orderlog->txn_id }}. @endif @endif

@else

{{ date('d-m-Y | h:i A',strtotime($orderlog->updated_at)) }} • {{__("For Order")}} #{{ $inv_cus->order_prefix.$order->order_id }} {{__("has been cancelled")}} {{ $order->payment_method == 'COD' ? "." : "" }} @if($orderlog->method_choosen == 'orignal') {{__("and Amount")}} {{ $orderlog->amount }} {{__("is refunded to its orignal source with TXN ID")}} [{{ $orderlog->txn_id }}]. @elseif($orderlog->method_choosen == 'bank') @if($orderlog->is_refunded == 'completed') {{__("and Amount")}} {{ $orderlog->amount }} {{__("is refunded to")}} {{ $orderlog->user->name }}{{ __('\'s') }} bank ac @if(isset($orderlog->bank->acno)) XXXX{{ substr($orderlog->bank->acno, -4) }} @endif {{__("with TXN/REF No")}} {{ $orderlog->txn_id }} @if($orderlog->txn_fee !='')
({{__("TXN FEE APPLIED")}}) {{ $orderlog->txn_fee }} @endif.
@else {{__('Amount')}} {{ $orderlog->amount }} {{__("is pending to")}} {{ $orderlog->user->name }}'s {{__("bank ac")}} @if(isset($orderlog->bank->acno)) XXXX{{ substr($orderlog->bank->acno, -4) }} @endif {{__("with TXN/REF. No:")}} {{ $orderlog->txn_id }}. @endif @endif

@endif @endif @if($order->refundlogs->count()>0) @foreach($order->refundlogs->sortByDesc('id') as $rlogs)

{{ date('d-m-Y | h:i A',strtotime($rlogs->updated_at)) }} • Item @if(isset($rlogs->getorder->variant)) {{ $rlogs->getorder->variant->products->name }}({{ variantname($rlogs->getorder->variant) }}) @else {{ $rlogs->getorder->simple_product->product_name }} @endif has been @if($rlogs->getorder->status == 'return_request') {{__('requested for return')}} @else @if($rlogs->getorder->status == 'ret_ref') {{__("Returned and refunded")}} @else {{ ucfirst($rlogs->getorder->status) }} @endif @endif @if($rlogs->method_choosen == 'orignal') {{__("and Amount")}} {{ $rlogs->amount }} {{__("is")}} {{ $rlogs->status }} {{__("to its orignal source with TXN ID:")}} {{ $rlogs->txn_id }}. @elseif($rlogs->method_choosen == 'bank') @if($rlogs->status == 'refunded') {{__("and Amount")}} {{ $rlogs->amount }} {{__("is")}} {{ $rlogs->status }} {{__("to")}} {{ $rlogs->user->name }}'s {{__("bank ac")}} @if(isset($rlogs->bank->acno)) XXXX{{ substr($rlogs->bank->acno, -4) }} @endif {{__("with TXN ID:")}} {{ $rlogs->txn_id }} @if($rlogs->txn_fee !='')
({{__("TXN FEE APPLIED")}}) {{ $rlogs->txn_fee }} @endif
. @else {{__("and Amount")}} {{ $rlogs->amount }} {{__("is pending to")}} {{ $rlogs->user->name }}'s {{__("bank ac")}} @if(isset($rlogs->bank->acno)) XXXX{{ substr($rlogs->bank->acno, -4) }} @endif {{__('with TXN ID/REF NO:')}} {{ $rlogs->txn_id }} @if($rlogs->txn_fee !='')
({{__("TXN FEE APPLIED")}}) {{ $rlogs->txn_fee }} @endif. @endif @endif

@endforeach @endif @if($order->cancellog->count()>0)
@foreach($order->cancellog->sortByDesc('id') as $cancellog)

{{ date('d-m-Y | h:i A',strtotime($cancellog->updated_at)) }} • Item @if(isset($cancellog->singleOrder->variant)) {{ $cancellog->singleOrder->variant->products->name }}({{ variantname($cancellog->singleOrder->variant->variant) }}) @else {{ $cancellog->singleOrder->simple_product->product_name }} @endif {{__("has been canceled")}} @if($cancellog->method_choosen == 'orignal') {{__("and Amount")}} {{ $cancellog->amount }} {{__("is refunded to its orignal source with TXN ID:")}} {{ $cancellog->transaction_id }}. @elseif($cancellog->method_choosen == 'bank') @if($cancellog->is_refunded == 'completed') {{__("and Amount")}} {{ $cancellog->amount }} {{__("is refunded to")}} {{ $cancellog->user->name }}{{__('\'s') }} {{__("bank ac")}} @if(isset($cancellog->bank->acno)) XXXX{{ substr($cancellog->bank->acno, -4) }} @endif {{__("with TXN ID")}} {{ $cancellog->transaction_id }} @if($cancellog->txn_fee !='')
({{__("TXN FEE APPLIED")}}) {{ $cancellog->txn_fee }} @endif
. @else {{__("and Amount")}} {{ $cancellog->amount }} {{__("is pending to")}} {{ $cancellog->user->name }}'s {{__('bank ac')}} XXXX{{ substr($cancellog->bank->acno, -4) }} {{__("with TXN ID/REF NO")}} {{ $cancellog->transaction_id }} @if($cancellog->txn_fee !='')
(TXN FEE APPLIED) {{ $cancellog->txn_fee }} @endif. @endif @endif

@endforeach
@endif
{{__("Customer Information")}} {{__("Shipping Address")}} {{__("Billing Address")}}
@php $user = $order->user; $address = $order->shippingaddress; @endphp

{{$user->name}}

{{ $user->email }}

@if(isset($user->mobile))

{{$user->mobile}}

@endif

{{$user->city ? $user->city->name.',' : ""}} {{$user->state ? $user->state->name.',' : ""}} {{$user->country ? $user->country->nicename : ""}}

{{ $address->name }}, {{ $address->phone }}

{{ strip_tags($address->address) }},

@php $user = $order->user; $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

{{__("Order Summary")}}

{{ __('Total Qty:') }} {{ $order->qty_total }}

{{__('Order Total:')}} {{ round($order->order_total,2) }}

{{__("Payment Recieved:") }} {{ ucfirst($order->payment_receive) }}

{{__("Payment Method:")}} {{ ucfirst($order->payment_method) }}

{{ __("Transcation ID:") }} {{ $order->transaction_id }}

{{ __("Order Date:") }} {{ date('d/m/Y @ h:i a', strtotime($order->created_at)) }}

@foreach($order->invoices as $invoice) @if($invoice->local_pick != '' && $invoice->status !='refunded')
@if(isset($invoice->variant)) @php $varcount = count($invoice->variant->main_attr_value); @endphp {{__("For Item")}} {{ $invoice->variant->products->name }} ({{ variantname($invoice->variant) }}) @endif @if($invoice->simple_products) {{ $invoice->simple_products->product_name }} @endif {{__("Customer has choosen Local Pickup.")}} @if($invoice->status != 'delivered') {{__("Estd Delivery date:")}} {{ $invoice->loc_deliv_date == '' ? "Yet to update" : date('d-m-Y',strtotime($invoice->loc_deliv_date)) }} @else {{__("Item Delivered On:")}} {{ $invoice->loc_deliv_date == '' ? "Yet to update" : date('d-m-Y',strtotime($invoice->loc_deliv_date)) }} @endif
@endif @endforeach
{{ __('Order Details') }}
@foreach($order->invoices as $invoice) @endforeach
{{ __('Invoice No') }} {{ __('Item Name') }} {{ __('Qty') }} {{ __('Status') }} {{ __('Pricing & Tax') }} {{ __('Total') }} #
{{ $inv_cus->prefix }}{{ $invoice->inv_no }}{{ $inv_cus->postfix }}
@if(isset($invoice->variant)) @php $orivar = $invoice->variant; @endphp @if($invoice->variant->variantimages) @else @endif @endif @if(isset($invoice->simple_product)) @endif
@if(isset($invoice->variant)) {{substr($orivar->products->name, 0, 25)}}{{strlen($orivar->products->name)>25 ? '...' : ""}} ({{ variantname($orivar) }}) @endif @if($invoice->simple_product) {{ $invoice->simple_product->product_name }} @endif
@if($invoice->variant) Sold By: {{$invoice->variant->products->store->name}} @endif @if($invoice->simple_product) Sold By: {{$invoice->simple_product->store->name}} @endif
Price: {{ round(($invoice->price),2) }}
Tax: {{ round(($invoice->tax_amount),2) }} @if($invoice->variant) @if($invoice->variant->products->tax_r !='') ({{ $invoice->variant->products->tax_r.'% '.$invoice->variant->products->tax_name }} ) @endif @endif
{{ $invoice->qty }} @if($invoice->status == 'delivered') {{ ucfirst($invoice->status) }} @elseif($invoice->status == 'processed') {{ ucfirst($invoice->status) }} @elseif($invoice->status == 'shipped') {{ ucfirst($invoice->status) }} @elseif($invoice->status == 'return_request') {{ __("Return Request") }} @elseif($invoice->status == 'returned') {{__("Returned")}} @elseif($invoice->status == 'cancel_request') {{__("Cancelation Request")}} @elseif($invoice->status == 'canceled') {{__("Canceled")}} @elseif($invoice->status == 'refunded') {{__("Refunded")}} @elseif($invoice->status == 'ret_ref') {{__("Returned & Refunded")}} @else {{ ucfirst($invoice->status) }} @endif {{ __("Total Price:") }} {{ round(($invoice->price*$invoice->qty),2) }}

{{ __("Total Tax:") }} {{ round(($invoice->tax_amount * $invoice->qty),2) }}

{{ __("Shipping Charges:") }} {{ round($invoice->shipping,2) }}

({{__("Price & TAX Multiplied with Quantity")}})

{{ sprintf("%.2f",$invoice->qty*($invoice->price+$invoice->tax_amount)+$invoice->shipping,2) }}
({{__('Incl. of TAX & Shipping')}})
{{ __("Subtotal") }} {{ round(($order->order_total+$order->discount) - $order->gift_charge,2) }}
{{ __("Coupon Discount") }} - {{ round($order->discount,2) }} ({{ $order->coupon }})
{{ __("Gift Packaging Charge") }} + {{ round($order->gift_charge,2) }}
{{ __("Handling Charge") }} + {{ round($order->handlingcharge,2) }}
{{ __("Grand Total") }} {{ round($order->order_total+$order->handlingcharge,2) }}


{{ __("Order Activity Logs") }}

@if(count($order->orderlogs) < 1) {{__("No activity logs for this order")}} @else #{{ $inv_cus->order_prefix }}{{ $order->order_id }}
@foreach($order->orderlogs as $logs) @if(isset($logs->variant)) @php $findinvoice = App\InvoiceDownload::find($logs->inv_id)->first(); $orivar = App\AddSubVariant::withTrashed()->withTrashed()->find($logs->variant_id); if($order->payment_method !='COD'){ if(isset($cancellog)){ $findinvoice2 = App\InvoiceDownload::where('id','=',$cancellog->inv_id)->first(); $orivar2 = App\AddSubVariant::withTrashed()->withTrashed()->findorfail($findinvoice2->variant_id); } } @endphp {{ date('d-m-Y | h:i:a',strtotime($logs->updated_at)) }} • For Order {{ $orivar->products->name }}({{ variantname($orivar) }}) : @if($logs->user->role_id == 'a') {{ $logs->user->name }} ({{__("Admin")}}) {{__("changed status to")}} {{ $logs->log }} @elseif($logs->user->role_id == 'v') {{ $logs->user->name }} ({{__("Vendor")}}) {{__("changed status to")}} {{ $logs->log }} @else {{ $logs->user->name }} ({{ __('Customer') }}) {{__("changed status to")}} {{ $logs->log }} @endif @endif @if(isset($logs->simple_product)) {{ date('d-m-Y | h:i:a',strtotime($logs->updated_at)) }} • For Order Item {{ $logs->simple_product->product_name }} @if($logs->user->role_id == 'a') {{ $logs->user->name }} ({{__("Admin")}}) {{__("changed status to")}} {{ $logs->log }} @elseif($logs->user->role_id == 'v') {{ $logs->user->name }} ({{__("Vendor")}}) {{__("changed status to")}} {{ $logs->log }} @else {{ $logs->user->name }} ({{ __('Customer') }}) {{__("changed status to")}} {{ $logs->log }} @endif @endif

@endforeach
@endif
@endsection