@php $a4Html = $printBaseUrl . '?layout=a4'; $thermal80Html = $printBaseUrl . '?layout=thermal&paper=80'; $thermal58Html = $printBaseUrl . '?layout=thermal&paper=58'; $a4Pdf = $printBaseUrl . '?format=pdf&layout=a4'; $thermal80Pdf = $printBaseUrl . '?format=pdf&layout=thermal&paper=80'; $thermal58Pdf = $printBaseUrl . '?format=pdf&layout=thermal&paper=58'; @endphp @if(!$isPdf)
تحميل PDF A4 تحميل PDF حراري 80mm تحميل PDF حراري 58mm عرض A4 عرض حراري 80mm عرض حراري 58mm
@endif
@if(!empty($logoUrl)) @endif
{{ $generalBranding['company_name'] ?? $tenantName }}
@if(!empty($generalBranding['company_activity']))
{{ $generalBranding['company_activity'] }}
@endif

{{ $title }}

@if(!empty($generalBranding['phones']))
موبايل: {{ $generalBranding['phones'] }}
@endif @if(!empty($generalBranding['tax_card']))
ب ض: {{ $generalBranding['tax_card'] }}
@endif @if(!empty($generalBranding['cr']))
س ت: {{ $generalBranding['cr'] }}
@endif
اسم العميل: {{ $partyName }}
@if($type === 'sale' || $type === 'sale-return')
رقم التليفون: {{ $customer->phone ?? '' }}
الرقم القومي: {{ $customer->national_id ?? '' }}
رقم السيارة: {{ $record->notes ?? '' }}
@endif
تحريراً في: @if($date instanceof \Carbon\CarbonInterface) {{ $date->format('Y-m-d') }} @else {{ $date }} @endif
رقم المستند: {{ $number }}
الإجمالي
{{ number_format((float) ($totals['total'] ?? 0), 2) }}
المدفوع
{{ number_format((float) ($totals['paid'] ?? 0), 2) }}
المتبقي
{{ number_format((float) ($totals['remaining'] ?? 0), 2) }}
@if(count($items)) @foreach($items as $index => $item) @endforeach
# الصنف الوحدة الكمية السعر الخصم الإجمالي
{{ $index + 1 }} {{ $item['product'] }} {{ $item['unit'] }} {{ number_format((float) $item['quantity'], 2) }} {{ number_format((float) $item['price'], 2) }} {{ number_format((float) $item['discount'], 2) }} {{ number_format((float) $item['total'], 2) }}
@endif @if(isset($previousBalance) && !is_null($previousBalance)) @endif @if(!is_null($totals['subtotal']) && $totals['subtotal'] != $totals['total']) @endif @if(!is_null($totals['discount']) && $totals['discount'] > 0) @endif @if(!is_null($totals['total'])) @endif @if(!is_null($totals['paid'])) @endif @if(isset($previousBalance) && !is_null($previousBalance) && !is_null($totals['remaining'])) @elseif(!is_null($totals['remaining'])) @endif
ما قبله (الرصيد السابق) {{ number_format($previousBalance, 2) }}
الإجمالي قبل الخصم {{ number_format($totals['subtotal'], 2) }}
الخصم {{ number_format($totals['discount'], 2) }}
إجمالي المستند {{ number_format($totals['total'], 2) }}
المدفوع {{ number_format($totals['paid'], 2) }}
الرصيد المتبقي على العميل @php $finalBalance = $previousBalance; if ($type === 'sale') { $finalBalance += $totals['remaining']; } elseif ($type === 'sale-return') { $finalBalance -= $totals['remaining']; } @endphp {{ number_format($finalBalance, 2) }}
المتبقي من المستند {{ number_format($totals['remaining'], 2) }}
@if(filled($notes))
ملاحظات:
{{ $notes }}
@endif @if(!empty($stampUrl) || !empty($signatureUrl))
@if(!empty($stampUrl))
الختم
Stamp
@endif @if(!empty($signatureUrl))
التوقيع
Signature
@endif
@endif
@if(!$isPdf) @endif