@extends('admin.layouts.app') @section('title', __('admin.quotes.title') . ' #' . $quote->id) @section('content')
{{ __('admin.quotes.line_items') }} @php $badgeClass = match($quote->status) { 'Accepted'=>'badge-active', 'Sent'=>'badge-open', 'Declined'=>'badge-cancelled', default=>'badge-draft' }; @endphp {{ $quote->status }}
@forelse($quote->items as $item) @empty @endforelse @if($quote->tax>0)@endif
{{ __('common.table.description') }}{{ __('admin.quotes.qty') }}{{ __('admin.quotes.unit_price') }}{{ __('common.table.discount') }}{{ __('common.table.amount') }}
{{ $item->description }} {{ $item->quantity }} ${{ number_format($item->unit_price,2) }} {{ $item->discount>0?'$'.number_format($item->discount,2):'-' }} ${{ number_format(max(0,($item->quantity*$item->unit_price)-$item->discount),2) }}
{{ __('admin.quotes.no_line_items') }}
{{ __('admin.quotes.subtotal') }}${{ number_format($quote->subtotal,2) }}
{{ __('admin.quotes.tax') }}${{ number_format($quote->tax,2) }}
{{ __('admin.quotes.total') }}${{ number_format($quote->total,2) }}
@if($quote->proposal)
{{ __('admin.quotes.proposal') }}
{{ $quote->proposal }}
@endif @if($quote->notes || $quote->customer_notes)
{{ __('admin.quotes.notes') }}
@if($quote->notes)

{{ __('admin.quotes.admin_notes') }}

{{ $quote->notes }}

@endif @if($quote->customer_notes)

{{ __('admin.quotes.customer_notes') }}

{{ $quote->customer_notes }}

@endif
@endif
{{ __('admin.quotes.quote_info') }}
{{ __('admin.quotes.client') }}{{ $quote->client?->full_name ?? 'N/A' }}
{{ __('admin.quotes.date') }}{{ \Carbon\Carbon::parse($quote->date)->format('d M Y') }}
{{ __('admin.quotes.valid_until') }}{{ \Carbon\Carbon::parse($quote->valid_until)->format('d M Y') }}
{{ __('admin.quotes.items') }}{{ $quote->items->count() }}
{{ __('admin.quotes.actions') }}
{{ __('admin.quotes.edit_quote') }} @if($quote->status === 'Draft')
@csrf
@endif @if($quote->status === 'Sent')
@csrf
@csrf
@endif @if($quote->status === 'Accepted')
@csrf
@endif
@csrf @method('DELETE')
@endsection