@php $currencySymbol = app('current_company')->currency?->symbol ?? 'TL'; $publicLink = route('customers.public-statement', ['company_uuid' => app('current_company')->uuid, 'customer_uuid' => $customer->uuid]); $whatsappText = "*Sayın {$customer->first_name} {$customer->last_name}*,\n\n" . "Firmamız nezdindeki güncel cari hesap özetiniz aşağıda bilgilerinize sunulmuştur:\n\n" . "*Toplam Sipariş Tutarı:* " . number_format($totalOrders, 2, ',', '.') . " {$currencySymbol}\n" . "*Toplam Tahsil Edilen:* " . number_format($totalPaid, 2, ',', '.') . " {$currencySymbol}\n" . "*Kalan Bakiye:* " . number_format($totalBalance, 2, ',', '.') . " {$currencySymbol}\n\n" . "Detaylı ekstre dökümünüzü online incelemek için linke tıklayabilirsiniz:\n" . "{$publicLink}\n\n" . "*".app('current_company')->name."*"; $cleanPhone = preg_replace('/[^0-9]/', '', $customer->phone); if (strlen($cleanPhone) === 10 && str_starts_with($cleanPhone, '5')) { $cleanPhone = '90' . $cleanPhone; } $whatsappUrl = "https://api.whatsapp.com/send?phone=" . $cleanPhone . "&text=" . rawurlencode($whatsappText); @endphp Cari Hesap Durumu - {{ $customer->first_name }} {{ $customer->last_name }}
Cari Hesap Durumu Çıktısı
@if(!empty($customer->phone)) @endif @if(!empty($customer->email)) @endif
@if(app('current_company')->logo_light) Logo @else {{ app('current_company')->name }} @endif
{{ app('current_company')->address }} Tel: {{ app('current_company')->phone ?? '-' }} | E-posta: {{ app('current_company')->email ?? '-' }}
CARİ HESAP EKSTRESİ
Tarih: {{ now()->translatedFormat('d F Y H:i') }}
Müşteri Bilgileri
{{ $customer->first_name }} {{ $customer->last_name }}
Müşteri Kodu: {{ $customer->customer_code }}
Telefon: {{ $customer->phone }}
@if($customer->email)
E-posta: {{ $customer->email }}
@endif
Adres
{{ $customer->address ?: 'Adres belirtilmemiş.' }}
Toplam Sipariş Tutarı @moneyWithCurrency($totalOrders, app('current_company')->currency)
Toplam Tahsil Edilen @moneyWithCurrency($totalPaid, app('current_company')->currency)
Kalan Toplam Bakiye @moneyWithCurrency($totalBalance, app('current_company')->currency)

Sipariş Geçmişi

@forelse($customer->orders as $order) @php $statusClasses = [ 'draft' => 'badge-secondary', 'active' => 'badge-warning', 'completed' => 'badge-success', 'cancelled' => 'badge-danger', 'delivered' => 'badge-success', 'Draft' => 'badge-secondary', 'In Production' => 'badge-warning', 'Ready for Trial' => 'badge-warning', 'Completed' => 'badge-success', 'Delivered' => 'badge-success', ]; $statusLabels = [ 'draft' => __('orders.status_draft'), 'active' => __('orders.status_active'), 'completed' => __('orders.status_completed'), 'cancelled' => __('orders.status_cancelled'), 'delivered' => __('orders.status_delivered'), 'Draft' => __('orders.status_draft'), 'In Production' => __('orders.status_in_production'), 'Ready for Trial' => __('orders.status_ready_for_trial'), 'Completed' => __('orders.status_completed'), 'Delivered' => __('orders.status_delivered'), ]; $class = $statusClasses[$order->status] ?? 'badge-secondary'; @endphp @empty @endforelse
Sipariş No Sipariş Tarihi Durum Sipariş Tutarı Alınan Kapora Kalan Bakiye
{{ $order->order_number }} {{ $order->order_date->format('d.m.Y') }} {{ $statusLabels[$order->status] ?? $order->status }} @moneyWithCurrency($order->total_price, $order->currency) @moneyWithCurrency($order->advance_payment, $order->currency) @moneyWithCurrency($order->balance, $order->currency)
Kayıtlı sipariş bulunamadı.

Faturalar ve Tahsilat Geçmişi

@forelse($customer->invoices as $invoice) @php $statusClasses = [ 'unpaid' => 'badge-danger', 'partial' => 'badge-warning', 'paid' => 'badge-success', ]; $class = $statusClasses[$invoice->status] ?? 'badge-secondary'; @endphp @empty @endforelse
Fatura No Fatura Tarihi Fatura Durumu Fatura Tutarı Ödenen Tutar Kalan Tutar
{{ $invoice->invoice_number }} {{ $invoice->invoice_date->format('d.m.Y') }} {{ __('invoices.status_' . $invoice->status) }} @moneyWithCurrency($invoice->total_amount, $invoice->currency) @moneyWithCurrency($invoice->paid_amount, $invoice->currency) @moneyWithCurrency($invoice->due_amount, $invoice->currency)
Kayıtlı fatura bulunamadı.