@component('laravel-crm::components.card') @component('laravel-crm::components.card-header') @slot('title') {{ $order->title }} @endslot @slot('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 @include('laravel-crm::partials.return-button',[ 'model' => $order, 'route' => 'orders' ]) | @can('edit crm orders') @if($subTotalError || $taxError || $totalError) Error with order, check amounts @else @if(! $order->deliveryComplete()) @haspurchaseordersenabled {{ ucwords(__('laravel-crm::lang.purchase_order')) }} @endhaspurchaseordersenabled @endif @if(! $order->invoiceComplete()) @hasinvoicesenabled {{ ucwords(__('laravel-crm::lang.generate_invoice')) }} @endhasinvoicesenabled @endif @if(! $order->deliveryComplete()) @hasdeliveriesenabled {{ ucwords(__('laravel-crm::lang.create_delivery')) }} @endhasdeliveriesenabled @endif @endif @endcan @can('view crm orders') @if(! $subTotalError && ! $taxError && ! $totalError) {{ ucfirst(__('laravel-crm::lang.download')) }} @endif @endcan @include('laravel-crm::partials.navs.activities') | @can('edit crm orders') @endcan @can('delete crm orders') @endcan @endslot @endcomponent @component('laravel-crm::components.card-body')
@if($order->client){{ $order->client->name }}@endif
@if($order->organization){{ $order->organization->name }}@endif
{{ ($organization_address) ? \VentureDrake\LaravelCrm\Http\Helpers\AddressLine\addressSingleLine($organization_address) : null }}
@if($order->person){{ $order->person->name }}@endif
@isset($email){{ $email->address }} ({{ ucfirst($email->type) }})
@endisset @isset($phone){{ $phone->number }} ({{ ucfirst($phone->type) }})
@endisset @can('view crm products')| {{ 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 | |||