@extends('front::user.layouts.master') @section('user-content')
@if(session('message') == 'ok')

{{ trans('front::messages.profile.your-order-with-order-number') }}{{ $order->id }} {{ trans('front::messages.profile.success-registered-system') }}

@elseif(session('transaction-error'))

{{ trans('front::messages.profile.order') }} {{ $order->id }} {{ trans('front::messages.profile.registered') }}

{{ trans('front::messages.profile.system-cancellation', ['minutes' => option('orders_cancel_time', 60)]) }}
{{ trans('front::messages.profile.deduction-from-the-account') }}

@if($order->status == 'unpaid') @endif
@elseif(session('error'))
@endif

{{ trans('front::messages.profile.order-number') }}{{ $order->id }}{{ trans('front::messages.profile.recorded-on') }}{{ jdate($order->created_at)->format('%d %B %Y') }}

@if ($order->reserved() && $order->isPaid())
@endif
{{ trans('front::messages.profile.transferee') }} {{ $order->name }}
{{ trans('front::messages.profile.recipient-contact-number') }} {{ $order->mobile }}
{{ trans('front::messages.profile.shipping-cost') }} @if ($order->shipping_cost) {{ trans('front::messages.currency.prefix') }}{{ number_format($order->shipping_cost) }}{{ trans('front::messages.currency.suffix') }} @elseif ($order->reserved()) {{ trans('front::messages.profile.reserved') }} @elseif ($order->carrier && $order->carrier->carrige_forward) {{ trans('front::messages.profile.so-rent') }} @else {{ trans('front::messages.profile.free') }} @endif
@if ($order->hasPhysicalProduct())
{{ trans('front::messages.profile.how-to-send-order') }} {{ $order->carrier ? $order->carrier->title : trans('front::messages.profile.unknown') }}
@endif @if ($order->province)
{{ trans('front::messages.profile.address') }} {{ $order->province->name . ' - ' . $order->city->name }}
@endif @if ($order->address)
{{ trans('front::messages.profile.complete-address') }} {{ $order->address }}
@endif @if ($order->postal_code)
{{ trans('front::messages.profile.postal-code') }} {{ $order->postal_code }}
@endif
{{ trans('front::messages.profile.payment-method') }} @if ($order->walletHistory) {{ trans('front::messages.profile.pay-with-wallet') }} @else {{ trans('front::messages.profile.online-payment') }} @endif
{{ trans('front::messages.profile.order-description') }} {{ $order->description ? $order->description : '-' }}
{{ trans('front::messages.profile.payment-status') }} @if($order->status == 'paid') {{ trans('front::messages.profile.paid') }} @elseif($order->status == 'unpaid') {{ trans('front::messages.profile.unpaid') }} ( {{ trans('front::messages.profile.select-payment-gateway') }} ) @else {{ trans('front::messages.profile.canceled') }} @endif @if($order->status == 'unpaid')
@endif
{{ trans('front::messages.profile.total-discount') }} {{ trans('front::messages.currency.prefix') }}{{ number_format($order->totalDiscount()) }}{{ trans('front::messages.currency.suffix') }}
{{ trans('front::messages.profile.total-price') }} {{ trans('front::messages.currency.prefix') }}{{ number_format($order->price) }} {{ trans('front::messages.currency.suffix') }}
@if($order->status == 'paid' && $order->hasPhysicalProduct() && !$order->reserved())

{{ trans('front::messages.profile.post-status') }} @if($order->shipping_status == 'canceled') ( {{ trans('front::messages.profile.posting-canceled') }} ) @endif

@if ($order->tracking_code)
{{ trans('front::messages.profile.tracking-code') . ' ' . $order->tracking_code }}
@endif
@endif @if ($order->reservedOrders()->count())

لیست سفارش های رزرو شده قبلی

@foreach ($order->reservedOrders as $reserved_order) @endforeach
# شماره سفارش تاریخ ثبت عملیات
{{ $loop->iteration }} {{ $reserved_order->id }} {{ jdate($reserved_order->created_at) }} مشاهده
@endif

{{ trans('front::messages.profile.all-orders') }}

@foreach ($order->items as $item) @endforeach
# {{ trans('front::messages.profile.product-name') }} {{ trans('front::messages.profile.number') }} {{ trans('front::messages.profile.unit-price') }} {{ trans('front::messages.profile.total-price') }} {{ trans('front::messages.profile.discount') }} {{ trans('front::messages.profile.final-price') }} {{ trans('front::messages.profile.operation') }}
{{ $loop->iteration }}
@if($item->product) @else @endif
{{ $item->title }} @if ($item->get_price) @foreach ($item->get_price->get_attributes as $attribute) @if ($attribute->group->type == 'color') {{ $attribute->group->name }}: {{ $attribute->name }} @else {{ $attribute->group->name }}: {{ $attribute->name }} @endif @endforeach @endif
{{ $item->quantity }} {{ trans('front::messages.currency.prefix') }}{{ number_format($item->realPrice()) }} {{ trans('front::messages.currency.suffix') }} {{ trans('front::messages.currency.prefix') }}{{ number_format($item->quantity * $item->realPrice()) }} {{ trans('front::messages.currency.suffix') }} {{ $item->discount ? $item->discount . '%' : 0 }} {{ trans('front::messages.currency.prefix') }}{{ number_format($item->price * $item->quantity) }} {{ trans('front::messages.currency.suffix') }} @if ($item->product && $item->product->isDownload() && $item->get_price && $item->get_price->isDownloadable()) {{ trans('front::messages.profile.download') }} @endif @if($item->product) {{ trans('front::messages.profile.view') }} @else @endif
@if ($order->transactions->count())

{{ trans('front::messages.profile.payment-details') }}

@foreach($order->transactions()->latest()->get() as $transaction) @endforeach

{{ trans('front::messages.profile.row') }}

{{ trans('front::messages.profile.transaction-number') }}

{{ trans('front::messages.profile.history') }}

{{ trans('front::messages.profile.amount') }}

{{ trans('front::messages.profile.condition') }}

{{ $loop->iteration }}

{{ $transaction->id }}

{{ jdate($transaction->created_at)->format('%d %B %Y H:i:s') }}

{{ trans('front::messages.currency.prefix') }} {{ number_format($transaction->amount) }} {{ trans('front::messages.currency.suffix') }}

@if($transaction->status) {{ trans('front::messages.profile.successful-payment') }} @else {{ trans('front::messages.profile.unsuccessful-payment') }} @endif

@endif
@endsection