@php $statusText = [ 'new' => 'Yeni Sipariş', 'approved' => 'Onaylandı', 'pushed' => 'Sisteme Gönderildi', 'shipped' => 'Kargoya Verildi', 'completed' => 'Tamamlandı', 'rejected' => 'Reddedildi', 'cancelled' => 'İptal Edildi', ][$order->status] ?? ucfirst($order->status); $subTotal = $order->items->sum('line_total'); $vatTotal = $order->items->sum(function($i){ return $i->line_total * ($i->vat_rate/100); }); $grandTotal = $subTotal + $vatTotal; @endphp

Dozze Coffee

Bayi Sipariş ve İrsaliye Yönetimi
İrsaliye
No: {{ $order->code }}
Tarih: {{ $order->created_at->format('d.m.Y H:i') }}
@php $badgeClass = in_array($order->status, ['approved','pushed','shipped','completed']) ? 'green' : (in_array($order->status, ['rejected','cancelled']) ? 'red' : 'gray'); @endphp {{ $statusText }}
Gönderen
FirmaDozze Coffee
E-Postadestek@dozze.coffee
Alıcı
Bayi{{ $order->dealer?->name ?? '-' }}
Kullanıcı{{ $order->user->name }} ({{ $order->user->email }})
Sipariş Bilgileri
@if($order->invoice_no)
Fatura No{{ $order->invoice_no }}
@endif @if($order->shipment_no)
Sevkiyat No{{ $order->shipment_no }}
@endif
Para Birimi{{ $order->currency }}
Sipariş Kalemleri
@foreach($order->items as $item) @php $lineVat = $item->line_total * ($item->vat_rate/100); @endphp @endforeach
SKU Ürün Adet Birim Fiyat Ara Toplam KDV
{{ $item->product->sku }} {{ $item->product->name }} {{ $item->qty }} ₺{{ number_format($item->unit_price, 2, ',', '.') }} ₺{{ number_format($item->line_total, 2, ',', '.') }} ₺{{ number_format($lineVat, 2, ',', '.') }} ({{ number_format($item->vat_rate, 0) }}%)
Ara Toplam (KDV Hariç)₺{{ number_format($subTotal, 2, ',', '.') }}
KDV Toplam₺{{ number_format($vatTotal, 2, ',', '.') }}
Genel Toplam (KDV Dahil)₺{{ number_format($grandTotal, 2, ',', '.') }}
@if($order->notes)
Not: {{ $order->notes }}
@endif