@foreach($chunk as $tx)
@php
$senderName = $storeSettings['store_name'] ?? 'TOKO ANDA';
$senderPhone = $storeSettings['store_phone'] ?? '-';
$senderAddress = $storeSettings['store_address'] ?? '-';
if ($tx->branch) {
$senderName = $tx->branch->name;
$senderPhone = $tx->branch->phone ?? $senderPhone;
$senderAddress = $tx->branch->address ?? $senderAddress;
}
@endphp
Pengirim
{{ $senderName }}
{{ $senderPhone }}
{{ $senderAddress }}
Penerima
{{ $tx->recipient_name ?: '-' }}
{{ $tx->recipient_phone ?: '-' }}
{{ $tx->recipient_address ?: '-' }}
{{ trim(($tx->recipient_city ?: '') . ' ' . ($tx->recipient_postal_code ?: '')) }}
Nomor Resi
{{ $tx->shipping_tracking_number ?: 'BELUM ADA RESI' }}
#{{ $tx->transaction_code }}
{{ $tx->created_at->format('d/m/Y H:i') }}
Detail Barang • {{ $tx->items->sum('quantity') }} pcs
@foreach($tx->items as $item)
{{ $item->product->name ?? 'Produk' }}
x{{ $item->quantity }}
@endforeach
@endforeach
@for($i = $chunk->count(); $i < 4; $i++)
Area Kosong
@endfor