@include('theme-views.partials._profile-aside')
{{translate('order_status')}}
@if($order['order_status']=='failed' || $order['order_status']=='canceled') {{translate($order['order_status'] =='failed' ? 'Failed To Deliver' : $order['order_status'])}} @elseif($order['order_status']=='confirmed' || $order['order_status']=='processing' || $order['order_status']=='delivered') {{translate($order['order_status']=='processing' ? 'packaging' : $order['order_status'])}} @else {{translate($order['order_status'])}} @endif
{{translate('payment_status')}}
{{ translate($order['payment_status']) }}
@if($order->order_status=='delivered' && $order->order_type == 'default_type') {{ translate('reorder') }} @endif
@if($order->order_type == 'default_type' && getWebConfig(name: 'order_verification'))
{{translate('Verification_Code')}}
{{ $order['verification_code'] }}
@endif
@include('theme-views.users-profile.account-order-details._order-details-head',['order'=>$order])
@php($digitalProduct = false) @foreach ($order->details as $key=>$detail) @if(isset($detail->product->digital_product_type)) @php($digitalProduct = $detail->product->product_type === 'digital' ? true : false) @if($digitalProduct === true) @break @else @continue @endif @endif @endforeach @if($order->order_type == 'default_type' && ($order->order_status=='delivered' || ($order->payment_status == 'paid' && $digitalProduct))) @elseif($order->order_type != 'default_type' && $order->order_status=='delivered') @endif @foreach ($order->details as $key=>$detail) @php($product=json_decode($detail->product_details,true)) @if($product) @php($length = $detail->created_at->diffInDays($current_date)) @endif @endforeach
{{translate('product_details')}} {{translate('qty')}} {{translate('unit_price')}} {{translate('discount')}} order_type == 'default_type' && $order->order_status=='delivered') ? 'colspan="2"':'' }}>{{translate('Total')}}{{translate('action')}}
{{isset($product['name']) ? Str::limit($product['name'],40) : ''}} @if($detail->refund_request == 1) ({{translate('refund_pending')}} )
@elseif($detail->refund_request == 2) ({{translate('refund_approved')}} )
@elseif($detail->refund_request == 3) ({{translate('refund_rejected')}} )
@elseif($detail->refund_request == 4) ({{translate('refund_refunded')}} )
@endif
@if($detail->variant) {{translate('variant')}} :{{$detail->variant}} @endif
{{$detail->qty}} {{webCurrencyConverter($detail->price)}} {{webCurrencyConverter($detail->discount)}} {{webCurrencyConverter(($detail->qty*$detail->price)-$detail->discount)}}
@if($detail?->product && $order->payment_status == 'paid' && $detail?->product->digital_product_type == 'ready_product') @elseif($detail?->product && $order->payment_status == 'paid' && $detail?->product->digital_product_type == 'ready_after_sell') @if($detail->digital_file_after_sell) @else @endif @endif
@if($order->order_type == 'default_type') @if($order->order_status=='delivered') @include('theme-views.layouts.partials.modal._review',['id'=>$detail->id,'order_details'=>$detail,]) @if($detail->refund_request !=0) {{translate('refund_details')}} @endif @if( $length <= $refund_day_limit && $detail->refund_request == 0) @include('theme-views.layouts.partials.modal._refund',['id'=>$detail->id,'order_details'=>$detail,'order'=>$order,'product'=>$product]) @endif @endif @else @endif
@php($orderTotalPriceSummary = \App\Utils\OrderManager::getOrderTotalPriceSummary(order: $order))
{{translate('item')}}
{{ $orderTotalPriceSummary['totalItemQuantity'] }}
{{translate('subtotal')}}
{{ webCurrencyConverter(amount: $orderTotalPriceSummary['subTotal'] + $orderTotalPriceSummary['itemDiscount']) }}
{{translate('tax_fee')}}
{{ webCurrencyConverter(amount: $orderTotalPriceSummary['taxTotal']) }}
@if($order->order_type == 'default_type' && $order?->is_shipping_free == 0)
{{translate('shipping_fee')}}
{{ webCurrencyConverter(amount: $orderTotalPriceSummary['shippingTotal']) }}
@endif
{{translate('discount_on_product')}}
{{ webCurrencyConverter(amount: $orderTotalPriceSummary['itemDiscount']) }}
{{translate('coupon_discount')}}
- {{ webCurrencyConverter(amount: $orderTotalPriceSummary['couponDiscount']) }}
@if($order->order_type != 'default_type')
{{translate('extra_discount')}}
- {{ webCurrencyConverter(amount: $orderTotalPriceSummary['extraDiscount']) }}
@endif

{{translate('total')}}

{{ webCurrencyConverter(amount: $orderTotalPriceSummary['totalAmount']) }}

@if ($order->order_type == 'POS' || $order->order_type == 'pos')
{{translate('paid_amount')}}
{{ webCurrencyConverter(amount: $orderTotalPriceSummary['paidAmount']) }}
{{translate('change_amount')}}
{{ webCurrencyConverter(amount: $orderTotalPriceSummary['changeAmount']) }}
@endif @if ($order['order_status']=='pending' && $order['payment_method']=='cash_on_delivery') @endif