@if (isset($data) && !empty($data) && count($data) > 0) @php $pageVouchers = collect(method_exists($data, 'items') ? $data->items() : $data)->pluck('sent_serf_count')->filter()->unique()->values(); $voucherAttachments = App\Models\credittransactions::whereIn('sent_serf_count', $pageVouchers) ->whereNotNull('attachments')->where('attachments', '!=', '') ->get(['sent_serf_count', 'attachments'])->groupBy('sent_serf_count') ->map(fn ($rows) => $rows->pluck('attachments')->unique()->values()); @endphp
@foreach ($data as $invoice) {{-- رقم المستند --}} {{-- وقت الإنشاء وتاريخ التصدير --}} {{-- الموظف والحساب --}} {{-- المبلغ --}} {{-- طريقة الدفع --}} {{-- المرفقات --}} {{-- العمليات --}} @endforeach
{{ __('home.decoumentNo') }} {{ __('home.exportTime') }} {{ __('report.date') }} {{ __('home.employee') }} {{ __('home.acount_name') }} {{ __('accountes.Theamountpaid') }} {{ __('home.paymentmethod') }} {{ __('home.Attachment') }} {{ __('home.operations') }}
{{ $invoice->sent_serf_count }}{{ $invoice->created_at->format('Y-m-d H:i') }} {{ $invoice->date_export }}{{ $invoice->user->name ?? '---' }} {{ $invoice->financial_accounts_data->name ?? '---' }}{{ number_format($invoice->recive_amount, 2) }} @if ($invoice->Pay_Method_Name == 'Cash') {{ __('report.cash') }} @elseif ($invoice->Pay_Method_Name == 'Bank_transfer') {{ __('home.Bank_transfer') }} @else {{ __('report.shabka') }} @endif @php $rowFiles = $invoice->sent_serf_count ? $voucherAttachments->get($invoice->sent_serf_count, collect()) : collect(); if ($invoice->attachments && !$rowFiles->contains($invoice->attachments)) $rowFiles = $rowFiles->concat([$invoice->attachments]); @endphp @forelse ($rowFiles as $file) @empty - @endforelse
{{-- زر التعديل (تم ربط data attributes بالموديل بدقة) --}} {{-- زر الحذف --}} {{-- زر الطباعة --}}
@csrf
{{-- الترقيم --}} @else
{{ __('home.notfounddata') }}
@endif