@include('layouts.header')
@include('layouts.sidebar')
{{-- Permission Php --}} @php $choosePermission = []; if (auth()->user()->permission) { $decodedPermissions = json_decode(auth()->user()->permission, true); if (json_last_error() === JSON_ERROR_NONE) { $choosePermission = $decodedPermissions; } } @endphp {{-- End Php --}}
@csrf

Expense Report

@php $no = '1'; @endphp @if (!empty($search_expenses)) @foreach ($search_expenses as $expense) @php $no++; @endphp @endforeach @else @foreach ($expenses as $expense) @php $no++; @endphp @endforeach @endif
No. Name Location Category Description Date Amount
{{ $no }} {{ $expense->name }} @foreach ($branchs as $branch) @if ($branch->id == $expense->branch) {{ $branch->name }} @endif @endforeach @foreach ($categorys as $cat) @if ($cat->id == $expense->category) {{ $cat->name }} @endif @endforeach {{ $expense->description }} {{ $expense->created_at->format('d M Y') }} {{ number_format($expense->amount) }}
{{ $no }} {{ $expense->name }} @foreach ($branchs as $branch) @if ($branch->id == $expense->branch) {{ $branch->name }} @endif @endforeach @foreach ($categorys as $cat) @if ($cat->id == $expense->category) {{ $cat->name }} @endif @endforeach {{ $expense->description }} {{ $expense->created_at->format('d M Y') }} {{ number_format($expense->amount) }}
Total @if (!empty($search_expenses)) {{ number_format($search_total) }} @else {{ number_format($total) }} @endif