@extends('admin.layout.content') @section('content')
{{-- Flash Messages --}} @if (session('success')) @endif @if (session('error')) @endif {{-- Header --}}

edit Edit Transaksi {{ $type === 'offline' ? 'Offline (POS)' : 'Online (E-Commerce)' }}

Perbarui status transaksi

arrow_back Kembali
{{-- Detail Transaksi --}}
receipt_long Informasi Transaksi
@if ($type === 'offline')
No. Invoice {{ $transaction->invoice_number }}
Tanggal {{ $transaction->created_at ? $transaction->created_at->format('d/m/Y H:i') : '-' }}
Kasir {{ $transaction->user->username ?? $transaction->user->full_name ?? '-' }}
Metode Bayar {{ $transaction->payment_method ?? 'Tunai' }}
Total Rp {{ number_format($transaction->total_payment, 0, ',', '.') }}
@else
Invoice {{ $transaction->invoice_number }}
Tanggal {{ $transaction->created_at ? $transaction->created_at->format('d/m/Y H:i') : '-' }}
Pembeli {{ $transaction->user->username ?? ($transaction->user->profile->full_name ?? 'Guest') }}
Metode Bayar {{ $transaction->payment_method ?? '-' }}
Total Rp {{ number_format($transaction->total_payment, 0, ',', '.') }}
No. Resi (Tracking) {{ $transaction->tracking_number ?? '-' }}
@if ($transaction->address)
Nama Penerima {{ $transaction->address->recipient_name ?? '-' }}
No. Telepon {{ $transaction->address->recipient_phone ?? '-' }}
Alamat Lengkap {{ $transaction->address->full_address ?? '-' }}
Kelurahan/Desa {{ $transaction->address->village ?? '-' }}
Kecamatan {{ $transaction->address->district ?? '-' }}
Kota {{ $transaction->address->city ?? '-' }}
Provinsi {{ $transaction->address->province ?? '-' }}
Kode Pos {{ $transaction->address->postal_code ?? '-' }}
@if ($transaction->address->address_label)
Label Alamat {{ $transaction->address->address_label }}
@endif @endif @endif
{{-- Rincian Produk --}}
shopping_bag Rincian Produk
@if ($type === 'offline' && $transaction->payment_method !== 'CASH') @endif @forelse ($transaction->details as $detail) @php $pkg = $detail->package; $productName = $pkg->product->product_name ?? $pkg->package_name ?? '-'; $weight = $pkg->weight_in_kg ?? '-'; $unit = $pkg->unit->unit_abbreviation ?? $pkg->unit->unit_name ?? ''; $weightDisplay = ($weight !== '-' && $unit) ? $weight . ' ' . $unit : ($weight !== '-' ? $weight : '-'); $subtotal = $detail->quantity * $detail->unit_price; @endphp @if ($type === 'offline' && $transaction->payment_method !== 'CASH') @endif @empty @endforelse
Produk QtyBeratHarga Subtotal
{{ $productName }} {{ $detail->quantity }}{{ $weightDisplay }}Rp {{ number_format($detail->unit_price, 0, ',', '.') }} Rp {{ number_format($subtotal, 0, ',', '.') }}
Tidak ada detail produk
{{-- Form Update Status --}}
edit_note Perbarui Status
@csrf @method('PUT') @if ($type === 'offline') {{-- Offline: hanya update QRIS status --}} @if ($transaction->payment_method !== 'CASH')
@else
info Transaksi tunai tidak memiliki status yang dapat diubah.
@endif @else {{-- Online: update payment_status & order_status --}}
@error('payment_status')
{{ $message }}
@enderror
@error('order_status')
{{ $message }}
@enderror
@error('tracking_number')
{{ $message }}
@enderror
@endif
Batal @if ($type === 'offline' && $transaction->payment_method !== 'CASH' || $type === 'online') @endif
@endsection