@if ($filter_from_date && $filter_to_date)
| {{ __('SL') }}. | @if (auth()->user()->accessToMultiBranch()){{ __('Branch') }} | @endif{{ __('Category') }} | {{ __('Expense For') }} | {{ __('Payment Type') }} | {{ __('Reference Number') }} | {{ __('Expense Date') }} | {{ __('Amount') }} |
|---|---|---|---|---|---|---|---|
| {{ ($expense_reports->currentPage() - 1) * $expense_reports->perPage() + $loop->iteration }} | @if (auth()->user()->accessToMultiBranch()){{ $expense_report->branch->name ?? '' }} | @endif{{ $expense_report->category->categoryName }} | {{ $expense_report->expanseFor }} | @if ($expense_report->transactions && $expense_report->transactions->isNotEmpty()) {{ $expense_report->transactions->map(function($transaction) { if ($transaction->transaction_type === 'bank_payment' && !empty($transaction->paymentType?->name)) { return $transaction->paymentType->name; } return $transaction->transaction_type ? ucfirst(explode('_', $transaction->transaction_type)[0]) : ''; })->unique()->implode(', ') }} @elseif ($expense_report->payment_type_id) {{ $expense_report->payment_type?->name }} @else {{ $expense_report->paymentType }} @endif | {{ $expense_report->referenceNo }} | {{ formatted_date($expense_report->expenseDate) }} | {{ currency_format($expense_report->amount, currency: business_currency()) }} |
| {{ __('Total') }} | @if (auth()->user()->accessToMultiBranch())@endif | {{ currency_format($expense_reports->sum('amount'), currency: business_currency()) }} |