@php $pageVouchers = isset($data) ? collect(method_exists($data, 'items') ? $data->items() : $data)->pluck('sent_abd_count')->filter()->unique()->values() : collect(); $voucherAttachments = 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.Attachment') }} {{ __('home.operations') }}
{{ $invoice->sent_abd_count }} {{ $invoice->created_at }} {{ $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 @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 @forelse ($rowFiles as $file) @empty {{ __('home.no_attachments') ?? 'لا يوجد' }} @endforelse
{{-- زر التعديل --}} {{-- زر تحميل PDF (أيقونة فقط) --}} {{-- زر تحميل PDF (باستخدام الكلاس المتوافق مع FontAwesome القديم) --}} {{-- زر الحذف --}} {{-- زر الطباعة --}}
@csrf
{{ __('home.no_data_found') }}