Order Date: {{date('F j, Y g:i A')}}
Order: {{$order->id}}
@if($order->transaction) Transaction: {{$order->transaction->transaction_no}} @endif
{{$order->repeat_customer == 0 ? 'First Submission' : 'Supplemental Submission'}}
|
Customer ID: {{$order->user->id}}
{{$order->user->firstname}} {{$order->user->lastname}}
{{$order->user->address}}
{{$order->user->city}}, {{$order->user->state}} {{$order->user->zip}}
{{localize_us_number($order->user->phone)}}
{{$order->user->email}}
|
|
|
Item Description
|
Quantity
|
Unit Price
|
Amount
|
@php
$alanon_total = 0;
$alanon_vegetarian = 0;
$aa_banquet_total = 0;
$aa_banquet_vegetarian = 0;
$breakfast_total = 0;
$breakfast_vegetarian = 0;
$ticketed=0;
$commemoratives=0;
$donations=0;
@endphp
@foreach(\App\Models\OrderItem::
leftJoin('products', 'products.id', '=', 'order_items.item_id')
->leftJoin('categories', 'categories.id', '=', 'products.category_id')
->where('order_items.order_id', $order->id)
->orderBy('categories.sort')
->get() as $p)
@if($p->quantity > 0)
@php $item = \App\Models\Product::find($p->item_id); @endphp
@if($item->doc == 't')
{{$item->subtitle}} {{$item->title}} |
{{$p->quantity}} |
${{number_format(floor($item->price * 100)/100,2, '.', '')}} |
${{number_format(floor($p->quantity * $item->price * 100)/100,2, '.', '')}} |
@elseif($item->doc == 'c')
{{$item->subtitle}} {{$item->title}} |
{{$p->quantity}} |
${{number_format(floor($item->price * 100)/100,2, '.', '')}} |
${{number_format(floor($p->quantity * $item->price * 100)/100,2, '.', '')}} |
@elseif($item->doc == 'd')
{{$item->subtitle}} {{$item->title}} |
{{$p->quantity}} |
${{number_format(floor($item->price * 100)/100,2, '.', '')}} |
${{number_format(floor($p->quantity * $item->price * 100)/100,2, '.', '')}} |
@else
{{$item->subtitle}} {{$item->title}}
@if($item->category_id == 15)
Personalized text:
{{$p->custom_option}} {{$p->custom_option2}}
@endif
|
{{$p->quantity}} |
${{number_format(floor($item->price * 100)/100,2, '.', '')}} |
${{number_format(floor($p->quantity * $item->price * 100)/100,2, '.', '')}} |
@endif
@elseif($p->quantity > 0 & $p->doc == 't')
@php
$item = \App\Product::find($p->item_id);
if($p->item_id == 6 || $p->item_id == 7) {
$alanon_total += $p->quantity;
if($p->item_id == 6) {
$alanon_vegetarian += $p->quantity;
}
}
if($p->item_id == 9 || $p->item_id == 10) {
$aa_banquet_total += $p->quantity;
if($p->item_id == 8) {
$aa_banquet_vegetarian += $p->quantity;
}
}
if($p->item_id == 11 || $p->item_id == 12) {
$breakfast_total += $p->quantity;
if($p->item_id == 10) {
$breakfast_vegetarian += $p->quantity;
}
}
@endphp
@endif
@endforeach
@if($breakfast_total > 0 || $alanon_total > 0 || $aa_banquet_total > 0)
Item |
Total |
Vegetarian |
|
|
@if($breakfast_total > 0)
@php $item = \App\Product::find(48); @endphp
Breakfast |
{{$breakfast_total - $breakfast_vegetarian}} |
{{$breakfast_vegetarian}} |
${{number_format(floor($item->price * 100)/100,2, '.', '')}}
|
${{number_format(floor($breakfast_total * $item->price * 100)/100,2, '.', '')}}
|
@endif
@if($alanon_total > 0)
@php $item = \App\Product::find(44); @endphp
Al-Anon Luncheon |
{{$alanon_total - $alanon_vegetarian}} |
{{$alanon_vegetarian}} |
${{number_format(floor($item->price * 100)/100,2, '.', '')}}
|
${{number_format(floor($alanon_total * $item->price * 100)/100,2, '.', '')}}
|
@endif
@if($aa_banquet_total > 0)
@php $item = \App\Product::find(46); @endphp
Banquet |
{{$aa_banquet_total - $aa_banquet_vegetarian}} |
{{$aa_banquet_vegetarian}} |
${{number_format(floor($item->price * 100)/100,2, '.', '')}}
|
${{number_format(floor($aa_banquet_total * $item->price * 100)/100,2, '.', '')}}
|
@endif
@endif
|
Total
|
${{number_format(floor($order->amount * 100)/100,2, '.', '')}}
|
{{--
LAST NAME: {{$order->user->lastname}}
FIRST NAME: {{$order->user->firstname}}
|
--}}
|
@if($order->attendees->count() > 0)
Badge Name |
Group / City |
Affiliation |
@foreach($order->attendees as $a)
{{$a->tag_line_1}} |
{{$a->tag_line_2}} |
{{$a->affiliation_type->name}} |
@endforeach
@endif
@if(isset($order->attendees[0]) && $order->attendees[0]->golfer1 != '')
|
Golfer Names
|
@if($order->attendees[0]->golfer1 != '')
{{$order->attendees[0]->golfer1}} |
@endif
@if($order->attendees[0]->golfer2 != '')
{{$order->attendees[0]->golfer2}} |
@endif
@if($order->attendees[0]->golfer3 != '')
{{$order->attendees[0]->golfer3}} |
@endif
@if($order->attendees[0]->golfer4 != '')
{{$order->attendees[0]->golfer4}} |
@endif
@endif
Notes
|
{{ $order->comments }}
|
|
@endif
@endforeach