@extends('pages.admin.layout') @section('content') @php $carbon = new Carbon\Carbon($order->created_at); @endphp

Order {{$order->id}} on {{$carbon->format('l jS F Y @ h:i:s A')}}

@if($order->IsMinOnline == '1') @else @endif

@if($order->IsMinOnline == '1') Made In Northamptonshire
Arch Villa,
23 High Street,
Bozeat,
Northants,
NN29 7NF @else Edible16
34 Harborough Rd,
Great Oxendon,
Market Harborough
LE16 8NA @endif
{{$order->DeliveryFirstName}} {{$order->DeliveryLastName}},
@if($order->DeliveryAddressLine1)
{{$order->DeliveryAddressLine1}},
@endif @if($order->DeliveryAddressLine2)
{{$order->DeliveryAddressLine2}},
@endif @if($order->DeliveryAddressLine3)
{{$order->DeliveryAddressLine3}},
@endif @if($order->DeliveryCity)
{{$order->DeliveryCity}},
@endif @if($order->DeliveryCounty)
{{$order->DeliveryCounty}},
@endif @if($order->DeliveryPostcode)
{{$order->DeliveryPostcode}}
@endif
@if($order->DeliveryMobileNumber)
Telephone: {{$order->DeliveryMobileNumber}}
@endif @if($order->DeliveryNotes != '')

@endif

Invoice No #{{$order->id}}

Issued Date {{$carbon->format('l jS F Y @ h:i:s A')}}

Status: @if($order->status == "0")

UNPAID
@else @if($order->status == "paid")
{{strtoupper($order->status)}}
@else
{{strtoupper($order->status)}}
@endif @endif

@foreach($order->order_items()->get() as $item) @php $product = $item->product()->withoutGlobalScope('App\Scopes\WebsiteScope')->get()->first(); @endphp @php $product_item = $item->product_item()->withoutGlobalScope('App\Scopes\WebsiteScope')->get()->first(); @endphp @php $supplier = $product->suppliers()->withoutGlobalScope('App\Scopes\WebsiteScope')->get()[0]; @endphp @endforeach
Supplier Product Price Quantity Total
{{ $supplier->name}} {{ $product->name}} @if($product_item) - {{$product_item->name}} @endif £{{ number_format( $item->price, 2)}} {{ $item->quantity}} £{{ number_format( $item->total, 2)}}
Sub-Total: £{{ number_format(($order->total - $order->DeliveryPrice), 2) }}
Delivery: £{{ number_format($order->DeliveryPrice, 2) }}

Total: £{{ number_format(($order->total), 2) }}

@endsection