@php $themeColor = $storeSettings->theme_color ?? '#0f172a'; $themeDark = '#111827'; $logoPath = $storeSettings->store_logo ? asset('storage/' . $storeSettings->store_logo) : null; $chunks = $transactions->chunk(4); @endphp
@foreach($chunks as $chunk)
@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
@if($logoPath) @endif {{ $senderName }}
{{ $tx->shipping_courier ?? 'Ekspedisi' }}
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
@endforeach