@extends('laravel-crm::layouts.portal') @php $signedAction = url()->current().'?signature='.request()->input('signature').'&expires='.request()->input('expires'); $isAccepted = (bool) $quote->accepted_at; $isRejected = (bool) $quote->rejected_at; $isExpired = $quote->expire_at && \Carbon\Carbon::now() > $quote->expire_at; $isPending = ! $isAccepted && ! $isRejected && ! $isExpired; if ($isAccepted) { $statusLabel = ucfirst(__('laravel-crm::lang.accepted')); $statusClass = 'badge-success'; } elseif ($isRejected) { $statusLabel = ucfirst(__('laravel-crm::lang.rejected')); $statusClass = 'badge-error'; } elseif ($isExpired) { $statusLabel = ucfirst(__('laravel-crm::lang.quote_expired')); $statusClass = 'badge-error'; } elseif ($quote->expire_at) { $statusLabel = ucfirst(__('laravel-crm::lang.expires_in')).' '.$quote->expire_at->diffForHumans(); $statusClass = 'badge-neutral'; } else { $statusLabel = ucfirst(__('laravel-crm::lang.pending')); $statusClass = 'badge-neutral'; } @endphp @section('content') @if($isPending) @csrf @csrf @endif @csrf {{ ucfirst(__('laravel-crm::lang.issued_to')) }} {{ $quote->organization->name ?? $quote->organization->person->name ?? null }} {{ $quote->person->name ?? null }} @if(isset($organization_address)) @if($organization_address->line1) {{ $organization_address->line1 }} @endif @if($organization_address->line2) {{ $organization_address->line2 }} @endif @if($organization_address->line3) {{ $organization_address->line3 }} @endif @if($organization_address->city || $organization_address->state || $organization_address->postcode) {{ $organization_address->city }} {{ $organization_address->state }} {{ $organization_address->postcode }} @endif {{ $organization_address->country }} @elseif($address) {{ $address->line1 }} @if($address->line2) {{ $address->line2 }} @endif @if($address->line3) {{ $address->line3 }} @endif {{ $address->city }} {{ $address->country }} @endif {{ ucfirst(__('laravel-crm::lang.from')) }} {{ $fromName }} @if($logo) @endif @if($quote->reference) {{ ucfirst(__('laravel-crm::lang.reference')) }} {{ $quote->reference }} @endif @if($quote->issue_at) {{ ucfirst(__('laravel-crm::lang.issue_date')) }} {{ $quote->issue_at->format($dateFormat) }} @endif @if($quote->expire_at) {{ ucfirst(__('laravel-crm::lang.expiry_date')) }} {{ $quote->expire_at->format($dateFormat) }} @endif @if($quote->description) {{ ucfirst(__('laravel-crm::lang.description')) }} {!! nl2br(e($quote->description)) !!} @endif @livewire('crm-portal-quote-line-items', ['quote' => $quote]) {{ ucfirst(__('laravel-crm::lang.sub_total')) }} {{ money($quote->subtotal, $quote->currency) }} @if($quote->discount > 0) {{ ucfirst(__('laravel-crm::lang.discount')) }} {{ money($quote->discount, $quote->currency) }} @endif {{ ucfirst(__('laravel-crm::lang.tax')) }} {{ money($quote->tax, $quote->currency) }} {{ ucfirst(__('laravel-crm::lang.total')) }} {{ money($quote->total, $quote->currency) }} @if($quote->terms) {{ ucfirst(__('laravel-crm::lang.terms')) }} {!! nl2br(e($quote->terms)) !!} @endif @endsection