@extends('layouts.account') @section('title', __('storefront.orders.order_title', ['number' => $order->reference])) @php $productLines = $order->lines->where('type', '!=', 'shipping'); $shippingLine = $order->lines->firstWhere('type', 'shipping'); @endphp @section('account')
{{ __('storefront.orders.back') }}

{{ __('storefront.orders.order_title', ['number' => $order->reference]) }}

{{-- Summary --}}
{{ __('storefront.orders.date') }}
{{ $order->placed_at->format('d/m/Y') }}
{{ __('storefront.orders.status') }}
@if ($paymentMethodName)
{{ __('storefront.orders.payment') }}
{{ $paymentMethodName }}
@endif @if ($shippingLine)
{{ __('storefront.orders.shipping_method') }}
{{ $shippingLine->description }}
@endif @foreach ($shipments as $shipment)
{{ __('storefront.orders.tracking') }}
{{ $shipment->tracking_reference }}
@endforeach
{{-- Items + totals --}}

{{ __('storefront.orders.items') }}

{{ __('storefront.orders.subtotal') }}
{{ $order->sub_total?->formatted() }}
@if ($order->discount_total?->value > 0)
{{ __('storefront.orders.discount') }}
−{{ $order->discount_total->formatted() }}
@endif
{{ __('storefront.orders.shipping') }}
{{ $order->shipping_total?->formatted() }}
@if ($order->tax_total?->value > 0)
{{ __('storefront.orders.tax') }}
{{ $order->tax_total->formatted() }}
@endif
{{ __('storefront.orders.total') }}
{{ $order->total?->formatted() }}
{{-- Addresses --}}
@foreach ([ 'shipping_to' => $order->shippingAddress, 'billing' => $order->billingAddress, ] as $heading => $address) @if ($address)

{{ __("storefront.orders.{$heading}") }}

{{ trim($address->first_name.' '.$address->last_name) }} @if ($address->company_name){{ $address->company_name }}@endif @if ($address->tax_identifier){{ __('storefront.account.tax_identifier') }}: {{ $address->tax_identifier }}@endif {{ $address->line_one }} @if ($address->line_two){{ $address->line_two }}@endif {{ trim($address->postcode.' '.$address->city) }} @if ($address->state) {{ Lang::has("core::states.{$address->state}") ? __("core::states.{$address->state}") : $address->state }} @endif @if ($address->contact_phone){{ $address->contact_phone }}@endif
@endif @endforeach
@endsection