@extends('admin::layouts.master') @push('styles') @endpush @section('content')

{{ translate('Order code') }}: {{ $order->order_code }}

Back

{{ translate('Order Details') }}

{{ translate('Customer info') }}
{{ translate('Name') }}: {{ $order->user->name ?? '' }}
{{ translate('Email') }}: {{ $order->user->email ?? '' }}
{{ translate('Phone') }}: {{ $order->user->phone ?? '' }}
{{ translate('Order code') }}: {{ $order->order_code }}
{{ translate('Bill Number') }}: {{ $order->bill_no ?? 'Not provided' }}
{{ translate('Order Date') }}: {{ $order->created_at->format('d.m.Y') }}
{{ translate('Payment method') }}: {{ strtoupper(str_replace('_', ' ', $order->payment_type)) }}
{{ translate('Shipping address') }}
@isset($order->address->address) {{ $order->address->address }},
@endisset @isset($order->user->phone) {{ $order->user->phone }},
@endisset @isset($order->address->landmark) {{ $order->address->landmark }},
@endisset @isset($order->address->level_id) @php $request = 'en'; $level = shipping_address_details($request, $order->address->level_id); @endphp @if (!empty($level['child'])) {{ $level['child'] }},
@endif @if (!empty($level['parent'])) {{ $level['parent'] }}, @endif @if (!empty($level['grand_parent'])) {{ $level['grand_parent'] }}, @endif @endisset @isset($order->country->name) {{ $order->country->name }},@isset($order->address->address_type) {{ $order->address->address_type == 1 ? 'Home' : 'Office' }} @endisset @endisset
{{ translate('Billing address') }}
@isset($order->address->address) {{ $order->address->address }},
@endisset @isset($order->user->phone) {{ $order->user->phone }},
@endisset @isset($order->address->landmark) {{ $order->address->landmark }},
@endisset @isset($order->address->level_id) @if (!empty($level['child'])) {{ $level['child'] }},
@endif @if (!empty($level['parent'])) {{ $level['parent'] }}, @endif @if (!empty($level['grand_parent'])) {{ $level['grand_parent'] }}, @endif @endisset @isset($order->country->name) {{ $order->country->name }},@isset($order->address->address_type) {{ $order->address->address_type == 1 ? 'Home' : 'Office' }} @endisset @endisset
@foreach ($order->orderDetails as $key => $orderDetail) @endforeach
SN {{ translate('Product') }} {{ translate('Qty') }} {{ translate('MRP') }} {{ translate('Offer Price') }} {{ translate('Total') }}
{{ $key + 1 }} @if ($orderDetail->product != null)

{{ $orderDetail->product->name }}

@if ($orderDetail->variation)
@foreach ($orderDetail->variation->combinations as $combination) {{ $combination->attribute->name }}: {{ $combination->attributeValue->attribute_value }} @endforeach
@endif
@else {{ translate('Product Unavailable') }} @endif
{{ $orderDetail->quantity }} @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($orderDetail->mrp) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($orderDetail->offer_price) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif @php $priceToUse = $orderDetail->offer_price == 0 || $orderDetail->offer_price === null ? $orderDetail->mrp : $orderDetail->offer_price; @endphp {{ decimal_price($orderDetail->quantity * $priceToUse) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
@php $taxes = get_split_tax($order); @endphp @foreach ($taxes as $tax) @php $value = str_replace(',', '', $tax['value']); $value = (float) $value; @endphp @endforeach
{{ translate('Total Amount') }} : @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->total_amount + ($order->discount_rate ?? $order->discount_rate)) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Taxable Value') }} : @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->sub_total_amount - (float) $order->tax) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Total Tax') }} : @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->tax) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ $tax['key'] }} ({{ $tax['percentage'] }}) : @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($value) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Shipping') }} : @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->delivery_charge) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Coupon Discount') }} ({{ $order->discount_percentage }}%): @if ($order->coupon_code)
({{ $order->coupon_code }})
@endif
@if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->discount_rate) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif
{{ translate('Grand Total') }} : @if (auth('admin')->user()->country->symbol_position == 'left') {{ auth('admin')->user()->country->currency_symbol }} @endif {{ decimal_price($order->total_amount) }} @if (auth('admin')->user()->country->symbol_position == 'right') {{ auth('admin')->user()->country->currency_symbol }} @endif

{{ translate('Delivery information') }}

@csrf

{{ translate('Shipping information') }}

@csrf

{{ translate('Order Updates') }}

@foreach ($order->orderUpdates as $order_update)
{{ $order_update->translatable_note ? translate($order_update->note) : $order_update->note }}
@isset($order_update->user_id) {{ translate('by') . ' ' . ($order_update->user->name ?? translate('Deleted user')) . ' at ' . $order_update->created_at->format('h:ia, d-m-Y') }} @endisset @isset($order_update->admin_id) {{ translate('by') . ' ' . ($order_update->admin->name ?? translate('Deleted user')) . ' at ' . $order_update->created_at->format('h:ia, d-m-Y') }} @endisset
@endforeach
{{-- payment log --}}

{{ translate('Payment Log') }}

@foreach ($order->paymentLog as $paymentLog)
Gateway: {{ ucwords($paymentLog->payment_type) }}
Status: {{ ucwords($paymentLog->payment_status) }}
Amount: {{ ucwords($paymentLog->transaction_amount) }}
@php $response = json_decode($paymentLog->response); @endphp Transaction Id: {{ $response->id }}
@endforeach
@endsection @section('modal') @include('admin::modals.delete_modal') @include('admin::modals.confirm_modal') @include('orders::modals.update_delivery_status_modal') @include('orders::modals.update_payment_status_modal') @endsection @section('script') @include('tax::scripts.index_scripts') @endsection