@if($firmaLogoBase64) @endif
{{ $firmaSettings['firma_kisa_adi'] ?: $firmaSettings['firma_adi'] }}
@if($firmaSettings['firma_kisa_adi'] && $firmaSettings['firma_adi'] && $firmaSettings['firma_kisa_adi'] !== $firmaSettings['firma_adi'])
{{ $firmaSettings['firma_adi'] }}
@endif @if($firmaSettings['firma_telefon'] || $firmaSettings['firma_email'])
@if($firmaSettings['firma_telefon']){{ $firmaSettings['firma_telefon'] }}@endif @if($firmaSettings['firma_telefon'] && $firmaSettings['firma_email']) · @endif @if($firmaSettings['firma_email']){{ $firmaSettings['firma_email'] }}@endif
@endif
SİPARİŞ
Hizmet Sipariş Formu
{{ $siparis->siparis_no }}
{{-- Müşteri + Proje --}}
Müşteri
{{ $siparis->contact->display_name ?? '—' }}
@if(optional($siparis->contact)->tax_number)
VKN: {{ $siparis->contact->tax_number }}
@endif @if(optional($siparis->contact)->phone)
{{ $siparis->contact->phone }}
@endif @if(optional($siparis->contact)->email)
{{ $siparis->contact->email }}
@endif
Proje
@if($siparis->project) {{ $siparis->project->project_number ?? '' }} — {{ $siparis->project->title ?? $siparis->title }} @else {{ $siparis->title ?? '—' }} @endif
@if(optional($siparis->project)->city || optional($siparis->project)->district)
{{ trim(($siparis->project->city ?? '') . ' / ' . ($siparis->project->district ?? ''), ' /') }}
@endif @if(optional($siparis->project)->ada || optional($siparis->project)->parcel)
Ada/Parsel: {{ $siparis->project->ada }} / {{ $siparis->project->parcel }}
@endif
{{-- Bilgi grid --}}
Sipariş No
{{ $siparis->siparis_no }}
Sipariş Tarihi
{{ $siparis->order_date?->format('d.m.Y') ?? '—' }}
Teklif Dosya No
{{ $siparis->project?->offer_file_no ?: '—' }}
Durum
{{ $siparis->statusLabel() }}
Düzenleyen
{{ optional($siparis->creator)->kisa_ad ?? '—' }}
@if($siparis->title)
Başlık: {{ $siparis->title }}
@endif {{-- Kalemler --}} @php $kalemler = \App\Models\ServiceItem::sortGroupedByCategory( $siparis->kalemler->groupBy(fn($k) => $k->category ?: '__other__') ); $grandGross = 0; $grandDisc = 0; $grandSub = 0; $grandKdv = 0; @endphp
@foreach($kalemler as $catSlug => $group) @php $catLabel = \App\Models\ServiceItem::$categoryLabels[$catSlug] ?? ($group->first()?->category_label ?: 'Diğer'); @endphp @foreach($group as $k) @php $lineGross = (float) $k->quantity * (float) $k->unit_price; // brüt (liste × miktar) $lineNet = (float) $k->total_price; // net (iskonto sonrası) $lineDisc = max(0, $lineGross - $lineNet); // iskonto tutarı $lineKdv = $lineNet * ((float) $k->kdv_rate / 100); $grandGross += $lineGross; $grandDisc += $lineDisc; $grandSub += $lineNet; $grandKdv += $lineKdv; @endphp @endforeach @endforeach
KOD HİZMET ADI / AÇIKLAMA BİRİM MİKTAR BİRİM FİYAT İSKONTO TOPLAM
{{ $catLabel }}
@if($k->item_code){{ $k->item_code }}@else — @endif {{ $k->item_name }} @if($k->description)
{{ $k->description }}
@endif
{{ $k->unit ?? '—' }} {{ number_format((float)$k->quantity, 2, ',', '.') }} {{ number_format((float)$k->unit_price, 2, ',', '.') }} ₺ @if($lineDisc > 0.005) −{{ number_format($lineDisc, 2, ',', '.') }} ₺
%{{ rtrim(rtrim(number_format($k->discountPercent(), 2, ',', '.'), '0'), ',') }}
@else — @endif
{{ number_format($lineNet, 2, ',', '.') }} ₺
{{-- Toplam --}}
@if($grandDisc > 0.005) @endif
Brüt Ara Toplam: {{ number_format($grandGross, 2, ',', '.') }} ₺
İskonto: −{{ number_format($grandDisc, 2, ',', '.') }} ₺
{{ $grandDisc > 0.005 ? 'Net Ara Toplam' : 'Ara Toplam' }} (KDV Hariç): {{ number_format($grandSub, 2, ',', '.') }} ₺
KDV: {{ number_format($grandKdv, 2, ',', '.') }} ₺
GENEL TOPLAM (KDV Dahil): {{ number_format($grandSub + $grandKdv, 2, ',', '.') }} ₺
@if($siparis->description)
Açıklama:
{{ $siparis->description }}
@endif
Not: Sipariş tutarı KDV hariçtir. Hakediş kesildikçe bu tutardan düşülür; KDV faturalaşma aşamasında işlenir.