@extends('pdf._base') @section('title', 'Quotation '.$quote->number) @php($qty = fn ($q) => rtrim(rtrim(number_format((float) $q, 2), '0'), '.')) @section('body') @include('pdf._letterhead', ['title' => 'QUOTATION', 'number' => $quote->number, 'subtitle' => 'Training proposal'])
@php($qst = $quote->isExpired() ? 'expired' : $quote->status) @include('pdf._keyfigs', ['figs' => array_values(array_filter([ ['Proposal total', money2($quote->total), 'blue'], ['Valid until', $quote->valid_until?->format('d M Y') ?? '—', $quote->isExpired() ? 'red' : 'gold'], $quote->batch?->start_date ? ['Batch starts', $quote->batch->start_date->format('d M Y'), ''] : null, ['Status', ucfirst($qst), in_array($qst, ['accepted', 'converted'], true) ? 'green' : ($qst === 'expired' || $qst === 'declined' ? 'red' : '')], ]))])
@include('pdf._from')
Prepared for
{{ $quote->customer_name }}
@if($quote->company){{ $quote->company }}
@endif{{ $quote->customer_email }}@if($quote->customer_phone)
{{ $quote->customer_phone }}@endif
@if($quote->batch)@endif
Quotation no.{{ $quote->number }}
Date{{ ($quote->sent_at ?? $quote->created_at)->format('d M Y') }}
Valid until{{ $quote->valid_until?->format('d M Y') }}
Batch{{ $quote->batch->batch_code }}@if($quote->batch->start_date) · {{ $quote->batch->start_date->format('d M') }}@endif
Status{{ $quote->isExpired() ? 'expired' : $quote->status }}
@if($quote->title)
{{ $quote->title }}
@endif @foreach($quote->items as $n => $it) @endforeach
#ItemQtyUnit priceAmount
{{ $n + 1 }}{{ $it->description }}{{ $qty($it->quantity) }}{{ money2($it->unit_price) }}{{ money2($it->amount) }}
@if($quote->installment_count)
Installment option
@if((float) $quote->registration_fee > 0)Registration {{ money2($quote->registration_fee) }} + @endif{{ $quote->installment_count }} monthly installment{{ $quote->installment_count > 1 ? 's' : '' }} of approx. {{ money2(max(0, (float) $quote->total - (float) $quote->registration_fee) / max(1, $quote->installment_count)) }}.
A formal installment schedule is issued on acceptance.
@endif @if($quote->terms)
Terms & conditions
{!! nl2br(e($quote->terms)) !!}
@endif
@if((float) $quote->discount > 0)@endif @if((float) $quote->tax_amount > 0)@endif
Subtotal{{ money2($quote->subtotal) }}
Discount− {{ money2($quote->discount) }}
Tax ({{ $qty($quote->tax_percent) }}%){{ money2($quote->tax_amount) }}
Total{{ money2($quote->total) }}
{{ amount_in_words($quote->total, $quote->currency) }}
@if($quote->notes)
{!! nl2br(e($quote->notes)) !!}
@endif
Acceptance
For {{ $quote->company ?: $quote->customer_name }} — name, signature & date
For {{ config('infotics.brand.legal_name') }}
@include('pdf._verify', ['qr' => $qr, 'verifyUrl' => $verifyUrl, 'docId' => $quote->number, 'docType' => 'quote', 'hint' => 'Scan to review and accept online — acceptance raises the invoice instantly.'])
@include('pdf._footer') @endsection