@scope('cell_labels', $order)
@foreach($order->labels as $label)
@endforeach
@endscope
@scope('cell_pipeline_stage', $order)
@if($order->pipelineStage)
@endif
@endscope
@scope('cell_quote', $order)
@if($order->quote)
{{ $order->quote->quote_id }}
@endif
@endscope
@scope('cell_pipeline_stage', $order)
@if($order->pipelineStage)
@endif
@endscope
@scope('cell_subtotal', $order)
@php
(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\subTotal($order)) ? $subTotalError = true : $subTotalError = false;
@endphp
@if($subTotalError)
{{ money($order->subtotal, $order->currency) }}
Error with sub total
@else
{{ money($order->subtotal, $order->currency) }}
@endif
@endscope
@scope('cell_tax', $order)
@php
(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\tax($order)) ? $taxError = true : $taxError = false;
@endphp
@if($taxError)
{{ money($order->tax, $order->currency) }}
Error with tax
@else
{{ money($order->tax, $order->currency) }}
@endif
@endscope
@scope('cell_total', $order)
@php
(! \VentureDrake\LaravelCrm\Http\Helpers\CheckAmount\total($order)) ? $totalError = true : $totalError = false;
@endphp
@if($totalError)
{{ money($order->total, $order->currency) }}
Error with total
@else
{{ money($order->total, $order->currency) }}
@endif
@endscope
@scope('actions', $order)
@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->invoiceComplete())
@hasinvoicesenabled
@endhasinvoicesenabled
@endif
@if(! $order->deliveryComplete())
@hasdeliveriesenabled
@endhasdeliveriesenabled
@endif
@if(! $order->deliveryComplete())
@haspurchaseordersenabled
@endhaspurchaseordersenabled
@endif
@endif
@endcan
@can('view crm orders')
@if(! $subTotalError && ! $taxError && ! $totalError)
@endif
@endcan
@can('edit crm orders')
@endcan
@can('delete crm orders')
@endcan
@endscope