@extends('pages.admin.layout') @section('content') @php $carbon = new Carbon\Carbon($order->created_at); $now = \Carbon\Carbon::now(); if($now->format('l') !== "Tuesday") $now = \Carbon\Carbon::parse('next tuesday'); $prevWeek = App\OrderAvailablity::where("week_year", ($now->weekOfYear).$now->year)->first(); $selected = $order->WeekID ?? FALSE; $currentWeekID = ($selected) ? App\OrderAvailablity::where("id",$selected)->first() : $prevWeek; $type = Request::query('type') ?? FALSE; $orderArea = $order->OrderArea ?? FALSE; @endphp

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

@if($printMode == FALSE)
{{ method_field('post') }} @csrf
Modify Order
@if($order->WeekID == 469)
{{ method_field('post') }} @csrf
Christmas Order
@endif
@endif
@if($order->IsChristmas)
{{ method_field('post') }} @csrf
@endif
@if($order->DiscountCode == "ADMINAPPLIED")

PLACED VIA WATERLOO COTTAGE

@endif

Edible16
34 Harborough Rd,
Great Oxendon,
Market Harborough
LE16 8NA
Modify Address/Collection

{{$order->DeliveryFirstName}} {{$order->DeliveryLastName}},

@if($order->LocationID == null) @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 @else

Collection:
@if($order->LocationID == 5) Waterloo Cottage Farm @else EcoVillage @endif

@endif @if($order->DeliveryMobileNumber)
Telephone: {{$order->DeliveryMobileNumber}}
@endif @if($order->status == "paid")
{{strtoupper($order->status)}}
@else
{{strtoupper($order->status)}}
@endif
@if($order->status == "0" || $order->status == 'cancelled' || $order->status == 'HIGHDEMAND' || $order->status == 'LostSlot')

Order is UNPAID

To get the customer to pay simply send them to:
https://store.edible16.org.uk/approve-order/{{$order->id}}/{{$order->user_id}}

@endif @if($order->DeliveryNotes != '')

Delivery Notes:
{{$order->DeliveryNotes}}

@endif @if($order->SelfIsolating) @endif @foreach($order->order_items()->get() as $item) @php $product = $item->product()->withoutGlobalScope('App\Scopes\WebsiteScope')->get()->first(); if(!$product) { $product = \App\Product::where("id", $item->product_id)->withoutGlobalScope('App\Scopes\WebsiteScope')->toSQL(); continue; } $product_item = $item->product_item()->withoutGlobalScope('App\Scopes\WebsiteScope')->get()->first(); $supplier = ($product) ? $product->suppliers()->withoutGlobalScope('App\Scopes\WebsiteScope')->get()[0] : \App\Supplier::get()->first(); @endphp @endforeach @if($order->AmountRemaning > 0) @else @endif

Coronavirus COVID19 - Self Isolation Notice

As you have declared you are self isolating. We will contact you prior to Delivery / Collection to ensure it is contact-free.

Supplier Product Unit Qty Amount Action
{{ $supplier->name}} {{ $product->name}} @if($product_item) - {{$product_item->name}} @endif £{{ number_format( $item->price, 2)}} {{ $item->quantity}} £{{ number_format( $item->total, 2)}}
Subtotal £{{ number_format(($order->total - $order->DeliveryPrice), 2) }}
Delivery £{{ number_format($order->DeliveryPrice, 2) }}
Total £{{ number_format(($order->total), 2) }}
Paid so far£{{ number_format($order->AmountPaid, 2) }}£{{ number_format($order->total, 2) }}
Balance Remaining £{{ number_format($order->AmountRemaning, 2) }}

Payments

@foreach($order->payments()->orderby("created_at", "desc")->get() as $payment) @php $carbon = new Carbon\Carbon($payment->created_at); $response = json_decode($payment->details); if($response == false) { $response = $payment->details; } else { $response = $response->StatusDetail; } $color = ''; switch(strtoupper($payment->status)) { case 'AUTHORIZE': $color = 'warning'; break; case 'FAILED': $color = 'danger'; break; case 'SUCCESS': $color = 'success'; break; case 'COMPLETED': $color = 'success'; break; case 'REFUNDED': $color = 'info'; break; default: $color = 'info'; break; } @endphp @endforeach
Payment ID Method Date Submitted Status Card Details Amount actions
{{ $payment->id}} {{ strtoupper($payment->method) }} {{$carbon->format('l jS F Y @ h:i:s A')}} {{ strtoupper($payment->status) }}
{{$response}}
{{ $payment->CardDetails}} £{{ number_format( $payment->amount, 2)}}
@endsection @section('scripts') @endsection