@extends('layouts.admin') @include("backend.orders.scripts") @push("js") @endpush @section('content')
{{__('Order')}} ({{ $order->ref_id }})
@if($order->shippingCompany) @endif
{{__('Order Id')}} {{ $order->ref_id }} {{__("Customer")}} {{ $order->customer->full_name ?? "--" }}
{{__("Address")}} @if(filled($order->userAddress)) {{ $order->userAddress->title ?? "--" }} @else --- @endif {{__("Shipping Company")}}{{ $order->shippingCompany->name ?? "--" }} ({{$order->shippingCompany->code ?? "--"}})
{{__("Created At")}} {{ format_date($order->created_at,__("d-m-Y à H:i:s")) }} {{__("Status")}} {!! $order->status->badge_label ?? $order->statusWithBadge() ?? "--" !!} {{-- @if(!blank($order->status))--}} {{--
--}} {{-- --}} {{-- status->color}}"--}} {{-- aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">--}} {{-- --}} {{-- @endif--}}
{{__("Subtotal")}} {{ format_amount($order->subtotal,$order->currency()) }}
{{__("Discount code")}} {{ $order->discount_code }}
{{__("Discount")}} {{ format_amount($order->discount,$order->currency()) }}
{{_("Shipping")}} {{ format_amount($order->shipping, $order->currency()) }}
{{__("Tax")}} {{ format_amount($order->tax,$order->currency()) }}
{{__("Amount")}} {{ format_amount($order->total,$order->currency()) }}

{{__('Products')}}

@forelse($order->items as $item) @empty @endforelse
{{__("Product")}} {{__('Price')}} {{__('Quantity')}} {{__("Amount")}}
{{ $item->product->name }} {{ format_amount($item->price) }} {{ format_amount($item->quantity) }} {{ format_amount($item->amount,$order->currency()) }}
{{__("No products found")}}

{{__('Payments')}}

@forelse($order->paymentUsages as $usage) @empty @if(!in_array($order->status_code,$rejectedStatuses)) @endif @endforelse
{{__("Method")}} {{__("Reference")}} {{__("Amount Paid")}} {{__("Amount Used")}} {{__("Paid At")}}
{{ $usage->payment->method->name }} {{ $usage->payment->provider_reference }} {{ format_amount($usage->payment->paid_amount,$order->currency()) }} {{ format_amount($usage->amount_used,$order->currency()) }} {{ format_date($usage->payment->created_at) }}
{{__("No payments in this order.")}} $paidStatus->name,'orderId' => $order->ref_id])}}"> {{__("Mark this order as Paid")}}
@if($order->statusChanges)

{{__('Process')}}

@foreach($order->statusChanges as $change) @endforeach
{{__("Status")}} {{__("At")}} {{__("By")}}
{!! $change->status->badge_dot ?? "" !!} {{ format_date($change->created_at, __("d-m-Y H:i:s")) }} {{ $change->createdBy->fullName ?? "--" }}
@endif
@endsection