@php $sqStatusLabels = [ 'bekliyor' => ['Bekliyor', '#fef3c7', '#92400e', '#fcd34d'], 'kabul' => ['Kabul Edildi', '#d1fae5', '#065f46', '#6ee7b7'], 'red' => ['Reddedildi', '#fee2e2', '#991b1b', '#fca5a5'], 'iptal' => ['İptal', '#f1f5f9', '#475569', '#cbd5e1'], ]; [$sqStLabel, $sqStBg, $sqStColor, $sqStBorder] = $sqStatusLabels[$subQuote->status] ?? [$subQuote->status ?? '—', '#f1f5f9', '#475569', '#cbd5e1']; // Brüt ara toplam (iskontosuz) — iskonto kalemlere dağıtıldı, gerçek iskonto kalemlerden gelir $sqItemsSubtotal = $subQuote->grossSubtotal(); // brüt $sqGlobalDiscount = $subQuote->globalDiscountAmount(); // brüt - net $sqNet = $subQuote->itemsSubtotal(); // net = items.total_price toplamı @endphp
{{-- Header --}}
@if($firmaLogoBase64) @endif
{{ $firmaSettings['firma_kisa_adi'] ?: $firmaSettings['firma_adi'] }}
@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
TAŞERON TEKLİFİ
{{ Str::limit($proposal->title, 50) }}
{{ $proposal->proposal_number }}
{{ ($subQuote->updated_at ?? $subQuote->created_at)->format('d.m.Y') }}
{{-- Watermark --}}
🛠️
TAŞERON TEKLİFİ — DAHİLİ KAYIT Bu belge yalnızca firma içi kullanım ve ilgili taşeronla iletişim içindir. Müşteriye gönderilmez.
{{-- Hero kartlar --}}
{{-- Tedarikçi --}}
Tedarikçi
{{ $subQuote->contact?->display_name ?? $subQuote->contact?->name ?? '—' }}
@if($subQuote->contact?->phone)
📞 {{ $subQuote->contact->phone }}
@endif @if($subQuote->contact?->email)
✉️ {{ $subQuote->contact->email }}
@endif
{{-- İlgili teklif --}}
İlgili Ana Teklif
{{ $proposal->title ?: '—' }}
{{ $proposal->proposal_number }} · Müşteri: {{ $proposal->contact?->display_name ?? $proposal->contact?->name ?? '—' }}
{{-- Tutar --}}
Toplam
{{ $sqNet > 0 ? number_format($sqNet, 2, ',', '.') : '—' }}@if($sqNet > 0)₺@endif
{{-- Durum --}}
Durum
{{ $sqStLabel }}
{{-- Hizmet kalemleri --}} @if($subQuote->items->isNotEmpty())
≡
Tedarikçi Hizmet Kalemleri
Bu teklif kapsamındaki iş kalemleri
{{ $subQuote->items->count() }} kalem
@foreach($subQuote->items as $sqi) @endforeach
Kod Hizmet Adı / Açıklama Birim Miktar Birim Fiyat Toplam
@if($sqi->serviceItem){{ $sqi->serviceItem->code }}@else —@endif
{{ $sqi->serviceItem?->name ?? $sqi->description ?? 'Kalem' }}
@if($sqi->description && $sqi->serviceItem)
{{ $sqi->description }}
@endif
{{ $sqi->unit ?? '—' }} {{ number_format((float)$sqi->quantity, 2, ',', '.') }} {{ number_format((float)$sqi->unit_price, 2, ',', '.') }} ₺ {{ number_format((float)$sqi->total_price, 2, ',', '.') }} ₺
@endif {{-- Toplam --}}
@if($sqGlobalDiscount > 0) @endif
Ara Toplam{{ number_format($sqItemsSubtotal, 2, ',', '.') }} ₺
İskonto (-%{{ number_format($subQuote->global_discount_percentage, 2, ',', '.') }}) −{{ number_format($sqGlobalDiscount, 2, ',', '.') }}
NET TOPLAM{{ number_format($sqNet, 2, ',', '.') }} ₺
{{-- Ödeme planı --}} @if(($subQuote->paymentItems ?? collect())->isNotEmpty())
💳 Ödeme Planı
@foreach($subQuote->paymentItems as $pp)
{{ method_exists($pp, 'phaseLabel') ? $pp->phaseLabel() : ($pp->phase ?? '—') }}
{{ $pp->description }}
%{{ number_format((float)($pp->percentage ?? 0), 1, ',', '.') }}
@endforeach
@endif {{-- Sorumluluklar --}} @if(($subQuote->sqResponsibilities ?? collect())->isNotEmpty())
👥 Sorumluluklar
@foreach($subQuote->sqResponsibilities as $resp) @php $respByLabel = match($resp->responsible_party ?? null) { 'firma' => ['Firma', '#047857', '#d1fae5'], 'taseron' => ['Tedarikçi', '#b45309', '#fef3c7'], 'musteri' => ['Müşteri', '#1d4ed8', '#dbeafe'], default => [$resp->responsible_party ?? '—', '#64748b', '#f1f5f9'], }; @endphp
{{ $resp->description }}
{{ $respByLabel[0] }}
@endforeach
@endif {{-- Notlar --}} @if(!empty($subQuote->note))
📝 Notlar
{{ $subQuote->note }}
@endif {{-- Footer --}}