@extends('admin.layouts.container') @section('content')

{{ $head ?? ''}}

{{ __('orders.order_details') }}

@if(isMainAdminRole()) @endif @if(isMainAdminRole()) @endif @if($order->notes) @endif
{{ __('orders.order_id') }} : {{ $order->id }} {{ __('orders.customer_name') }} : {{ $order->user->name ?? "-" }}
{{ __('orders.customer_email') }} : {{ $order->user->email ?? "-" }} {{ __('orders.customer_phone') }} : {{ $order->user->phone ?? "-" }}
{{ __('orders.order_date') }} : {{ $order->created_at }} {{ __('orders.payment_method') }} : {{ $order->paymentMethod->currentDescription->title ?? "-" }}
{{ __('orders.payment_status') }} : {{ __("general.payment_status_$order->payment_status") }} {{ __('orders.provider_commission') }} : {{ $order->provider_commission ." ".$currency_code }}
{{ __('orders.app_commission_from_provider') }} : {{ $order->app_commission_from_provider ." ".$currency_code }} {{ __('orders.app_commission_from_rep') }} : {{ $order->app_commission_from_rep ." ".$currency_code }}
{{ __('orders.rep_commission') }} : {{ $order->rep_commission ." ".$currency_code }} {{ __('orders.app_commission') }} : {{ $order->app_commission ." ".$currency_code }}
{{ __('orders.coupon') }} : {{ $order->coupon->name ?? "-" }} {{ __('orders.rep_name') }} : {{ $order->rep->name ?? "-" }}
{{ __('orders.provider_name') }} : {{ $order->provider->name ?? "-" }} {{ __('orders.status') }} : {{ getOrderStatusName($order->status) }}
{{ __('orders.notes') }} : {{ $order->notes ?? "-" }}
@if($order->products()->count())

{{ __('orders.products_ordered') }}

@foreach($order->products()->get() as $product) @endforeach
{{ __('orders.product_name') }} {{ __('orders.price') }} {{ __('orders.addons_price') }} {{ __('orders.quantity') }} {{ __('orders.total') }} {{ __('orders.details') }}
{{ $product->currentDescription->title ?? "" }} {{ $product->pivot->price." ".$currency_name }} {{ $product->pivot->addons_price ? $product->pivot->addons_price." ".$currency_name : '-' }} {{ $product->pivot->qty }} {{ $product->pivot->total." ".$currency_name }} @if($product->pivot->orderProductAddons->count()) @else {{ __('general.not_exist') }} @endif
@endif

{{ __('orders.order_payment_details') }}

@if(isMainAdminRole()) @if($order->delivery_charges) @endif @if($order->tax_amount) @endif @if($order->coupon_discount > 0) @endif @endif @if(isProvider()) @endif
{{ __('orders.subtotal') }} {{ $order->original_subtotal ." ".$currency_name }}
{{ __('orders.delivery_charges') }} {{ $order->delivery_charges ." ".$currency_name }}
{{ __('orders.tax_amount') }} {{ $order->tax_amount ." ".$currency_name }}
{{ __('orders.coupon_discount') }} {{ $order->coupon_discount ." ".$currency_name }}
{{ __('orders.total_amount') }} {{ getOrderTotal($order) ." ".$currency_name }}
{{ __('orders.total_price_products').'"'.__('orders.amount_due').'"' }} {{ getOrderTotal($order) ." ".$currency_name }}
{{ __('orders.discount_value').'"'.__('orders.if_any').'"' }} {{ $order->coupon_discount ." ".$currency_name }}
{{ __('orders.management_ratio') }} {{ $order->app_commission_from_provider." ".$currency_name }}
{{ __('orders.total_order') }} {{ $order->subtotal ." ".$currency_name }}
@if($order->address && $order->address->exists())

{{ __('orders.delivery_address') }}

{{ __('orders.city') }} {{ __('orders.address_on_map') }} {{ __('orders.street_name') }} {{ __('orders.building_name') }} {{ __('orders.building_number') }} {{ __('orders.distinct_mark') }}
{{ $order->address->city->currentDescription->title ?? "" }} {{ $order->address->street_name ?? "" }} {{ $order->address->building_name ?? "" }} {{ $order->address->building_number ?? "" }} {{ $order->address->distinct_mark ?? "-" }}
@endif
@if(is_file(public_path($order->barcode_photo)) && isMainAdminRole())
@endif
{{ __('general.export_excel') }} {{ __('general.print') }}
{{--
@method('PUT') @csrf
--}} @if($order->products()->count()) @foreach($order->products()->get() as $product) @if($product->pivot->orderProductAddons->count()) @include('admin.orders.product_modal', ['orderProductAddons'=>$product->pivot->orderProductAddons, 'pivot_id'=>$product->pivot->id]) @endif @endforeach @endif @endsection @push('stack_scripts') @include('admin.partials._map') @endpush @section('inner_js') {{-- get regions by country --}} @include('admin.partials._script') @endsection