@extends('layouts.app') @section('title') Dashboard @endsection @section('admin-content') @php $outstandingIdCollection = collect($outstandingIds ?? []); @endphp

Forms Others

Rp {{ number_format($forms->sum('total'), 0, ',', '.') }}

Total Expense

Rp {{ number_format($forms->whereIn('status', ['Approved', 'Closed'])->sum('approved_total'), 0, ',', '.') }}

Approved Expenses

Rp {{ number_format($forms->where('status', 'On Progress')->sum('total'), 0, ',', '.') }}

Pending Expenses

{{ $outstandingCount }}

Outstanding Expenses

Total Rp {{ number_format($outstandingTotal, 0, ',', '.') }}

Klik untuk menampilkan detail

@if($availableBudget > 0)

Rp {{ number_format($availableBudget, 0, ',', '.') }}

Available Budget

@endif

List Data Forms Others Anda

@if (auth()->user()->can('forms.other.create')) Add New Expense Others @endif

@include('backend.layouts.partials.messages')
@if (auth()->user()->can('approval.view')) @endif @if (auth()->user()->can('approval2.view')) @endif @if (auth()->user()->can('final_approval.view')) @endif @php use App\Helpers\NextCloudHelper; $role = auth()->user()->getRoleNames()[0]; @endphp @foreach ($forms as $item) @if (auth()->user()->can('approval.view')) @endif @if (auth()->user()->can('approval2.view')) @endif @if(auth()->user()->can('final_approval.view')) @endif @endforeach
# No Expense Nama Cabang Tanggal Jenis Keterangan Total Total Approved Bukti Total Account Number StatusApproval 1Approval 2Final ApprovalAksi
{{ $loop->iteration }} {{ $item->expense_number }} {{ $item->user->name }} {{ $item->user->cabang->cabang->name }} {{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }} {{ $item->kategori->name }} {{ $item->keterangan }} {{ number_format($item->total, 0, ',', '.') }} {{ number_format($item->approved_total, 0, ',', '.') }} @if ($item->bukti_total) Download @else - @endif {{ $item->account_number }} @if ($item->status == 'On Progress') {{ $item->status }} @elseif ($item->status == 'Approved 1' || $item->status == 'Approved 2' || $item->status == 'Final Approved') {{ $item->status }} @else {{ $item->status }} @endif {{-- approve / reject button --}} @if (auth()->user()->can('approval.approve')) @if ($item->status == 'On Progress')
@endif @endif @if ($item->approved_at) {{ \Carbon\Carbon::parse($item->approved_at)->locale('id')->isoFormat('D MMMM Y HH:mm') }} @endif
{{-- approve / reject button --}} @if (auth()->user()->can('approval2.approve')) @if ($item->status == 'Approved 1' && $item->approved_at)
@endif @endif @if ($item->approved2_at) {{ \Carbon\Carbon::parse($item->approved2_at)->locale('id')->isoFormat('D MMMM Y HH:mm') }} @endif
{{-- approve / reject button --}} @if(auth()->user()->can('final_approval.approve')) @if ($item->status == 'Approved 2' && $item->approved2_at && !$item->final_approved_at)
@else @if ($item->final_approved_at && auth()->user()->can('final_approval.open'))
@csrf @method('PUT')
@endif @endif @endif @if ($item->final_approved_at) {{ \Carbon\Carbon::parse($item->final_approved_at)->locale('id')->isoFormat('D MMMM Y HH:mm') }} @endif
@if (auth()->user()->can('forms.other.view')) @endif @php $canEdit = false; if (auth()->user()->can('forms.other.edit')) { if (in_array($role, ['Medical Representatif', 'Area Manager Cabang'])) { $canEdit = $item->status == 'On Progress'; } else { $canEdit = true; } } @endphp @if ($canEdit) @endif @if (($role != 'Medical Representatif' && auth()->user()->can('forms.other.delete')) || ($role == 'Medical Representatif' && $item->status == 'On Progress'))
@csrf @method('DELETE')
@endif
@endsection @section('scripts') @endsection