{{-- {{dd($formData)}} --}}

{{ $quote->manufacturer ? $quote->manufacturer : 'Quotation' }}

{{--
--}}
Example Image

@if (isset($quote))
{{-- --}}
To: @if (!empty($quote->customer->to)) {{ trim($quote->customer->to) }}
@endif @if (!empty($quote->person_name)) {{ trim($quote->person_name) }}
@endif {{ trim($quote->customer->to_address ?? '') }}
Address: {{ $quote->to_address ?? '' }}
Email: {{ $quote->customer->to_email ?? '' }}
Phone: {{ $quote->customer->to_phone ?? '' }}
@php // Split the user’s comma‑lists into arrays: $emails = explode(',', $quote->salesRep->email); $addresses = explode(',', $quote->salesRep->address ?? ''); $phones = explode(',', $quote->salesRep->phone ?? ''); // dd($emails, $addresses, $phones); // Map entity → domain suffix & label: $map = [ 'tech' => ['label' => 'vCloud Tech Inc.', 'domain' => '@vcloudtech.com'], 'gov' => ['label' => 'vCloud Gov Inc.', 'domain' => '@vcloudgov.com'], ]; $ent = $quote->vcloud_entity; $label = $map[$ent]['label'] ?? $quote->salesRep->name; $suffix = $map[$ent]['domain'] ?? ''; // find first index where email endsWith suffix: $idx = collect($emails)->search(fn($e) => Str::endsWith(trim($e), $suffix), false); if ($idx === false) { $idx = 0; } @endphp
From: {{ $label }}
{{ $quote->salesRep->name }}
{{ trim($addresses[$idx] ?? '') }}
Email: {{ trim($emails[$idx]) }}
Phone: {{ trim($phones[$idx] ?? '') }}
{{--
--}}
FTIN: 46-3104792
Contract Name: {{ $quote->contract_name ?? '' }}
Contract No: {{ $quote->contract_no }}
Cage Code: 77T86
DUNS No: 079508688
Payment Term: {{ $quote->payment_term ?? '' }}
Credit Cards: VISA/MASTER
Credit Card Fees May Apply
Sales Tax May Apply
@if ($quote->uei != 'SLED/TECH') @endif
Quote #: {{ $quote->quote_no ?? '' }}
Quote Date: {{ $quote->quote_date ?? '' }}
Quote Expiry: {{ $quote->quote_expiry ?? '' }}
RFQ: {{ $quote->rfq ?? '' }}
UEI: {{ $quote->uei ?? '' }}
Shipping: ${{ $quote->shipping ?? '' }}
Total Pricing:
{{--
--}}
@php $groupedYears = $formData->groupBy('quote_year'); @endphp
@foreach ($groupedYears as $year => $yearItems)
{{ optional($yearItems->first())->heading ?? 'Year ' . $year }}
{{-- {{dd(count($formData))}} --}} @php $count = 0; $subTotal = 0; @endphp @foreach ($yearItems as $item) @php $subTotal += $item->extended_price; $count += 1; $saleTax = $item->sale_tax; @endphp @endforeach
Line No Part No Description Quantity Unit Extended
{{ $count }} {{ $item->part_no }} {!! nl2br(preg_replace('/ {2,}/', '  ', e($item->description))) !!} {{ $item->quantity }} ${{ $item->per_unite }} ${{ $item->extended_price }}
@php $saleTaxAmount = $saleTax; @endphp {{-- @php $totalpricing = $quote->shipping + $saleTaxAmount + $subTotal; @endphp --}}
Subtotal: ${{ $subTotal ?? '' }}
Sale Tax: ${{ $saleTaxAmount ?? '' }}
Shipping charges: ${{ $quote->shipping ?? '' }}
Total: ${{ $quote->shipping + $saleTaxAmount + $subTotal }}
@if ($loop->last)
Note:
{{ $quote->comment }}
@endif
@endforeach
@else
To:
Email:
Address:
Phone:
From:
Email:
Address:
Phone:
{{--
--}}

{{--
--}}
Term:

FTIN: 46-3104792

Cage Code: 77T86
DUNS No: 079508688

Contract No: OM
Credit Cards: VISA/MASTER
Credit Card Fees May Apply
Sales Tax May Apply

Quote #:
Quote Date:
Quote Expiry:
RFQ:
Shipping:
Total Pricing:
{{--
--}}

{{--
--}}

{{-- {{dd(count($formData))}} --}}
Line No Part No Description Quantity Unit Extended
Subtotal: $
Sale Tax: $
Shipping charges: $
Total: $
@endif {{-- --}}