{{-- The printable proposal. What the prospect receives, so every figure on this page comes from the model, already computed - Proposal::totals() sums the units and Money's own format() renders each figure. Do no arithmetic in this view. $proposal has branch, enquiry and units.unit.unitType eager loaded - App\Support\DocumentPdf::proposalView() loads them without the branch scope, since this view is reached by both an authenticated download and, eventually, a queued send with no branch context. --}} Proposal {{ $proposal->number }}
@if (! empty($pdfUrl))

Download PDF

@endif {{-- Anything other than a current offer says so before any figure: a Draft is not yet an offer, an expired one has lapsed, and a superseded, declined or accepted one has been replaced or decided. --}} @if ($proposal->status === \App\Enums\ProposalStatus::Draft)
DRAFT
@elseif ($proposal->isExpired())
Expired
@elseif (in_array($proposal->status, [\App\Enums\ProposalStatus::Superseded, \App\Enums\ProposalStatus::Declined, \App\Enums\ProposalStatus::Accepted], true))
No longer valid
@endif

Proposal

{{ $proposal->branch->name }}

{{ $proposal->branch->address }}

@if (filled($proposal->branch->trn))

TRN: {{ $proposal->branch->trn }}

@endif

Proposal No: {{ $proposal->number }}

Date: {{ ($proposal->sent_at ?? $proposal->created_at)?->format('j M Y') }}

Valid Until: {{ $proposal->valid_until?->format('j M Y') }}

Prospect

{{ $proposal->enquiry->contact_name }}

@if (filled($proposal->enquiry->company_name))

{{ $proposal->enquiry->company_name }}

@endif
@foreach ($proposal->units as $proposalUnit) @endforeach
Unit Type Area (sqft) List Price (AED) Rent (AED)
{{ $proposalUnit->unit->code }} {{ $proposalUnit->unit->unitType->name }} {{ $proposalUnit->unit->area_sqft }} {{ $proposalUnit->list_price_monthly->format() }} {{ $proposalUnit->rent_monthly->format() }}
@php($totals = $proposal->totals()) {{-- List price less discount is the monthly rent, so the column adds up from top to bottom. --}} @if ($totals['discount']->isGreaterThan(\App\Support\Money::zero())) @endif
List Price {{ $totals['list']->format() }}
Discount {{ $totals['discount']->negated()->format() }}
Monthly Rent {{ $totals['rent']->format() }}
VAT (5%) {{ $totals['vat']->format() }}
Monthly Total {{ $totals['total']->format() }}
Start Date {{ $proposal->start_date?->format('j M Y') }}
End Date {{ $proposal->end_date?->format('j M Y') }}
Term {{ $proposal->term_months }} months
Billing Cycle {{ $proposal->billing_cycle->getLabel() }}
Security Deposit {{ $proposal->security_deposit->format() }}
@if (filled($proposal->terms))

Terms

{{ $proposal->terms }}

@endif