@extends('layouts.admin-master') @section('title', 'Invoice') @section('css') @endsection @section('content') @php if(Request::route('customer_name')) $orderNo = -1; foreach($orders as $order){ $orderNo++; if($order->order_status != 'cancel' && Request::route('customer_name') == $order->username){ break; } } @endphp

Invoice

{{$order->payment_status}}

INVOICE NO: #{{$orders[$orderNo]->order_id}}

{{$offer->title}}
@if(Auth::guard('admin')->user()->role_id == 'admin' || in_array(Auth::guard('admin')->user()->id, [19,22,25]) )
Logo
{{Config::get('siteSetting.address')}}
Phone: {{Config::get('siteSetting.phone')}}
Email: {{Config::get('siteSetting.email')}}
{{$orders[$orderNo]->shipping_name}} @if($orders[$orderNo]->shipping_email)
{{$orders[$orderNo]->shipping_email}}@endif
{{$orders[$orderNo]->shipping_phone}}
Address:- {!! $orders[$orderNo]->shipping_address. ', '. $orders[$orderNo]->shipping_area. ', '. $orders[$orderNo]->shipping_city. ', '. $orders[$orderNo]->shipping_region !!} @if($orders[$orderNo]->order_notes)
Notes: {{$orders[$orderNo]->order_notes}}@endif
Order ID: #{{$orders[$orderNo]->order_id}}
Order Date: {{Carbon\Carbon::parse($orders[$orderNo]->order_date)->format('M d, Y')}}
Payment Status: {{str_replace( '-', ' ',$orders[$orderNo]->payment_status) }}
@if($orders[$orderNo]->shipping_method)Shipping Method: {{ $orders[$orderNo]->shipping_method->name }}
@endif
@endif
@foreach($orders as $order) @foreach($order->order_details as $order_detail) @if($order_detail->shipping_status != 'cancel') @php $total_price += $order_detail->price; @endphp @endif @endforeach @php $shipping_cost += $order->shipping_cost; @endphp @endforeach
# Order Product Price Quantity Sub Total
{{$i++}} @php if(!in_array($order->order_id, $all_orders)){ array_push($all_orders, $order->order_id); } @endphp {{$order->order_id}}
{{ucfirst(strtolower($order->shipping_name))}}
{{ucfirst(strtolower($order->shipping_phone))}}
{{ $order_detail->product->title }}
@if($order_detail->attributes) @foreach(json_decode($order_detail->attributes) as $key=>$value) {{ $value }} @endforeach @endif
{{$order->currency_sign. $order_detail->price}} {{$order_detail->qty}} {{$order->currency_sign. $order_detail->price*$order_detail->qty}}
Sub-Total {{$orders[$orderNo]->currency_sign . $total_price}}
Shipping Cost(+) {{$orders[$orderNo]->currency_sign . $shipping_cost}}

Total

{{$orders[$orderNo]->currency_sign . ($total_price + $shipping_cost) }}

@if(Auth::guard('admin')->user()->role_id == 'admin' || $orders[$orderNo]->payment_status == 'paid') @if(Auth::guard('admin')->user()->role_id == 'admin' || in_array(Auth::guard('admin')->id(), [19,22,25])) @if(Auth::guard('admin')->user()->role_id == 'admin' || $orders[$orderNo]->invoicePrints <= 0 ) @endif @else Payment Status: {{$orders[$orderNo]->payment_status}} @endif

N.B Invoice Print ({{$orders[$orderNo]->invoicePrints}}) time

@endif
@endsection @section('js') @endsection