@extends('admin.layout') @section('title', 'Detail Order') @section('content')
{{-- Header --}}
Kembali ke Order Transaction Detail

{{ $order->public_token }}

Detail pelanggan, pembayaran, fulfillment, dan riwayat status.

Status Order
@include('partials.status-stamp', [ 'status' => $order->status ])
{{-- Manual payment recovery --}} @if ($order->status === 'PENDING_PAYMENT')
Recovery Action

Konfirmasi Pembayaran Manual

Gunakan hanya setelah invoice dan nominal pembayaran diverifikasi langsung di {{ $order->paymentGatewayLabel() }}.

@endif @if ($order->payment_confirmation_source === 'manual_admin')
Pembayaran dikonfirmasi manual {{ $order->manualPaymentConfirmedBy?->name ?? 'Admin' }} · {{ optional($order->manual_payment_confirmed_at)->format('d M Y H:i') }} WIB

{{ $order->manual_payment_reason }}

@endif {{-- Copy actions --}}
{{-- Information cards --}}
{{-- Customer information --}}
Customer

Informasi Pemesan

Produk @if ($order->product && ! $order->product->trashed()) {{ $order->productName() }} @else {{ $order->productName() }} @endif
@if ($order->variantName())
{{ $order->variantOptionName() ?: 'Variant' }} {{ $order->variantLabel() }}
@endif @foreach ($order->checkoutAnswerRows() as $answer)
{{ $answer['label'] }} {{ $answer['value'] }}
@endforeach @unless ($order->isRobuxOrder())
Nama {{ $order->customer_name }}
@endunless
WhatsApp {{ $order->customer_whatsapp }}
@if (filled($order->customer_email))
Email {{ $order->customer_email }}
@endif @if ($order->isRobuxOrder())
Jumlah Robux {{ number_format($order->robuxAmount() ?? 0, 0, ',', '.') }} Robux
@elseif ($order->isBatch())
Jumlah {{ $order->quantity }} {{ strtolower(\App\Models\Product::unitLabelForType($order->productType())) }}
@endif
Harga Rp {{ number_format($order->price_at_order, 0, ',', '.') }}
@if ($order->discount_amount > 0)
Voucher {{ $order->voucher_code_snapshot }}
Diskon - Rp {{ number_format($order->discount_amount, 0, ',', '.') }}
Total Setelah Diskon Rp {{ number_format($order->payableAmount(), 0, ',', '.') }}
@endif
Payment Gateway {{ $order->paymentGatewayLabel() }}
Biaya Pembayaran {{ $order->fee_payer === 'seller' ? 'Toko' : 'Pembeli' }}
@if ($order->qris_fee !== null)
Fee QRIS Rp {{ number_format($order->qris_fee, 0, ',', '.') }}
@endif @if ($order->qris_total_payment !== null)
Total Dibayar Customer Rp {{ number_format($order->qris_total_payment, 0, ',', '.') }}
@endif @if ($order->payment_reference)
Reference Gateway {{ $order->payment_reference }}
@endif
{{-- Fulfillment status --}}
Fulfillment

Status Pemrosesan

Status {{ $order->status }}
Percobaan {{ $order->fulfillment_attempts }}
{{-- Delivered stock --}} @if ($order->status === 'DELIVERED' && $order->stockLinks->isNotEmpty()) @php $unitLabel = \App\Models\Product::unitLabelForType($order->productType()); $copyAllText = collect([ $order->productName() . ($order->isBatch() ? ' - ' . $order->quantity . ' ' . $unitLabel : '') ]) ->concat( $order->stockLinks->map( function ($link, $index) use ($unitLabel) { $payload = $link->deliveryPayload(); $lines = collect($payload) ->map( fn ($value, $key) => ucwords(str_replace('_', ' ', $key)) . ': ' . $value ) ->implode("\n"); return "\n{$unitLabel} " . ($index + 1) . "\n" . $lines; } ) ) ->implode("\n"); @endphp
Delivery Detail

{{ $unitLabel }} Terkirim @if ($order->isBatch()) ({{ $order->quantity }}) @endif

@foreach ($order->stockLinks as $link) @php $payload = $link->deliveryPayload(); @endphp
{{ $unitLabel }} {{ $loop->iteration }} stock #{{ $link->productStock->id }} @if ($link->productStock->delivered_at) · {{ $link->productStock->delivered_at->format('d M H:i') }} WIB @endif
@forelse ($payload as $key => $value)
{{ ucwords(str_replace('_', ' ', $key)) }} {{ $value }}
@empty

Detail pengiriman kosong.

@endforelse
@endforeach
@endif {{-- Timeline --}}
Status History

Linimasa Status

Update otomatis
@forelse ($order->statusHistory as $history) @empty @endforelse
Dari Ke Alasan Waktu
{{ $history->from_status ?? '-' }} {{ $history->to_status }} {{ $history->reason ?? '-' }} {{ $history->created_at->format('d M H:i') }} WIB
Belum ada riwayat status.
@if ($order->status === 'PENDING_PAYMENT') @endif @endsection