@php $x = App\InvoiceDownload::where('order_id','=',$order->id)->where('vender_id',Auth::user()->id)->get(); @endphp

Order: {{ $inv_cus->order_prefix.$order->order_id }}

Customer Information Shipping Address Billing Address
@php $user = App\User::findorfail($order->user_id); if($user->country_id !=''){ $c = App\Allcountry::where('id',$user->country_id)->first()->nicename; $s = App\Allstate::where('id',$user->state_id)->first()->name; $ci = App\Allcity::where('id',$user->city_id)->first()->name; } @endphp

{{$user->name}}

{{ $user->email }}

{{$user->mobile}}

@if(isset($c))

{{$ci}}, {{ $s }}, {{ $c }}

@endif

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

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

@php $user = App\User::findorfail($order->user_id); $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()->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()->name; @endphp

{{ $ci }}, {{ $s }}, {{ $ci }}

{{ $order->billing_address['pincode'] }}

Order Summary

Total Qty: {{ $x->sum('qty')}}

Order Total: {{ $total }}

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

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

TXN ID: {{ $order->transaction_id }}

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

Order Details
@foreach($x as $invoice) @php $orivar = App\AddSubVariant::withTrashed()->findorfail($invoice->variant_id); $i=0; $varcount = count($orivar->main_attr_value); @endphp @endforeach
Invoice No Item Image Item Info Qty Status Pricing & TAX Total
{{ $inv_cus->prefix }}{{ $invoice->inv_no }}{{ $inv_cus->postfix }} {{$orivar->products->name}} (@foreach($orivar->main_attr_value as $key=> $orivars) @php $getattrname = App\ProductAttributes::where('id',$key)->first()->attr_name; $getvarvalue = App\ProductValues::where('id',$orivars)->first(); @endphp @if($i < $varcount) @if(strcasecmp($getvarvalue->unit_value, $getvarvalue->values) != 0 && $getvarvalue->unit_value != null) @if($getvarvalue->proattr->attr_name == "Color" || $getvarvalue->proattr->attr_name == "Colour" || $getvarvalue->proattr->attr_name == "color" || $getvarvalue->proattr->attr_name == "colour") {{ $getvarvalue->values }}, @else {{ $getvarvalue->values }}{{ $getvarvalue->unit_value }}, @endif @else {{ $getvarvalue->values }}, @endif @else @if(strcasecmp($getvarvalue->unit_value, $getvarvalue->values) != 0 && $getvarvalue->unit_value != null) @if($getvarvalue->proattr->attr_name == "Color" || $getvarvalue->proattr->attr_name == "Colour" || $getvarvalue->proattr->attr_name == "color" || $getvarvalue->proattr->attr_name == "colour") {{ $getvarvalue->values }} @else {{ $getvarvalue->values }}{{ $getvarvalue->unit_value }} @endif @else {{ $getvarvalue->values }} @endif @endif @endforeach )
Sold By: {{$orivar->products->store->name}}
Price: {{ round(($invoice->price),2) }}
Tax: {{ round(($invoice->tax_amount/$invoice->qty),2) }} @if($invoice->variant->products->tax_r !='') ({{ $invoice->variant->products->tax_r.'% '.$invoice->variant->products->tax_name }} ) @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 @else {{ ucfirst($invoice->status) }} @endif Total Price: {{ round(($invoice->price*$invoice->qty),2) }}

Total Tax: {{ round(($invoice->tax_amount),2) }}

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

(Price & TAX Multiplied with Quantity)

{{ round($invoice->qty*$invoice->price+$invoice->tax_amount+$invoice->shipping,2) }}
(Incl. of TAX & Shipping)
Handling Charge {{ $total-$hc }}
Handling Charge {{ round($hc,2) }}
Grand Total {{ $total}}