@php $role = auth()->check() ? (auth()->user()->role ?? 'user') : 'guest'; $canDelete = in_array($role, ['admin','super'], true); @endphp
@if(session('error'))
{{ session('error') }}
@endif @if(session('ok'))
{{ session('ok') }}
@endif
{{-- ✅ مسح يحافظ على الفرع --}} مسح CSV
الإجمالي قبل الضريبة
{{ number_format($totals->subtotal ?? 0, 2) }}
قيمة الضريبة
{{ number_format($totals->vat_amount ?? 0, 2) }}
الإجمالي شامل
{{ number_format($totals->total ?? 0, 2) }}
{{-- ✅ نموذج الحذف --}} @if($canDelete)
@csrf
@endif
@if($canDelete) @endif @foreach($rows as $r) @if($canDelete) @endif @endforeach @if(count($rows) === 0) @endif
ID الفرع رقم داخل الفرع رقم الفاتورة التاريخ المصروف قبل الضريبة الضريبة الإجمالي ملاحظات
{{ $r->id }} {{ $r->branch_no }} - {{ $r->branch_name }} {{ $r->inv_no_branch }} {{ $r->bill_no }} {{ $r->bill_date ?: '-' }} {{ $r->subcategory_name ?: '-' }} {{ number_format($r->subtotal, 2) }} {{ number_format($r->vat_amount, 2) }} {{ number_format($r->total, 2) }} {{ $r->notes ?: '' }}
لا توجد بيانات