{{--

Deliveries

--}} {{--
From Date {{$from}}
To Date {{$to}}
--}} @if ($company->company_type == 2) @endif {{-- --}} {{-- --}} {{-- --}} {{-- @php $total_order = 0 @endphp --}} @foreach ($data as $key => $val) @php $total_item = count($data[$key]) @endphp @foreach ($data[$key] as $item_key => $items) @php $notes = $notes = $items["order"]['delivery_notes']; $item = $items['detail']; @endphp {{-- @forelse ($items['order_detail'] as $item) --}} {{-- @if($item_key == 0) --}} {{-- @endif --}} @if ($company->company_type == 2) @endif {{-- --}} @if ($items['order']['ship_name'] != '') @else @endif @php $suite = !empty($items["order"]['formatted_shipping_address']['suite'])?" ".($items["order"]['formatted_shipping_address']['suite'] !== "-"?$items["order"]['formatted_shipping_address']['suite']:""):""; @endphp {{-- @if (isset($notes[1])) @else @endif @if (isset($notes[2])) @else @endif --}} {{-- --}} @if (isset($item['install_name_list'][0]) && $item['install_name_list'][0] != '' ) @php $install = "No Install"; if(count($items["order_detail_return"]) > 0){ $filtered_install = []; foreach($item['install_name_list'] as $install_name){ foreach($item["order_detail_return"] as $return){ $install_namer = explode('@#@', $return["install_name"]); $install_qty = explode('@#@', $return["install_qty"]); foreach($install_namer as $i => $rr){ if($install_name == $rr){ $qtys = $items->detail->quantity - $install_qty[$i]; if($qtys > 0){ $filtered_install[] = $install_name; } }else{ $filtered_install[] = $install_name; } } } } if(count($filtered_install) > 0){ $install = str_replace([",",'"',"'"],[".","",""],implode(". ",$filtered_install)); }else{ $install = "No Install"; } }else{ $install = str_replace([",",'"',"'"],[".","",""],implode(". ",$item['install_name_list'])); } @endphp @else @endif @if (isset($notes[0])) @if($item_key == 0) @endif @else @endif @endforeach {{-- @php $total_order++ @endphp @if($total_order == 9)
@php $total_order = 0 @endphp @endif --}} @endforeach
Order #CompanyModel ConditionSerial NumberQTY Delivery Phone # Name Address City State Zip Code Delivery DateNOTES 2 NOTES 3Mfg LOCATION INSTALL Sales Person NOTESShip-to Name Ship-to Address line 1 Ship-to City Ship Zip Ship State Phone 2 Phone 3 Product Description Comment1 Comment2 Email Address
{{$key}}{{$items->company_name}}{{$items->detail->product_model}} {{availabilityCondition($items->detail->available_condition)}}{{$items->detail->serial_number}}{{$items->total_qty}} {{$items->order->ship_phone_number}}{{str_replace([",",'"',"'"],[".","",""],$items['order']['ship_name'])}}No Name{{$items->order->formatted_shipping_address['number']}} {{$items->order->formatted_shipping_address['street'].$suite}} {{$items->order->formatted_shipping_address['city']}} {{$items->state}} {{$items->order->formatted_shipping_address['postal_code']}} {{date("Y-m-d", strtotime($items->delivery_date))}}{{str_replace([",",'"',"'"],[".","",""],$notes[1]['formatted_note'])}}No Notes{{str_replace([",",'"',"'"],[".","",""],$notes[2]['formatted_note'])}}No Notes{{$item['productv2']['base_product']['brand']['name']}}{{$items->detail['brand_name']}} {{$store_name = str_replace([",",'"',"'"],[".","",""],$items['store']["store_name"])}}{{$install}}No Install{{str_replace([",",'"',"'"],[".","",""],$items->order->sales_person->fullname)}} {{str_replace([",",'"',"'"],[".","",""],$notes[0]['formatted_note'])}} -