{{-- NEW --}} @foreach ($items as $key => $item) @php $hasAttachment = !empty($item->attachment); $fileUrl = $hasAttachment ? asset('expense/' . $item->attachment) : null; $ext = $hasAttachment ? strtolower(pathinfo($item->attachment, PATHINFO_EXTENSION)) : null; @endphp {{-- NEW: Attachment cell --}} @endforeach
@lang('SL') @lang('Date') @lang('Type') @lang('Account') @lang('Voucher No') @lang('Remark') @lang('Amount') @lang('Created By') @lang('Created Date') @lang('Modify By') @lang('Modify Date') @lang('Attachment')@lang('Actions')
{{ ($items->currentpage() - 1) * $items->perpage() + $key + 1 }} {{ dateformat($item->date) }} {{ $item->type_name }} {{ $item->account_name }} {{ $item->vouche_no }} {{ $item->remark }} {{ numberFormat($item->amount) }} {{ $item->created_user }} {{ $item->created_date }} {{ $item->updated_user }} {{ $item->updated_date }} @if ($hasAttachment) @lang('View') @else @endif
@if ($items instanceof \Illuminate\Pagination\LengthAwarePaginator) {{ $items->links('layouts.paginate') }} @endif {{-- Reusable Attachment Modal --}} @push('script') @endpush