@php $en = ($lang ?? 'tr') === 'en'; $accent = $branding->primary_color ?: '#4F46E5'; $officeName = $branding->office_name ?: $tenant->name; $t = fn ($tr, $enText) => $en ? $enText : $tr; $fmt = function ($amount) use ($statement) { $symbols = ['TRY' => '₺', 'USD' => '$', 'EUR' => '€', 'GBP' => '£']; $symbol = $symbols[$statement->currency] ?? $statement->currency; return $symbol . number_format((float) $amount, 2, ',', '.'); }; $dur = function ($minutes) use ($en) { $h = intdiv($minutes, 60); $m = $minutes % 60; if ($h === 0) return $m . ($en ? 'm' : 'dk'); if ($m === 0) return $h . ($en ? 'h' : 'sa'); return $h . ($en ? 'h ' : 'sa ') . $m . ($en ? 'm' : 'dk'); }; @endphp
@php // Kalemler dosyaya göre gruplanır; dönem ve toplam süre üst blokta yazılır. $groups = $statement->items->groupBy(fn ($i) => $i->timelog?->case_id ?? 0); $dates = $statement->items->map(fn ($i) => $i->timelog?->date)->filter()->sort()->values(); $totalMinutes = (int) $statement->items->sum('quantity_minutes'); @endphp|
@if ($logoData)
{{ $officeName }}
@if ($branding->address){!! nl2br(e($branding->address)) !!} @endif
@if ($branding->phone){{ $branding->phone }} @endif
@if ($branding->email){{ $branding->email }} @endif
@if ($branding->website){{ $branding->website }} @endif
|
{{ $t('HİZMET DÖKÜMÜ', 'STATEMENT OF SERVICES') }}
|
| {{ $t('Açıklama', 'Description') }} | {{ $t('Süre', 'Time') }} | {{ $t('Birim Ücret', 'Rate') }} | {{ $t('Tutar', 'Amount') }} |
|---|---|---|---|
| {{ $case?->title ?? $t('Dosya dışı', 'Not case related') }} @if ($case?->case_no)· {{ $case->case_no }}@endif | |||
|
{{ $en ? ($item->description_en ?: $item->description) : $item->description }}
@if ($item->covered_minutes > 0)
{{ $dur($item->covered_minutes) }}
{{ $t('ön ödemeli kota kapsamında', 'covered by prepaid retainer') }}
@endif
@if ($item->is_waived)
{{ $t('Ücretlendirilmedi', 'Not charged') }}
@endif
|
{{ $item->quantity_minutes > 0 ? $dur($item->quantity_minutes) : '—' }} | {{ $item->kind === 'time' && $item->unit_rate > 0 ? $fmt($item->unit_rate) : '—' }} | {{ $fmt($item->line_total) }} |
| {{ $t('Dosya toplamı', 'Case subtotal') }} | {{ $dur($items->sum('quantity_minutes')) }} | {{ $fmt($items->sum('line_total')) }} | |
| {{ $t('Ara Toplam', 'Subtotal') }} | {{ $fmt($statement->subtotal) }} |
| {{ $t('İskonto', 'Discount') }} @if ($statement->discount_type === 'percent') @php // Yüzde işareti Türkçede önce (%10), İngilizcede sonra (10%) yazılır. $pct = rtrim(rtrim(number_format((float) $statement->discount_value, 2, ',', '.'), '0'), ','); @endphp ({{ $en ? $pct.'%' : '%'.$pct }}) @endif | -{{ $fmt($statement->discount_amount) }} |
| {{ $t('Genel Toplam', 'Total') }} | {{ $fmt($statement->total) }} |
| {{ $t('Tahsil Edilen', 'Amount Paid') }} | -{{ $fmt($paid) }} |
| {{ $t('Kalan Bakiye', 'Balance Due') }} | {{ $fmt($statement->remainingAmount()) }} |