@extends('layouts.app') @section('title', 'Quotation #'.optional($quotation)->quotation_number) @section('breadcrumbs') @endsection @section('content')

{{ $quotation->quotation_number }}

Quotation for {{ $quotation->customer->name ?? 'N/A' }}

@if($quotation->status === 'accepted') Convert to Order @endif @if($quotation->status === 'draft')
@csrf
@endif Print
@if($quotation->status === 'accepted')
This quotation has been accepted by the customer on {{ $quotation->accepted_at?->format('d M Y') }}.
@endif @if($quotation->status === 'rejected')
This quotation has been rejected. Reason: {{ $quotation->rejection_reason ?? 'Not specified' }}
@endif

QUOTATION

{{ $quotation->quotation_number }}

Date: {{ $quotation->created_at->format('d M Y') }}
Valid Until: {{ optional($quotation->valid_until)->format('d M Y') ?? 'N/A' }}
From
{{ $company->name ?? config('app.name') }}
{{ $company->address ?? '' }}
To
{{ $quotation->customer->name ?? 'N/A' }}
{{ $quotation->customer->address ?? '' }}
{{ $quotation->customer->country ?? '' }}
@forelse($quotation->items as $index => $item) @empty @endforelse @if($quotation->tax_amount > 0) @endif
# Description Qty Unit Price Amount
{{ $index + 1 }}
{{ $item->product->name ?? $item->description }}
@if($item->hs_code)HS: {{ $item->hs_code }}@endif
{{ number_format($item->quantity, 2) }} {{ $item->unit }} {{ number_format($item->unit_price, 2) }} {{ number_format($item->quantity * $item->unit_price, 2) }}
No items
Subtotal{{ number_format($quotation->subtotal, 2) }}
Tax ({{ $quotation->tax_rate }}%){{ number_format($quotation->tax_amount, 2) }}
Total{{ number_format($quotation->total_amount, 2) }} {{ $quotation->currency }}
@if($quotation->terms_conditions)
Terms & Conditions
{{ $quotation->terms_conditions }}
@endif @if($quotation->notes)
Notes
{{ $quotation->notes }}
@endif
Status
@php $statusColors = ['draft' => 'secondary', 'sent' => 'primary', 'accepted' => 'success', 'rejected' => 'danger', 'expired' => 'warning']; @endphp {{ ucfirst($quotation->status) }}
Approval Workflow
@foreach(['created' => 'Created', 'reviewed' => 'Reviewed', 'approved' => 'Approved', 'sent' => 'Sent'] as $step => $label)
{{ $label }}
{{ $quotation->workflow_dates[$step] ?? '--' }}
@endforeach
Details
Inquiry{{ $quotation->inquiry->inquiry_number ?? 'N/A' }}
Currency{{ $quotation->currency }}
Payment Terms{{ $quotation->payment_terms ?? 'N/A' }}
Shipping Terms{{ $quotation->incoterm ?? 'N/A' }}
Actions
Edit Print PDF @if($quotation->status === 'draft') Email to Customer @endif
@endsection