@component('laravel-crm::components.card') @component('laravel-crm::components.card-header') @slot('title') {{ ucfirst(__('laravel-crm::lang.orders')) }} @endslot @slot('actions') @include('laravel-crm::partials.filters', [ 'action' => route('laravel-crm.orders.filter'), 'model' => '\VentureDrake\LaravelCrm\Models\Order' ]) @can('create crm orders') {{ ucfirst(__('laravel-crm::lang.add_order')) }} @endcan @endslot @endcomponent @component('laravel-crm::components.card-table')
| {{ ucwords(__('laravel-crm::lang.created')) }} | {{ ucwords(__('laravel-crm::lang.number')) }} | {{ ucwords(__('laravel-crm::lang.reference')) }} | @hasquotesenabled{{ ucwords(__('laravel-crm::lang.quote')) }} | @endhasquotesenabled{{ ucwords(__('laravel-crm::lang.labels')) }} | {{ ucwords(__('laravel-crm::lang.customer')) }} | {{ ucwords(__('laravel-crm::lang.sub_total')) }} | {{ ucwords(__('laravel-crm::lang.discount')) }} | {{ ucwords(__('laravel-crm::lang.tax')) }} | {{ ucwords(__('laravel-crm::lang.adjustment')) }} | {{ ucwords(__('laravel-crm::lang.total')) }} | {{ ucwords(__('laravel-crm::lang.owner')) }} | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $order->created_at->diffForHumans() }} | {{ $order->order_id }} | {{ $order->reference }} | @hasquotesenabled@if($order->quote) {{ $order->quote->quote_id }} @endif | @endhasquotesenabled@include('laravel-crm::partials.labels',[ 'labels' => $order->labels, 'limit' => 3 ]) |
@if($order->client)
{{ $order->client->name }}
@endif
@if($order->organization)
@if($order->client) @endif {{ $order->organization->name }} @if($order->client)@endif @endif @if($order->organization && $order->person) {{ $order->person->name }} @elseif($order->person) {{ $order->person->name }} @endif |
@if($subTotalError) {{ money($order->subtotal, $order->currency) }} @else {{ money($order->subtotal, $order->currency) }} @endif | {{ money($order->discount, $order->currency) }} | @if($taxError) {{ money($order->tax, $order->currency) }} @else {{ money($order->tax, $order->currency) }} @endif | {{ money($order->adjustments, $order->currency) }} | @if($totalError) {{ money($order->total, $order->currency) }} @else {{ money($order->total, $order->currency) }} @endif | {{ $order->ownerUser->name ?? ucfirst(__('laravel-crm::lang.unallocated')) }} | @can('edit crm orders') @if($subTotalError || $taxError || $totalError) Error with order, check amounts @else @if(! $order->deliveryComplete()) @haspurchaseordersenabled {{ ucwords(__('laravel-crm::lang.purchase')) }} @endhaspurchaseordersenabled @endif @if(! $order->invoiceComplete()) @hasinvoicesenabled {{ ucwords(__('laravel-crm::lang.invoice')) }} @endhasinvoicesenabled @endif @if(! $order->deliveryComplete()) @hasdeliveriesenabled {{ ucwords(__('laravel-crm::lang.delivery')) }} @endhasdeliveriesenabled @endif @endif @endcan @can('view crm orders') @if(! $subTotalError && ! $taxError && ! $totalError) @endif @endcan @can('edit crm orders') @endcan @can('delete crm orders') @endcan |