@extends('layouts.app') @section('title') Dashboard @endsection @section('admin-content')

Forms Entertainment & Presentation

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

List Data Forms Entertainment & Presentation

@if (auth()->user()->can('forms.entertainment.create')) Add New Expense Entertainment & Presentation @endif

@include('backend.layouts.partials.messages')
@if (auth()->user()->can('approval.approve')) @endif @if (auth()->user()->can('final_approval.approve')) @endif @php use App\Helpers\NextCloudHelper; $role = auth()->user()->getRoleNames()[0]; @endphp @foreach ($forms as $item) @if (auth()->user()->can('approval.approve')) @endif @if(auth()->user()->can('final_approval.approve')) @endif @endforeach
# User Nama Penerima Tanggal Jenis Keterangan Total Total Approved Bukti Account Number StatusApprovalFinal ApprovalAksi
{{ $loop->iteration }} {{ $item->user->name }} {{ $item->name }} {{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('D MMMM Y') }} {{ $item->jenis }} {{ $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' || $item->status == 'Final Approved') {{ $item->status }} @else {{ $item->status }} @endif {{-- approve / reject button --}} @if ($item->status == 'On Progress')
@csrf @method('PUT')
@else @if ($item->approved_at) {{ \Carbon\Carbon::parse($item->approved_at)->locale('id')->isoFormat('D MMMM Y') }} @elseif($item->rejected_at) {{ \Carbon\Carbon::parse($item->rejected_at)->locale('id')->isoFormat('D MMMM Y') }} @else - @endif @endif
{{-- approve / reject button --}} @if ($item->status == 'Approved' && $item->approved_at && !$item->final_approved_at)
@csrf @method('PUT')
@else @if ($item->final_approved_at && auth()->user()->can('final_approval.open'))
@csrf @method('PUT')
@elseif ($item->final_approved_at) {{ \Carbon\Carbon::parse($item->approved_at)->locale('id')->isoFormat('D MMMM Y') }} @else - @endif @endif
@if (auth()->user()->can('forms.entertainment.view')) @endif @if (($role != 'Medical Representatif' && auth()->user()->can('forms.entertainment.edit')) || ($role == 'Medical Representatif' && $item->status == 'On Progress')) @endif @if (($role != 'Medical Representatif' && auth()->user()->can('forms.entertainment.delete')) || ($role == 'Medical Representatif' && $item->status == 'On Progress'))
@csrf @method('DELETE')
@endif
@endsection @section('scripts') @endsection