@php $pageTitle = __('Edit Order') . ' #'; if ($selectedModel != null) { $pageTitle .= $selectedModel->code; } $pageTitle .= ' '; $pageTitle .= __('Items'); @endphp @section('title', $pageTitle)
{{-- Header with Back Button --}}

{{ $pageTitle }}

{{ __('Back to Orders') }}
{{-- Order Info Card --}} @if($selectedModel != null)

{{ __('Order Code') }}

#{{ $selectedModel->code }}

{{ __('Status') }}

{{ ucfirst(__($selectedModel->status)) }}

{{ __('Payment Status') }}

{{ ucfirst(__($selectedModel->payment_status)) }}

@endif {{-- Main Edit Card --}}
{{-- Item Search --}}

{{ __('Add Items') }}

{{-- Items Table --}}

{{ __('Order Items') }}

@forelse ($editOrderProducts ?? [] as $key => $product) @empty @endforelse
{{ __('S/N') }} {{ __('Name') }} {{ __('Options') }} {{ __('Price') }} {{ __('QTY') }} {{ __('Actions') }}
{{ $key + 1 }}

{{ $product->name }}

{{ __("Brand") }}: {{ $product->brand->name ?? 'N/A' }}

@foreach ($product->option_groups as $option_group)

{{ $option_group->name }}

@foreach ($option_group->options as $option) @php if ($option_group->multiple) { $optionId = 'editProductOptions.' . $product->id . '.' . $option_group->id . '.' . $option->id; } else { $optionId = 'editProductOptions.' . $product->id . '.' . $option_group->id; } @endphp @if ($option_group->multiple) @else @endif @endforeach
@endforeach
{{ currencyFormat($product->sell_price) }}

{{ __('No items added yet. Search and add items above.') }}

{{-- Form Errors --}}
{{-- Action Buttons --}}
@if ( $selectedModel != null && $selectedModel->vendor != null && $selectedModel->vendor->vendor_type != null && $selectedModel->vendor->vendor_type->slug == 'pharmacy' && !in_array($selectedModel->payment_status, ['request', 'failed', 'cancelled', 'successful']) ) @endif