@include('laravel-crm::partials.form.hidden',[ 'name' => 'lead_id', 'value' => old('lead_id', $order->lead->id ?? $quote->lead->id ?? $lead->id ?? null), ]) @include('laravel-crm::partials.form.hidden',[ 'name' => 'quote_id', 'value' => old('quote_id', $order->quote->id ?? $quote->id ?? null), ]) @if(isset($quote)) @include('laravel-crm::partials.form.hidden',[ 'name' => 'client_id', 'value' => old('client_id', $order->client->id ?? $quote->client->id ?? null), ]) @include('laravel-crm::partials.form.hidden',[ 'name' => 'person_id', 'value' => old('person_id', $order->person->id ?? $quote->person->id ?? null), ]) @include('laravel-crm::partials.form.hidden',[ 'name' => 'organization_id', 'value' => old('organization_id', $order->organization->id ?? $quote->organization->id ?? null), ])
{{ ucfirst(__('laravel-crm::lang.client')) }}

@if($quote->client){{ $quote->client->name }}@endif

{{ ucfirst(__('laravel-crm::lang.organization')) }}

@if($quote->organization){{ $quote->organization->name }}@endif

{{ ucfirst(__('laravel-crm::lang.contact_person')) }}

@if($quote->person){{ $quote->person->name }}@endif

{{ ucfirst(__('laravel-crm::lang.details')) }}

@else @livewire('order-form',[ 'order' => $order ?? null, 'client' => $client ?? null, 'organization' => $organization ?? null, 'person' => $person ?? null ]) @endif @include('laravel-crm::partials.form.textarea',[ 'name' => 'description', 'label' => ucfirst(__('laravel-crm::lang.description')), 'rows' => 5, 'value' => old('description', $order->description ?? $quote->description ?? null) ])
@include('laravel-crm::partials.form.text',[ 'name' => 'reference', 'label' => ucfirst(__('laravel-crm::lang.reference')), 'value' => old('amount', $order->reference ?? $quote->reference ?? null) ])
@include('laravel-crm::partials.form.select',[ 'name' => 'currency', 'label' => ucfirst(__('laravel-crm::lang.currency')), 'options' => \VentureDrake\LaravelCrm\Http\Helpers\SelectOptions\currencies(), 'value' => old('currency', $order->currency ?? $quote->currency ?? \VentureDrake\LaravelCrm\Models\Setting::currency()->value ?? 'USD') ])
@include('laravel-crm::partials.form.multiselect',[ 'name' => 'labels', 'label' => ucfirst(__('laravel-crm::lang.labels')), 'options' => \VentureDrake\LaravelCrm\Http\Helpers\SelectOptions\optionsFromModel(\VentureDrake\LaravelCrm\Models\Label::all(), false), 'value' => old('labels', (isset($order)) ? $order->labels->pluck('id')->toArray() : null) ]) @include('laravel-crm::partials.form.select',[ 'name' => 'user_owner_id', 'label' => ucfirst(__('laravel-crm::lang.owner')), 'options' => ['' => ucfirst(__('laravel-crm::lang.unallocated'))] + \VentureDrake\LaravelCrm\Http\Helpers\SelectOptions\users(false), 'value' => old('user_owner_id', (isset($order)) ? $order->user_owner_id ?? '' : auth()->user()->id), ]) @include('laravel-crm::fields.partials.model', ['model' => $order ?? new \VentureDrake\LaravelCrm\Models\Order()]) @livewire('address-edit', [ 'addresses' => $addresses ?? null, 'old' => old('addresses'), 'model' => 'order' ])
@livewire('order-items',[ 'order' => $order ?? null, 'products' => $order->orderProducts ?? $quote->quoteProducts ?? null, 'old' => old('products'), 'fromQuote' => (isset($quote)) ? $quote : false ])