Estimate #{{ $estimate->estimate_number }}

@if($estimate->jobCard) Job Card #{{ $estimate->jobCard->job_number }} • {{ $estimate->created_at->format('M j, Y') }} @else Standalone Estimate • {{ $estimate->created_at->format('M j, Y') }} @endif

{{ ucfirst($estimate->status) }} Customer: {{ ucfirst($estimate->customer_approval_status) }} @if($estimate->validity_period_days) Valid until {{ $estimate->valid_until->format('M j, Y') }} @endif
@if($estimate->status === 'draft') Send to Customer @endif Edit Estimate Duplicate Estimate Download PDF @if($estimate->status === 'approved') Create Work Order @can('create', \App\Models\Invoice::class) Convert to Invoice @endcan @endif @if($estimate->customer_approval_status === 'pending' && auth()->user()->can('approve', $estimate)) Approve Estimate Reject Estimate @endif

Customer Information

@php $customer = $estimate->customer ?? $estimate->jobCard?->customer; @endphp @if($customer)
Name:

{{ $customer->name }}

Email:

{{ $customer->email }}

Phone:

{{ $customer->phone }}

@else

No customer information available

@endif

Vehicle Information

@php $vehicle = $estimate->vehicle ?? $estimate->jobCard?->vehicle; @endphp @if($vehicle)
Vehicle:

{{ $vehicle->year }} {{ $vehicle->make }} {{ $vehicle->model }}

License Plate:

{{ $vehicle->license_plate }}

@if($vehicle->vin)
VIN:

{{ $vehicle->vin }}

@endif
@else

No vehicle specified

@endif

Line Items

{{ $showItemDetails ? 'Hide Details' : 'Show Details' }}
@if($estimate->lineItems->count() > 0) @foreach($estimate->lineItems as $item) @endforeach
Type Description Qty Unit Price Total
{{ ucfirst($item->type) }}
{{ $item->description }}
@if($showItemDetails && $item->part)
Part #: {{ $item->part->part_number }}
@endif
{{ $item->quantity }} ${{ number_format($item->unit_price, 2) }} ${{ number_format($item->total_amount, 2) }}
@else

No line items

This estimate doesn't have any line items yet.

@endif

Summary

Subtotal: ${{ number_format($estimate->subtotal, 2) }}
@if($estimate->discount_amount > 0)
Discount: -${{ number_format($estimate->discount_amount, 2) }}
@endif
Tax ({{ $estimate->tax_rate }}%): ${{ number_format($estimate->tax_amount, 2) }}
Total: ${{ number_format($estimate->total_amount, 2) }}
@if($estimate->notes)

Customer Notes

{{ $estimate->notes }}

@endif @if($estimate->internal_notes && auth()->user()->can('view', $estimate))

Internal Notes

{{ $estimate->internal_notes }}

@endif @if($estimate->terms_and_conditions)

Terms & Conditions

{{ $estimate->terms_and_conditions }}

@endif
@if($estimate->created_at)

Estimate History

Created: {{ $estimate->created_at->format('M j, Y g:i A') }}
@if($estimate->sent_at)
Sent to Customer: {{ $estimate->sent_at->format('M j, Y g:i A') }}
@endif @if($estimate->customer_approved_at)
Customer Response: {{ ucfirst($estimate->customer_approval_status) }} on {{ $estimate->customer_approved_at->format('M j, Y g:i A') }}
@endif @if($estimate->preparedBy)
Prepared By: {{ $estimate->preparedBy->name }}
@endif
@endif