@extends('layouts.app') @section('style') @endsection @section('content')

1.adım Hizmet Faturası Yükle

Tamamlanan hizmetler için fatura yükleyin. Sürücüyü seçin, faturaya eklenecek işleri işaretleyin, tutarı ve kilometreyi girin ve dosyayı gönderin.

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if($tab === 'send')
@if($pendingJobs->isEmpty())

Gönderilecek tamamlanmış iş bulunamadı.

@else
@csrf
3- Faturaya İşlenecek Hizmetleri Seçin ({{ $pendingJobs->count() }})
@foreach($pendingJobs as $job) @php $code = $job->id . (!empty($job->dijialfa_id) ? '-' . $job->dijialfa_id : ''); $plate = $job->dijialfa_musteri_plaka ?? null; $label = $plate ? ($code . '/' . $plate) : $code; @endphp @endforeach
4 - Fatura Tutarı Giriniz
5 - Kilometre (KM) Giriniz
6 - Fatura Görsel/Dosyaları Seçiniz (PDF /Görsel)
Birden fazla dosya seçebilirsiniz. Max 10 MB / dosya.
7 - Açıklama (Opsiyonel)
@endif
@else
@if($invoices->isEmpty())

Henüz fatura kaydı yok.

@else
@foreach($invoices as $invoice) @php $st = strtolower((string)($invoice->status ?? 'waiting')); $badge = $st === 'approved' ? 'badge-approved' : ($st === 'rejected' || $st === 'failed' ? 'badge-rejected' : 'badge-waiting'); $label = $st === 'approved' ? 'Onaylandı' : ($st === 'rejected' || $st === 'failed' ? 'Reddedildi' : 'Bekliyor'); $urls = $invoice->invoice_url; @endphp @endforeach
# Sürücü İş(ler) Tutar KM Dosyalar Durum Tarih
{{ $invoice->id }} @if($invoice->driver) {{ $invoice->driver->prenom }} {{ $invoice->driver->nom }} @else #{{ $invoice->driver_id }} @endif {{ $invoice->getAttributes()['requite_id'] ?? '' }} {{ number_format((float)$invoice->amount, 2, ',', '.') }} ₺ @if($invoice->km !== null && $invoice->km !== '') {{ rtrim(rtrim(number_format((float) $invoice->km, 2, ',', '.'), '0'), ',') }} km @else — @endif
@foreach($urls as $url) @if(\App\Models\DriverInvoice::isImageUrl($url)) Fatura @elseif(\App\Models\DriverInvoice::extensionFromUrl($url) === 'pdf') @else @endif @endforeach
{{ $label }} {{ $invoice->insert_date ?? $invoice->created_at }} Detay
{{ $invoices->links() }}
@endif
@endif
@endsection @section('scripts') @endsection