@extends('template.layouts.template-base') @section('title', 'Convert Sales') @section('content')

Quote ID : {{ $quotation->quotation_no }}

{{ $quotation->client->name ?? 'N/A' }} | Total : ₹{{ number_format($quotation->total_amount ?? 0, 2) }} @php $discountTypes = [ 1 => 'Overall Product Discount', 2 => 'No Discount', 3 => 'Each Product % Discount', 4 => 'Each Product ₹ Discount', ]; @endphp | {{ $discountTypes[$quotation->discount_type] ?? 'N/A' }}

@csrf
@error('remarks')
{{ $message }}
@enderror
Quotation & Customer Information

Customer Name

{{ $quotation->client->name ?? 'N/A' }}

Quote By

{{ $quotation->user->name ?? 'N/A' }}

Subject

{{ $quotation->subject ?? 'N/A' }}

Customer Reference ID

{{ $quotation->customer_reference_id ?? 'N/A' }}

Bill From

@if ($quotation->billFrom)
{{ $quotation->billFrom->address_line_1 }}
@if ($quotation->billFrom->address_line_2) {{ $quotation->billFrom->address_line_2 }}
@endif {{ $quotation->billFrom->city }}, {{ $quotation->billFrom->state }},
{{ $quotation->billFrom->country }}.
PIN: {{ $quotation->billFrom->pincode }}
@else
N/A
@endif

Bill To

@if ($quotation->billTo)
{{ $quotation->billTo->address_line_1 }}
@if ($quotation->billTo->address_line_2) {{ $quotation->billTo->address_line_2 }}
@endif {{ $quotation->billTo->city }}, {{ $quotation->billTo->state }},
{{ $quotation->billTo->country }}.
PIN: {{ $quotation->billTo->pincode }}
@else
N/A
@endif

Ship From

@if ($quotation->shipFrom)
{{ $quotation->shipFrom->address_line_1 }}
@if ($quotation->shipFrom->address_line_2) {{ $quotation->shipFrom->address_line_2 }}
@endif {{ $quotation->shipFrom->city }}, {{ $quotation->shipFrom->state }},
{{ $quotation->shipFrom->country }}.
PIN: {{ $quotation->shipFrom->pincode }}
@else
N/A
@endif

Ship To

@if ($quotation->shipTo)
{{ $quotation->shipTo->address_line_1 }}
@if ($quotation->shipTo->address_line_2) {{ $quotation->shipTo->address_line_2 }}
@endif {{ $quotation->shipTo->city }}, {{ $quotation->shipTo->state }},
{{ $quotation->shipTo->country }}.
PIN: {{ $quotation->shipTo->pincode }}
@else
N/A
@endif

GST Number

{{ $quotation->gst_number ?? 'N/A' }}

PAN Number

{{ $quotation->pan_number ?? 'N/A' }}

Bank

{{ $quotation->bank->bank_name ?? 'N/A' }}

Discount Type

{{ $discountTypes[$quotation->discount_type] ?? 'N/A' }}
Item(s)
@php $subTotal = 0; $hasValue = fn($value) => !empty($value) && $value > 0; @endphp {{-- Products --}} @foreach ($quotation->products as $product) @php $subTotal += $product->amount; @endphp @endforeach {{-- Divider --}} {{-- --}} {{-- Subtotal --}} {{-- Overall Discount Amount (Only show for discount_type = 1) --}} @if ($quotation->discount_type == 1 && $hasValue($quotation->overall_discount_amount)) @endif {{-- Discount Percentage (Only show for discount_type = 1) --}} @if ($quotation->discount_type == 1 && $hasValue($quotation->discount)) @endif {{-- Additional Charges (Single Field) --}} @if ($hasValue($quotation->additional_charges)) @endif {{-- Dynamic Charges --}} @foreach ($quotation->charges as $charge) @if ($hasValue($charge->amount)) @endif @endforeach {{-- Tax --}} @if ($hasValue($quotation->total_tax_amount)) @endif {{-- Round Off --}} @if (isset($quotation->roundoff) && $quotation->roundoff != 0) @endif {{-- Final Divider --}} {{-- --}} {{-- Grand Total --}}
Item ID/Name Description Unit Rate Qty Discount {{ $quotation->discount_type == 3 ? '(%)' : ($quotation->discount_type == 4 ? '(₹)' : '') }} Amount
{{ $product->product_name ?? '' }} {{ $product->description }} {{ $product->master->value ?? 'N/A' }} ₹{{ number_format($product->rate, 2) }} {{ $product->quantity }} @if ($quotation->discount_type == 3) {{ $product->discount ?? 0 }}% @elseif($quotation->discount_type == 4) ₹{{ number_format($product->discount ?? 0, 2) }} @else {{ $product->discount ?? 0 }} @endif ₹{{ number_format($product->amount, 2) }}

Sub Total : ₹{{ number_format($subTotal, 2) }}
Overall Discount : - ₹{{ number_format($quotation->overall_discount_amount, 2) }}
Discount % : {{ $quotation->discount }}%
Additional Charges : ₹{{ number_format($quotation->additional_charges, 2) }}
{{ $charge->otherCharge->name ?? 'Charge' }} : ₹{{ number_format($charge->amount, 2) }}
Total Tax : ₹{{ number_format($quotation->total_tax_amount, 2) }}
Round Off : ₹{{ number_format($quotation->roundoff, 2) }}

Grand Total : ₹{{ number_format($quotation->total_amount ?? 0, 2) }}
Cancel
@endsection @section('scripts') @endsection