{{-- HEADER --}} @if($quote->pipelineStage) @endif {{-- ACTIONS --}} | @php (!\VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\subTotal($quote) || ! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\total($quote)) ? $quoteError = true : $quoteError = false; @endphp @if(! $quote->order && !$quoteError) @endif @can('edit crm quotes') @if($quoteError) @else @if(!$quote->accepted_at && !$quote->rejected_at) @elseif($quote->accepted_at && $quote->orders()->count() > 0 && ! $quote->orderComplete()) @hasordersenabled @endhasordersenabled @elseif($quote->accepted_at && $quote->orders()->count() < 1) @hasordersenabled @endhasordersenabled @elseif($quote->rejected_at) @endif @endcan @endif @can('view crm quotes') @if(! $quoteError) @endif @endcan | | @can('edit crm quotes') @endcan @can('delete crm quotes') @endcan
{{ ucfirst(__('laravel-crm::lang.created')) }} {{ $quote->created_at->diffForHumans() }}
{{ ucfirst(__('laravel-crm::lang.number')) }} {{ $quote->quote_id }}
{{ ucfirst(__('laravel-crm::lang.reference')) }} {{ $quote->reference }}
{{ ucwords(__('laravel-crm::lang.issue_date')) }} {{ $quote->issue_at ? $quote->issue_at->format(app('laravel-crm.settings')->get('date_format', 'Y-m-d')) : null }}
{{ ucwords(__('laravel-crm::lang.expiry_date')) }} {{ $quote->expire_at ? $quote->expire_at->format(app('laravel-crm.settings')->get('date_format', 'Y-m-d')) : null }}
{{ ucfirst(__('laravel-crm::lang.description')) }} {{ $quote->description }}
{{ ucfirst(__('laravel-crm::lang.labels')) }} @foreach($quote->labels as $label) @endforeach
{{ ucfirst(__('laravel-crm::lang.owner')) }} @if( $quote->ownerUser){{ $quote->ownerUser->name ?? null }} @else {{ ucfirst(__('laravel-crm::lang.unallocated')) }} @endif
@if($quote->person){{ $quote->person->name }}@endif
@if($email) {{ $email->address }} ({{ ucfirst($email->type) }}) @endif
@if($phone) {{ $phone->number }} ({{ ucfirst($phone->type) }}) @endif
@if($quote->organization){{ $quote->organization->name }}@endif
{{ ($address) ? \VentureDrake\LaravelCrm\Http\Helpers\AddressLine\addressSingleLine($address) : null }}
@foreach($quote->quoteProducts()->whereNotNull('product_id')->orderBy('order', 'asc')->orderBy('created_at', 'asc')->get() as $quoteProduct) @if($quoteProduct->comments) @endif @endforeach
{{ ucfirst(__('laravel-crm::lang.item')) }} {{ ucfirst(__('laravel-crm::lang.price')) }} {{ ucfirst(__('laravel-crm::lang.quantity')) }} {{ $taxName }} {{ ucfirst(__('laravel-crm::lang.amount')) }}
{{ $quoteProduct->product->name }} @if($quoteProduct->product->code)
{{ $quoteProduct->product->code }} @endif
{{ money($quoteProduct->price ?? null, $quoteProduct->currency) }} {{ $quoteProduct->quantity }} {{ money($quoteProduct->tax_amount ?? null, $quoteProduct->currency) }} @if(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\lineAmount($quoteProduct)) {{ money($quoteProduct->amount ?? null, $quoteProduct->currency) }} @else {{ money($quoteProduct->amount ?? null, $quoteProduct->currency) }} @endif
{{ ucfirst(__('laravel-crm::lang.comments')) }}
{{ $quoteProduct->comments }}
{{ ucfirst(__('laravel-crm::lang.sub_total')) }} @if(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\subTotal($quote)) {{ money($quote->subtotal, $quote->currency) }} @else {{ money($quote->subtotal, $quote->currency) }} @endif
{{ ucfirst(__('laravel-crm::lang.discount')) }} {{ money($quote->discount, $quote->currency) }}
{{ ucfirst(__('laravel-crm::lang.tax')) }} @if(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\tax($quote)) {{ money($quote->tax, $quote->currency) }} @else {{ money($quote->tax, $quote->currency) }} @endif
{{ ucfirst(__('laravel-crm::lang.adjustment')) }} {{ money($quote->adjustments, $quote->currency) }}
{{ ucfirst(__('laravel-crm::lang.total')) }} @if(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\total($quote)) {{ money($quote->total, $quote->currency) }} @else {{ money($quote->total, $quote->currency) }} @endif