@include('includes/header') @include('includes/sidebar')

Employee Expense Request Report

@if (\Session::has('success')) @endif @if (\Session::has('error')) @endif
@foreach ($expenseTypes as $type) @endforeach @if(count($expenseReport) > 0) @foreach ($expenseReport as $date => $entries) @php $dailyTotal = 0; $pendingTotal = 0; $approvedTotal = 0; $rejectedTotal = 0; @endphp @foreach ($entries as $index => $entry) @if ($index == 0) @endif @foreach ($expenseTypes as $type) @endforeach @endforeach @endforeach @foreach ($expenseTypes as $type) @endforeach @else @endif
For Date Description Request On Action{{ $type }}Total
{{ $date }}{{ $entry['remark'] }} {{ $entry['created_at'] }} @if ($entry['status'] == 2) Status: Approved
Approved By: {{ $entry['approved_by'] }}
Approved On: {{ $entry['approved_on'] }} @php $approvedTotal += $entry['amount']; @endphp @elseif ($entry['status'] == 1) Status: Rejected
Rejected By: {{ $entry['rejected_by'] }}
Rejected ON: {{ $entry['rejected_on'] }}
Reason: {{$entry['reject_reason']}} @php $rejectedTotal += $entry['amount']; @endphp @else Status: Pending @php $pendingTotal += $entry['amount']; @endphp @endif
@if ($entry['expense_type'] == $type) {{ '₹ ' . $entry['amount'] }}
{{-- dev --}} @if ($entry['status'] == 2) Approved {{ '₹ ' . $entry['amount'] }} @elseif ($entry['status'] == 1) Rejected {{ '₹ ' . $entry['amount'] }} @else Pending {{ '₹ ' . $entry['amount'] }} @endif @php $dailyTotal += $entry['amount']; @endphp @endif
Pending: {{ '₹ ' . $pendingTotal }}
Approved: {{ '₹ ' . $approvedTotal }}
Rejected: {{ '₹ ' . $rejectedTotal }}
Total: {{ '₹ ' . $dailyTotal }}
Total:₹ {{ $totalApprovedByType[$type] ?? 0 }} Total Pending: {{ '₹ ' . $total_pending }}
Total Approved: {{ '₹ ' . $total_approved }}
Total Rejected: {{ '₹ ' . $total_rejected }}
Total: {{ '₹ ' . $total }}
No Data Found!
{{-- {{$data->render('custom_pagination')}} --}}
@include('includes/footer')