@php use App\General\UserClass; @endphp
@if (Session::has('permissions') && in_array('Print Order Invoice', Session::get('permissions'))) @endif
Invoice# {{ $order->invoice_number }}
Shipping Details:

Name: {{ $order->f_name }} {{ $order->l_name ? ' ' . $order->l_name : '' }}

Email: {{ $order->email ?? 'N/A'}}

Phone: {{ $order->phone ?? 'N/A' }}

Location: {{ $order->city }} {{ $order->suburb }} {{ $order->post_code }}

State: {{ $order->state }}

Street Address: {{ $order->street_address }}

Customer Details
@if ($user)

Name: {{ $user->name ?? 'Guest' }}

Order Count: Order {{ $orderCount }}

Email: {{ $user->email ?? 'Guest User' }}

Phone: {{ $user->phone ?? 'Guest User' }}

Business Name: {{ UserClass::getOptionValue('business_name', $user->userMeta) ?? 'Not Added' }}

Address: {{ UserClass::getOptionValue('business_street_address', $user->userMeta) ?? 'Not Added' }}

@else

Order is placed by the Guest User.

Email: {{ $order->email ?? '' }}

@endif
Order Summary
status == 'pending') style="background-color: #c6b9b9;" @elseif($order->status == 'inProcess') style="background-color: #ffffa9;" @elseif($order->status == 'completed') style="background-color: #9cff9c;" @elseif($order->status == 'cancelled' || $order->status == 'refund') style="background-color: #ef6b6b;" @endif> {{ ucwords($order->status) }}
  • Delivery Method: {{ $order->delivery_method ?? '' }}
  • Subtotal: ${{ $order->subTotal ?? 0 }}
  • Total GST: ${{ $order->totalGst ?? 0 }}
  • Delivery Charges: ${{ $order->delivery_charges ?? 0 }}
  • @if($order->status == 'completed')
  • Grand Total: ${{ number_format($order->delivered_price ?? 0, 2) }}
  • @else
  • Grand Total: ${{ number_format($order->grand_total ?? 0, 2) }}
  • @endif
Order Notes

Notes:

{{ $order->order_notes ?? '' }}

@foreach ($order->orderMetas as $product) @php $discount = $product->product->discountData; $weightMeta = $product->product->productMeta->where('option', '_weight')->first(); @endphp @endforeach
Product Details:
Product Image Item Name Original Weight (KG) Price Ordered Weight (KG) Delivered Weight (KG) Total
@if (isset($product->product) && !empty($product->product->featured_image)) Product Image @else Default Image @endif {{ $product->product_title ?? 'Null' }} {{ $weightMeta ? $weightMeta->value : 'Null' }} @if($discount) ${{ number_format($discount['discounted_price'] ?? 0, 2) }} @else ${{ number_format($product->price ?? 0, 2) }} @endif {{ $product->quantity ?? 0 }} {{ $product->delivered_weight ?? 0 }} ${{ number_format($product->qp_subtotal ?? 0, 2) }}