@extends('layouts.app') @section('title', 'Encomenda #' . $order->id . ' - LaravelStore') @section('content')

Encomenda #{{ $order->id }}

Produtos
@foreach($order->items as $item)
@if($item->product->image) {{ $item->product->name }} @else
@endif
{{ $item->product->name }}
Quantidade: {{ $item->quantity }}
{{ number_format($item->price * $item->quantity, 2) }}€ @if($item->product->is_digital && $item->product->hasDownload()) @if($order->downloads_released) @if($item->product->file_url) Aceder @endif @if($item->product->file_path) Download @endif @else Aguarda confirmação de pagamento @endif @endif
@endforeach @php $pendingDigitalItems = $order->items->filter(fn($item) => $item->product->is_digital && $item->product->hasDownload() && !$order->downloads_released); @endphp @if($pendingDigitalItems->count() > 0)
Produtos Digitais

Os produtos digitais estarão disponíveis para download após a confirmação do pagamento. Receberá um email com os links.

@endif
Subtotal {{ number_format($order->subtotal, 2) }}€
@if($order->discount_amount > 0)
Desconto -{{ number_format($order->discount_amount, 2) }}€
@endif @if($order->coupon_discount > 0)
Cupão ({{ $order->coupon_code }}) -{{ number_format($order->coupon_discount, 2) }}€
@endif @if($order->iva_amount > 0)
IVA {{ number_format($order->iva_amount, 2) }}€
@endif
Total {{ number_format($order->total, 2) }}€
Detalhes

Status: {{ $order->status }}

Data: {{ $order->created_at->format('d/m/Y H:i') }}

ID de Pagamento: {{ $order->payment_id }}

Moradas
Morada de Envio

{{ $order->shipping_address ?? 'Não especificada' }}

Morada de Faturação

{{ $order->billing_address ?? 'Igual à morada de envio' }}

@endsection