@extends('admin.layouts.app') @section('title', 'Quote ' . $quote->quote_number) @push('styles') @endpush @section('content') @php $sc = match($quote->status) { 'new'=>'status-new','reviewing'=>'status-reviewing','quoted'=>'status-quoted', 'won'=>'status-won','lost'=>'status-lost', default=>'badge-gray' }; $subtotal = $quote->items_total; @endphp
{{-- LEFT column --}}
{{-- ① Customer info --}}
Customer
WhatsApp
Name{{ $quote->customer_name }}
@if($quote->customer_phone)@endif @if($quote->company_name)
Company{{ $quote->company_name }}
@endif @if($quote->gstin)
GSTIN{{ $quote->gstin }}
@endif @if($quote->payment_terms)
Payment Terms{{ $quote->payment_terms }}
@endif @if($quote->billing_address)
Billing Address
{{ $quote->billing_address }}
@endif @if($quote->message)
Customer Message
{{ $quote->message }}
@endif
{{-- Edit customer form --}}
{{-- ② Items table --}}
Quoted Items
@if($quote->grand_total > 0) Grand Total: {{ $quote->grand_total_inr }} @elseif($subtotal > 0) Subtotal: ₹{{ number_format($subtotal / 100, 0, '.', ',') }} @endif
{{-- Existing items --}}
@csrf
@foreach($quote->items as $i => $item) @endforeach
Product Grade Qty Unit Price (₹) Line Total Notes
{{ $item->product_name }}
@if($item->product_sku)
{{ $item->product_sku }}
@endif
@if($item->grade) {{ $item->grade }} @else @endif
@php $lt = ($item->unit_price ?? 0) * $item->quantity; @endphp {{ $lt > 0 ? '₹' . number_format($lt / 100, 0, '.', ',') : '—' }} @csrf @method('DELETE')
{{-- ③ Add item form --}}
@csrf
{{-- ④ Pricing card (GST, Discount, Shipping) --}}
Pricing Breakdown
@csrf
{{-- Totals summary --}} @if($subtotal > 0)
Subtotal₹{{ number_format($subtotal/100, 0, '.', ',') }}
@if($quote->gst_percent > 0)
GST ({{ $quote->gst_percent }}%){{ $quote->gst_amount_inr }}
@endif @if($quote->discount_amount > 0)
{{ $quote->discount_label ?: 'Discount' }}− {{ $quote->discount_amount_inr }}
@endif @if($quote->shipping_amount > 0)
{{ $quote->shipping_label ?: 'Shipping' }}{{ $quote->shipping_amount_inr }}
@endif
Grand Total{{ $quote->grand_total_inr }}
@endif
{{-- ⑤ Response thread --}}
Response Thread
@forelse($quote->responses as $r)
{{ $r->user?->name ?? 'System' }} {{ $r->is_internal ? 'Internal note' : 'Email sent' }} {{ $r->created_at->format('d M Y, g:ia') }}
@if($r->subject && !$r->is_internal)
{{ $r->subject }}
@endif
{{ $r->body }}
@if($r->attachment_name)
{{ $r->attachment_name }}
@endif
@empty
No responses yet. Send the first reply below.
@endforelse
@csrf
{{-- ⑥ Activity log --}}
Activity Log
@forelse($quote->activities as $act)
{{ $act->description }}
{{ $act->user?->name ?? 'System' }} · {{ $act->created_at->format('d M Y, g:ia') }} ({{ $act->created_at->diffForHumans() }})
@empty
No activity yet.
@endforelse
{{-- RIGHT sidebar --}}
{{-- Status --}}
Status
@csrf @method('PATCH')
Created: {{ $quote->created_at->format('d M Y, g:ia') }}
@if($quote->last_replied_at)Last reply: {{ $quote->last_replied_at->diffForHumans() }}
@endif @if($quote->valid_until) Valid until: {{ $quote->valid_until->format('d M Y') }} @endif
{{-- Assign --}}
Assigned to
@csrf
{{-- ⑦ PDF Actions --}}
PDF & Email
Download PDF
@csrf
{{-- ⑧ Share link --}}
Customer Share Link
@if($quote->share_token)
Share this link — no login needed:
@csrf
@else
Generate a public link so the customer can view their quote online without logging in.
@csrf
@endif
{{-- Quick actions --}}
Quick actions
WhatsApp customer Email directly
@csrf @method('DELETE')
@endsection