@extends('account.base', [ 'scripts' => [ 'fileUtilities', 'simpleCountdown' ] ]) @section('title', 'Order Details') @section('account_content') @include('common.no_cache')

{{ __('Order Details') }}

{{__('Back')}}
@php use App\Order; use App\Enumerables\Currency; /** * @var Order $order */ $offline = false; //($order->orderHasChangedCourses()) ? false : ($order->paymentMethod == 'Offline'); $currency = ''; $language = config('app.locale') ?? 'en'; $legacyOrder = $order->hasApplicationFees(); if ($order->currency == Currency::GBP) { $currency = '£ '; } else { $currency = '¥ '; } @endphp
{{__('order-history-OrderNo')}}: {{$order->displayOrderNo ?? ''}}
{{__('order-history-TotalPrice')}}: @if($offline) {{"N/A"}} @else {{isset($order) ? $currency.number_format($order->orderDiscountedValue(), 2, ".", ",") : ''}} @endif
@if(isset($order->paymentStatus) && $order->paymentStatus == \App\Enumerables\PaymentStatus::PAID)
{{__('order-history-OrderTime')}}: {{isset($order->created_at) ? \App\Traits\Timezone::getTimezoneTimestamp($order->created_at, 'd/m/Y H:i:s') : ''}}
@endif
{{__('Order Status')}}: {{__('paymentStatus-' . $order->paymentStatus) ?? ''}}
{{__('Payment Method')}}: {{$order->getPaymentMethodsText()}}
@if($order->paymentStatus == \App\Enumerables\PaymentStatus::CART_PROCESSING)
{{__('remaining-payment-time')}}
@endif @if(!empty($order->orderType))
{{__('Order Type')}}: {{__($order->orderType)}}
@endif
@if(isset($order->paymentStatus) && $order->paymentStatus == \App\Enumerables\PaymentStatus::PAID)
{{__('order-history-Invoice')}}
@endif
@include('account.order.shared.order_details_table_label', [ 'legacyOrder' => $legacyOrder ]) @include('account.order.shared.order_details_table_rows', [ 'rows' => $orderItems, 'offline' => $offline, 'legacyOrder' => $legacyOrder ])
@if(!empty($order->remarks))
{{__('Remarks')}}: {!! nl2br(htmlspecialchars($order->remarks)) !!}
@endif
{{__('order-history-OriginalPrice')}}: @if($legacyOrder) {{__('uni-ucas-application-fee')}}: @endif @if($order->eventDiscounts > 0 && !$offline) {{__('Event Discount')}}: @endif @if($order->discountTotal > 0 && !$offline) {{__('Discount-success')}}: @endif {{__('order-history-Total')}}:
@if($offline) {{"N/A"}} @else {{$currency}}{{number_format($order->total - $order->applicationFees, 2, ".", ",")}} @endif @if($legacyOrder) @if($offline) {{"N/A"}} @else {{$currency}}{{number_format(($order->applicationFees ?? 0), 2, ".", ",")}} @endif @endif @if($order->eventDiscounts > 0 && !$offline) -{{$currency}}{{number_format($order->eventDiscounts, 2, ".", ",")}} @endif @if($order->discountTotal > 0 && !$offline) -{{$currency}}{{number_format($order->discountTotal, 2, ".", ",")}} @endif @if($offline) {{"N/A"}} @else {{$currency}}{{number_format($order->orderDiscountedValue() , 2, ".", ",")}} @endif
@if(!empty($changeCourseItemsData['changeCourseItems']))
{{__('Change details')}}
{{__('Order Type')}}: {{__('order-course-change')}}
@php $refundMethod = ''; if (!empty($changeCourseItemsData['totalRefund'])) { $refundMethod .= __('refund-refund', [ 'value'=>'-'.$currency.number_format($changeCourseItemsData['totalRefund'], 2, '.', ',') ]); } if (!empty($changeCourseItemsData['totalConsumed'])) { if ($refundMethod != '') { $refundMethod .= ', '; } $refundMethod .= __('refund-consumed', [ 'value'=>'-'.$currency.number_format($changeCourseItemsData['totalConsumed'], 2, '.', ',') ]); } @endphp
{{__('Refund Method')}}: {{$refundMethod}}
@include('account.order.shared.order_details_table_label') @include('account.order.shared.order_details_table_rows', [ 'rows' => $changeCourseItemsData['changeCourseItems'] ])
@endif @if(!empty($refundItemsData['refundItems']))
{{__('Refund details')}}
{{__('Order Type')}}: {{__('order-refund')}}
{{__('Order Status')}}: {{__('Refund successful')}}
@php /** * @var array $refundItemsData */ $refundMethod = __('refund-' . $refundItemsData['refundMethods'][0]); if (!empty($refundItemsData['refundMethods'][1])) { $refundMethod .= ', '.__('refund-'.$refundItemsData['refundMethods'][0]); } @endphp
{{__('Refund Method')}}: {{$refundMethod}}
@include('account.order.shared.order_details_table_label') @include('account.order.shared.order_details_table_rows', ['rows' => $refundItemsData['refundItems']])
@endif
@endsection