@component('pdf.components.style') @endcomponent @php $addline = 0 @endphp @php $total = count($data) @endphp @foreach($data as $page => $item)

Truck {{$item["truck_no"]}} {{$item["driver"] != ""?"(".$item["driver"].")":""}}

Delivery Method: {{$item["method_name"]}}

@foreach($item["data"] as $index => $stop)
@if (count($stop["order"]) > 0)
@if (!$stop['is_custom'])

#Stop {{$stop['stop_no']}}

@php $isSameData = false; @endphp @foreach($stop["order"] as $order) @php $total_item = $order["total"] @endphp @php $total_model = 0 @endphp @if (!$isSameData)

Deliver To

@if (!$stop['is_custom']) @if ($order['order']['company_name'] != '')

{{ $order['order']['company_name'] }}

@endif @if ($order['order']['builders_code'] != '' && $order['order']['builders_code'] != 'null' )

{{ $order['order']['builders_code'] }}

@endif

{{ $order['order']['ship_name'] }}

{{ $order['order']['ship_email'] }}

{!! $order['order']['ship_address'] !!}

@if (!empty($order['order']['ship_phone_number']))

{{ $order['order']['ship_phone_number'] }}

@else @if(!empty($order['order']['ship_home_number']))

{{ $order['order']['ship_home_number'] }}

@endif @if($order['order']["ship_alternative_number"] != "") Alternative

{{ $order['order']['ship_alternative_number'] }}

@endif @endif @endif

Sales Person

@if (!$stop['is_custom'])

{{ $order['sales_person']['fullname'] }}

{{ $order['sales_person']['email'] }}

{{ $order['store']['store_address'] }}

{{ $order['store']['store_name'] }}

Phone: {{ $order['store']['store_phone_number'] }}

@endif
@endif @php $isSameData = true; @endphp @if($order['qty_haul'] > 0) @endif

Invoice # {{$order['order_no']}}

{{$order['order_date']}}

Haul Away Old: {{ $order['qty_haul'] == 0 ? 'No':'Yes' }}
{{$order['qty_haul']}}
{{-- detail order section --}} @if (count($order["detail_order"]) > 0) @forelse ($order["detail_order"] as $key => $detail) @empty @endforelse
Product Description Location QTY

{{ $detail['model']." (".$detail['condition'].")" }}

@if (count($detail['serial_numbers']))
SN:{{implode(", ",collect($detail['serial_numbers'])->pluck('serial_number')->toArray())}}
@endif

{{ $detail['name'] }}

@if (count($detail['installs']) > 0)
@if (count($detail['installs']) > 0)

Install :{{ implode(', ', collect($detail['installs'])->pluck("install_name")->all()) }}

@endif
@endif
{{ removeSlymanBros($detail['inventory_location']) }} {{ $detail['qty'] }}
No Data
@endif @if (count($order['home_visit_service']) > 0 || count($order['home_visit_install']) > 0 || (count($order['home_visit_survey']) > 0 && count($order['home_visit_survey']['data']) > 0))

Home Visit

@endif @if (count($order['home_visit_survey']) > 0 && count($order['home_visit_survey']['data']) > 0)

Survey

@forelse ($order["home_visit_survey"]['data'] as $key => $home_visit) @endforeach
Form name Model Number Survey Description

{{$home_visit['name']}}

{{$home_visit['product_name_list']}}

{{$home_visit['survey']['description']}}

@endif @if (count($order['home_visit_service']) > 0)

Service

@forelse ($order["home_visit_service"] as $key => $home_visit) @endforeach
Service Description

{{$home_visit['description']}}

@endif @if (count($order['home_visit_install']) > 0)

Install

@forelse ($order["home_visit_install"] as $key => $home_visit) @endforeach
Model Number Install Description

{{$home_visit['product_name_list']}}

{{$home_visit['description']}}

@endif @if (count($order['notes']) > 0 && !$stop['is_service_call'])

Notes

@php $key_note_iteration = 0 @endphp @foreach ($order['notes'] as $key_note => $note) @php $key_note_iteration++ @endphp @if ($key_note % 2 == 0) @endif @if ($key_note % 2 == 1) @endif @if ($key_note == (count($order['notes']) -1)) @endif @endforeach @if ($key_note_iteration % 2 == 1) @endif

{{$note["user"]["fullname"]}} - {{\Carbon\Carbon::parse($note["date_created"])->format("h:i A m/d/Y")}}

{{$note['note']}}

@endif @endforeach @else @foreach($stop["order"] as $order)

#{{$order['order']['order_no']}}

{{--
--}}
Customer Name Address
{{$order['order']['ship_name']}} {{$order['order']['formatted_shipping_address']->name}}
Phone Number Time To Complete
{{$order['order']['phone_number']}} {{$order['order']['additional_time']}} minutes
Stop Description
{{$order['notes']}}
{{--
--}}
@endforeach @endif
@endif
@endforeach @if($page != $total - 1)
@endif @endforeach {{-- --}}