{{-- HEADER --}} @if($order->pipelineStage) @endif {{-- ACTIONS --}} | @php (! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\subTotal($order)) ? $subTotalError = true : $subTotalError = false; (! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\tax($order)) ? $taxError = true : $taxError = false; (! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\total($order)) ? $totalError = true : $totalError = false; @endphp @can('edit crm orders') @if($subTotalError || $taxError || $totalError) @else @if(! $order->deliveryComplete()) @haspurchaseordersenabled @endhaspurchaseordersenabled @endif @if(! $order->invoiceComplete()) @hasinvoicesenabled @endhasinvoicesenabled @endif @if(! $order->deliveryComplete()) @hasdeliveriesenabled @endhasdeliveriesenabled @endif @endif @endcan @can('view crm orders') @if(! $subTotalError && ! $taxError && ! $totalError) @endif @endcan | | @can('edit crm orders') @endcan @can('delete crm orders') @endcan
{{ ucfirst(__('laravel-crm::lang.created')) }} {{ $order->created_at->diffForHumans() }}
{{ ucfirst(__('laravel-crm::lang.number')) }} {{ $order->order_id }}
{{ ucfirst(__('laravel-crm::lang.reference')) }} {{ $order->reference }}
@hasquotesenabled @if($order->quote)
{{ ucfirst(__('laravel-crm::lang.quote')) }} {{ $order->quote->quote_id }}
@endif @endhasquotesenabled
{{ ucfirst(__('laravel-crm::lang.description')) }} {{ $order->description }}
@foreach($order->addresses as $address)
{{ ($address->addressType) ? ucfirst($address->addressType->name).' ' : null }}{{ ucfirst(__('laravel-crm::lang.address')) }} {{ \VentureDrake\LaravelCrm\Http\Helpers\AddressLine\addressSingleLine($address) }} {{ ($address->primary) ? '(Primary)' : null }}
@endforeach
{{ ucfirst(__('laravel-crm::lang.labels')) }} @foreach($order->labels as $label) @endforeach
{{ ucfirst(__('laravel-crm::lang.owner')) }} @if( $order->ownerUser){{ $order->ownerUser->name ?? null }} @else {{ ucfirst(__('laravel-crm::lang.unallocated')) }} @endif
@if($order->person){{ $order->person->name }}@endif
@if($email) {{ $email->address }} ({{ ucfirst($email->type) }}) @endif
@if($phone) {{ $phone->number }} ({{ ucfirst($phone->type) }}) @endif
@if($order->organization){{ $order->organization->name }}@endif
{{ ($address) ? \VentureDrake\LaravelCrm\Http\Helpers\AddressLine\addressSingleLine($address) : null }}
@foreach($order->orderProducts()->whereNotNull('product_id')->orderBy('order', 'asc')->orderBy('created_at', 'asc')->get() as $orderProduct) @if($orderProduct->comments) @endif @endforeach
{{ ucfirst(__('laravel-crm::lang.item')) }} {{ ucfirst(__('laravel-crm::lang.price')) }} {{ ucfirst(__('laravel-crm::lang.quantity')) }} {{ $taxName }} {{ ucfirst(__('laravel-crm::lang.amount')) }}
{{ $orderProduct->product->name }} @if($orderProduct->product->code)
{{ $orderProduct->product->code }} @endif
{{ money($orderProduct->price ?? null, $orderProduct->currency) }} {{ $orderProduct->quantity }} {{ money($orderProduct->tax_amount ?? null, $orderProduct->currency) }} @if(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\lineAmount($orderProduct)) {{ money($orderProduct->amount ?? null, $orderProduct->currency) }} @else {{ money($orderProduct->amount ?? null, $orderProduct->currency) }} @endif
{{ ucfirst(__('laravel-crm::lang.comments')) }}
{{ $orderProduct->comments }}
{{ ucfirst(__('laravel-crm::lang.sub_total')) }} @if(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\subTotal($order)) {{ money($order->subtotal, $order->currency) }} @else {{ money($order->subtotal, $order->currency) }} @endif
{{ ucfirst(__('laravel-crm::lang.discount')) }} {{ money($order->discount, $order->currency) }}
{{ ucfirst(__('laravel-crm::lang.tax')) }} @if(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\tax($order)) {{ money($order->tax, $order->currency) }} @else {{ money($order->tax, $order->currency) }} @endif
{{ ucfirst(__('laravel-crm::lang.adjustment')) }} {{ money($order->adjustments, $order->currency) }}
{{ ucfirst(__('laravel-crm::lang.total')) }} @if(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\total($order)) {{ money($order->total, $order->currency) }} @else {{ money($order->total, $order->currency) }} @endif