@include('includes.app') @include('customerP.includes.sidebar') @include('customerP.includes.header') @include('includes.toster')
@include('customerP.includes.under-sidebar')
@csrf
Clear

@canexport('print') @endcanexport @canexport('pdf') @endcanexport @canexport('excel') @endcanexport
RFQ List
From @php $dateRange = request('date_range'); $startDate = 'Beginning'; $endDate = 'End'; if ($dateRange) { $dates = explode(' - ', $dateRange); if (count($dates) == 2) { try { $startDate = \Carbon\Carbon::createFromFormat('m/d/Y', trim($dates[0]))->format('M d, Y'); $endDate = \Carbon\Carbon::createFromFormat('m/d/Y', trim($dates[1]))->format('M d, Y'); } catch (\Exception $e) { // invalid format fallback } } } @endphp {{ $startDate }} to {{ $endDate }}
@foreach($quotations as $quotation) @php $deliveriesCount = 0; $pickupsCount = 0; @endphp @php $pickupCount = $quotation->rows->flatMap->pickups->count(); @endphp @php $deliveryCount = $quotation->rows->flatMap->deliveries->count(); @endphp @endforeach
S.no Quote ID Admin Approval Customer Approval Price Pickup Location Pickup Date & Time Pickup PO Delivery Location Delivery Date & Time Delivery PO Quote Type Created Date
{{ $loop->iteration }}
#{{ $quotation->quotation_id ?: $quotation->id }} @if ($quotation->is_admin_approved) Approved @else Pending @endif @if ($quotation->is_customer_approved) Approved @else Pending @if($quotation->is_admin_approved) @endif @endif {{ $quotation?->rows[0]?->shipping?->currency ?? '' }} {{ $quotation->final_price }} @if ($pickupCount == 1) @php $pickup = $quotation->rows->flatMap->pickups->first(); $singlePickupAddress = ($pickup->cities ? $pickup->cities->name . ',' : "") . ($pickup->cities ? $pickup->cities->state_code : "") . ', ' . ($pickup?->countryyyy?->name ?? ''); @endphp {{ $singlePickupAddress }} @elseif ($pickupCount > 1) View Details @else - @endif @if ($pickupCount) @php $pickup = $quotation->rows->flatMap->pickups->first(); $singlePickupTime = ($pickup->time ? \Carbon\Carbon::parse($pickup->time)->format('d M, Y h:iA') : "-") ; @endphp {{ $singlePickupTime }} @endif @if ($pickupCount) @php $pickup = $quotation->rows->flatMap->pickups->first(); $singlePickupPo = ($pickup->po ?? "-") ; @endphp {{ $singlePickupPo }} @endif @if ($deliveryCount == 1) @php $delivery = $quotation->rows->flatMap->deliveries->first(); $singleDeliveryAddress = ($delivery->cities ? $delivery->cities->name . ',' : "") . ($delivery->cities ? $delivery->cities->state_code : "") . ', ' . ($delivery?->countryyyy?->name ?? ''); @endphp {{ $singleDeliveryAddress }} @elseif ($deliveryCount > 1) View Details @else - @endif @if ($deliveryCount) @php $delivery = $quotation->rows->flatMap->deliveries->first(); $singleDeliveryTime = ($delivery->time ? \Carbon\Carbon::parse($delivery->time)->format('d M, Y h:iA') : "-") ; @endphp {{ $singleDeliveryTime }} @endif @if ($deliveryCount) @php $delivery = $quotation->rows->flatMap->deliveries->first(); $singleDeliveryPo = ($delivery->po ?? "-") ; @endphp {{ $singleDeliveryPo }} @endif {{ strtolower($quotation->quote_type) == 'multi' ? 'Multi Truck' : ($quotation->quote_type ?? 'N/A') }} {{ \Carbon\Carbon::parse($quotation->created_at)->format('M d, Y') }}
@foreach ($quotations as $quotation)
Quotation Details #{{ $quotation->id }}
General Information
Company:
{{ $quotation->customer ? $quotation->customer->company_name : 'N/A' }}
Quote Type:
{{ strtolower($quotation->quote_type) == 'multi' ? 'Multi Truck' : ($quotation->quote_type ?? 'N/A') }}
@if(strtolower($quotation->quote_type) == 'multi')
Count of Trucks:
{{ $quotation->truck_count ?? 'N/A' }}
@endif
Employee Code:
{{ $quotation->employee_code ?? 'N/A' }}
Mode of Transport:
{{ $quotation->modeofT ? $quotation->modeofT->name : 'N/A' }}
Requested By:
{{ $quotation->requested_by ?? 'N/A' }}
@foreach($quotation->rows as $index => $row)
Row {{ $index + 1 }}
Quantity of Trucks:
{{ $row->quantity ?? 'N/A' }}
Equipment Type:
{{ $row->equipmentRelation ? $row->equipmentRelation->name : 'N/A' }}
@foreach($row->pickups as $pickupIndex => $pickup)
Pickup Locations {{ $pickupIndex + 1 }}
Name:
{{ $pickup->name ?? 'N/A' }}
Email:
{{ $pickup->q_email ?? 'N/A' }}
Phone:
{{ $pickup->q_phone ?? 'N/A' }}
Street:
{{ $pickup->street ?? 'N/A' }}
Country:
{{ $pickup->countryyyy ? $pickup->countryyyy->name : 'N/A' }}
State:
{{ $pickup->states ? $pickup->states->name : 'N/A' }}
City:
{{ $pickup->cities ? $pickup->cities->name : 'N/A' }}
Postal Code:
{{ $pickup->postal_code ?? 'N/A' }}
Pickup Note:
{{ $pickup->note ?? 'N/A' }}
@endforeach @foreach($row->deliveries as $deliveryIndex => $delivery)
Delivery Locations {{ $deliveryIndex + 1 }}
Name:
{{ $delivery->name ?? 'N/A' }}
Email:
{{ $delivery->q_email ?? 'N/A' }}
Phone:
{{ $delivery->q_phone ?? 'N/A' }}
Street:
{{ $delivery->street ?? 'N/A' }}
Country:
{{ $delivery->countryyyy ? $delivery->countryyyy->name : 'N/A' }}
State:
{{ $delivery->states ? $delivery->states->name : 'N/A' }}
City:
{{ $delivery->cities ? $delivery->cities->name : 'N/A' }}
Postal Code:
{{ $delivery->postal_code ?? 'N/A' }}
Delivery Note:
{{ $delivery->note ?? 'N/A' }}
@endforeach @if($row->shipping)
Shipping Details
Commodity:
{{ $row->shipping->commodity ?? 'N/A' }}
Currency:
{{ $row->shipping->currency ?? 'N/A' }}
Base Price:
{{ $row->shipping->base_price ?? 'N/A' }}
@isset($row->shipping->shippingRows) @foreach ($row->shipping->shippingRows as $i => $shippingRow)
Shipping {{ $i + 1 }}
Quantity:
{{ $shippingRow->quantity ?? 'N/A' }}
Units:
{{ $shippingRow->units ?? 'N/A' }}
Weight:
{{ $shippingRow->weight_value ?? 'N/A' }} {{ $shippingRow->weight ?? '' }}
Dimension:
@if(!empty($shippingRow->dimension_value)) @php $dims = explode('*', $shippingRow->dimension_value); $labels = ['L', 'W', 'H']; // labels in order $formatted = []; foreach ($dims as $i => $val) { if (!empty($val) && isset($labels[$i])) { $formatted[] = $val . $labels[$i]; } } @endphp {{ implode(' * ', $formatted) }} @else N/A @endif {{-- Show dimension field also --}} {{ !empty($shippingRow->dimension) ? ' ('.$shippingRow->dimension.')' : '' }}
@endforeach @endisset
@endif @foreach($row->warehouses as $warehouseIndex => $warehouse)
Warehouse Details {{ $warehouseIndex + 1 }}
Location:
{{ $warehouse->location->name ?? 'N/A' }}
Price:
{{ $warehouse->amount ?? 'N/A' }}
@endforeach @if($row->additional)
Additional Details
Tarped:
{{ $row->additional->tarped ? 'Yes' : 'No' }}
Team:
{{ $row->additional->team ? 'Yes' : 'No' }}
Hazmat:
@if($row->additional && $row->additional->hazmat) Yes (Class: {{ $row->additional->class ?? 'N/A' }}) @else No @endif
Temperature:
@if($row->additional && $row->additional->temperature) Yes (Value: {{ $row->additional->temperature_value ?? 'N/A' }} {{ $row->additional->temperature_unit ?? '' }}) @else No @endif
Non Stackable:
{{ $row->additional->non_stackable ? 'Yes' : 'No' }}
Bonded:
{{ $row->additional->bonded ? 'Yes' : 'No' }}
Trailer Drop:
{{ $row->additional->trailer_drop ? 'Yes' : 'No' }}
Tailgate Delivery:
{{ $row->additional->tailgate ? 'Yes' : 'No' }}
Residential Delivery:
{{ $row->additional->residential ? 'Yes' : 'No' }}
@endif @endforeach @if($quotation->charges->count())
Charges
@foreach($quotation->charges as $charge)
{{ $charge->type ?? 'N/A' }}
{{ $charge->amount }} ({{ $charge->rate_type }})
@endforeach
@endif @if($quotation->discounts->count())
Discounts
@foreach($quotation->discounts as $discount)
{{ $discount->types ? $discount->types->name : 'N/A' }}
{{ $discount->types ? $discount->types->Amount : 'N/A' }} ({{ $discount->types ? $discount->types->percentage : 'N/A' }})
@endforeach
@endif
Tax & Final Details
GST:
{{ $quotation->gst ? $quotation->gst . '%' : 'N/A' }}
PST:
{{ $quotation->pst ? $quotation->pst . '%' : 'N/A' }}
HST:
{{ $quotation->hst ? $quotation->hst . '%' : 'N/A' }}
QST:
{{ $quotation->qst ? $quotation->qst . '%' : 'N/A' }}
Final Price Before Tax:
{{ ($quotation->pbt ?? 0.00)}}
Final Price:
{{ $quotation->final_price ?? '0.00' }}
Notes:
{{ $quotation->notes ?? 'N/A' }}
Terms & Conditions:
{{ $quotation->term_conditions ? $quotation->term_conditions->name : 'N/A' }}
Special Note:
{{ $quotation->special_note ?? 'N/A' }}
@endforeach
@include('includes.footer')