@php // مرفقات كل السندات المعروضة في الصفحة (استعلام واحد) حتى يظهر المرفق في كل أسطر السند $pageVouchers = (isset($data) && count($data) > 0) ? collect(method_exists($data, 'items') ? $data->items() : $data)->pluck('sent_abd_count')->filter()->unique()->values() : collect(); $voucherAttachments = $pageVouchers->isEmpty() ? collect() : App\Models\credittransactions::whereIn('sent_abd_count', $pageVouchers) ->whereNotNull('attachments')->where('attachments', '!=', '') ->get(['sent_abd_count', 'attachments']) ->groupBy('sent_abd_count') ->map(fn ($rows) => $rows->pluck('attachments')->unique()->values()); @endphp
@if(isset($data) && count($data) > 0) @foreach ($data as $index => $invoice) @endforeach @else @endif
{{ __('home.decoumentNo') }} {{ __('home.exportTime') }} {{ __('home.employee') }} {{ __('home.acount_name') }} {{ __('accountes.Theamountpaid') }} {{ __('home.paymentmethod') }} {{ __('home.operations') }}
{{ $invoice->sent_abd_count }} {{ $invoice->date_export ?: ($invoice->created_at ? (is_string($invoice->created_at) ? substr($invoice->created_at, 0, 10) : $invoice->created_at->format('Y-m-d')) : '-') }} {{ $invoice->user->name ?? '-' }} {{ $invoice->financial_accounts_data->name ?? '-' }} {{ $invoice->recive_amount }} @if ($invoice->type == 'Cash') {{ __('report.cash') }} @elseif ($invoice->type == 'Bank_transfer') {{ __('home.Bank_transfer') }} @else {{ __('report.shabka') }} @endif
{{-- زر التعديل --}} {{-- زر تحميل PDF (أيقونة فقط) --}} {{-- زر تحميل PDF (باستخدام الكلاس المتوافق مع FontAwesome القديم) --}} {{-- زر الحذف --}} {{-- زر الطباعة --}}
@csrf
{{-- المرفقات (كل مرفقات السند) --}} @php $rowFiles = $invoice->sent_abd_count ? $voucherAttachments->get($invoice->sent_abd_count, collect()) : collect(); if ($invoice->attachments && !$rowFiles->contains($invoice->attachments)) { $rowFiles = $rowFiles->concat([$invoice->attachments]); } @endphp @if($rowFiles->isNotEmpty()) @foreach ($rowFiles as $file) @endforeach @else {{ __('home.no_attachments') ?? 'لا يوجد' }} @endif
{{ __('home.no_data_found') }}
@if(isset($data) && method_exists($data, 'links')) @endif