@if(session('success'))
{{ session('success') }}
@endif {{-- Page Header --}}

Your Estimate

Quote {{ $order->quote_number }}

{{ $order->status_label }}
{{-- ─── Left: Estimate Summary ────────────────────────────────── --}}
{{-- Product/Accessory Info --}} @if(($cfg['type'] ?? '') === 'accessory')
Commercial Accessory

{{ $cfg['accessory_name'] ?? 'Bathroom Accessory' }}

SKU: {{ $cfg['accessory_sku'] ?? 'N/A' }}

@elseif($product)

{{ $product->name }}

{{ $product->material }} › {{ $product->type }} › {{ $product->layout }}

{{ $product->short_description ?? 'High-quality commercial toilet partitions.' }}

@endif {{-- Configuration Summary --}} @php $cfg = $order->configuration; @endphp

Configuration Summary

@if(($cfg['type'] ?? '') === 'accessory')
Total Quantity
{{ $cfg['quantity'] ?? 1 }}
Item(s)
@else
{{ $cfg['stalls_count'] ?? 1 }}
Stalls
{{ $cfg['color'] ?? 'N/A' }}
Color
{{ ucfirst($cfg['dock'] ?? 'yes') }}
Loading Dock
@endif {{-- Per-stall details --}} @if(!empty($cfg['stalls']))

Stall Details

@foreach($cfg['stalls'] as $num => $stall)
{{ $num }}
Width: {{ $stall['width'] ?? '36' }}" @if(($stall['width'] ?? '') == '60') ADA @endif
Door Swing: {{ $stall['swing'] ?? 'N/A' }}
@endforeach
@endif {{-- Urinal Screens --}} @if(($cfg['urinal_qty'] ?? 0) > 0)

Urinal Screens

{{ $cfg['urinal_qty'] }} × {{ ucfirst(str_replace('-', ' ', $cfg['urinal_type'] ?? '')) }} ({{ $cfg['urinal_size'] ?? '' }})

@endif {{-- Notes --}} @if(!empty($cfg['notes']))

Project Notes

{{ $cfg['notes'] }}

@endif
{{-- Layout Drawing Upload --}} @if($order->attachment_path)

Layout Drawing

@if($order->status === 'draft')
@csrf
@endif
@php $ext = pathinfo($order->attachment_path, PATHINFO_EXTENSION); $filename = basename($order->attachment_path); @endphp @if(in_array(strtolower($ext), ['jpg', 'jpeg', 'png', 'webp'])) Layout Drawing

Filename: {{ $filename }}

@else View Uploaded Document {{ $filename }} @endif
@elseif($order->status === 'draft')

Upload a Layout Drawing

Upload a sketch or architectural plan (PDF, JPG, PNG) so our estimators can accurately refine your quote.

@csrf
@endif {{-- Price Breakdown --}}

Price Breakdown

@if(($cfg['type'] ?? '') === 'accessory') @php $delivery = isset($cfg['pricing']['freight']) ? $cfg['pricing']['freight'] : 20 * ($cfg['quantity'] ?? 1); $taxAmount = isset($cfg['pricing']['tax_amount']) ? $cfg['pricing']['tax_amount'] : 0; $taxPercent = isset($cfg['pricing']['tax_percent']) ? $cfg['pricing']['tax_percent'] : 0; @endphp @else @php $stallsCount = intval($cfg['stalls_count'] ?? 1); $basePrice = $product ? $product->base_price_1_stall : 0; $extraStalls = ($stallsCount > 1) ? ($stallsCount - 1) * 500 : 0; $adaExtra = 0; if(!empty($cfg['stalls'])) { foreach($cfg['stalls'] as $s) { if(($s['width'] ?? '') == '60') $adaExtra += 180; } } $urinalQty = intval($cfg['urinal_qty'] ?? 0); $urinalPrice = ($cfg['urinal_size'] ?? '') === '24x48' ? 100 : 150; $urinalTotal = $urinalQty * $urinalPrice; $dockExtra = ($cfg['dock'] ?? 'yes') === 'no' ? 100 : 0; $delivery = isset($cfg['pricing']['freight']) ? $cfg['pricing']['freight'] : 600; $taxAmount = isset($cfg['pricing']['tax_amount']) ? $cfg['pricing']['tax_amount'] : 0; $taxPercent = isset($cfg['pricing']['tax_percent']) ? $cfg['pricing']['tax_percent'] : 0; @endphp @if($extraStalls > 0) @endif @if($adaExtra > 0) @endif @if($urinalTotal > 0) @endif @if($dockExtra > 0) @endif @endif
{{ $cfg['accessory_name'] }} (× {{ $cfg['quantity'] }}) ${{ number_format(($cfg['unit_price'] ?? 0) * ($cfg['quantity'] ?? 1), 2) }}
Nationwide Delivery +${{ number_format($delivery, 2) }}
Tax ({{ $taxPercent }}%) +${{ number_format($taxAmount, 2) }}
Base Price (1 stall) ${{ number_format($basePrice, 2) }}
Additional Stalls (× {{ $stallsCount - 1 }}) +${{ number_format($extraStalls, 2) }}
ADA Width Upgrade(s) +${{ number_format($adaExtra, 2) }}
Urinal Screens ({{ $urinalQty }} × ${{ $urinalPrice }}) +${{ number_format($urinalTotal, 2) }}
No Loading Dock Surcharge +${{ number_format($dockExtra, 2) }}
Nationwide Delivery (LTL Freight) +${{ number_format($delivery, 2) }}
Tax ({{ $taxPercent }}%) +${{ number_format($taxAmount, 2) }}
Grand Total ${{ number_format($order->total_amount, 2) }}
{{-- ─── Right: Payment Panel ──────── --}}
@if($order->status === 'paid') {{-- Already Paid --}}

Payment Received

Order {{ $order->order_number }}

Our partition expert will review your order and send updated shop drawings within 24 hours.

Return to Home
@else {{-- Payment Form --}}

Complete Your Order

Review your estimate above, then pay securely via PayPal.

Estimated Total ${{ number_format($order->total_amount, 2) }}
{{-- Billing Details --}}

Billing Details

@csrf
{{-- Hidden PayPal fields filled by JS --}}
{{-- Step 2: PayPal Section (Visible by Default) --}}
@endif
{{-- /row --}}
@if($order->status !== 'paid') @endif