@extends('layouts.mobile.app') @section('content') @php // Calculate Date Filter Variables $filter_dari = request('dari') ?: date('Y-m-01'); $filter_sampai = request('sampai') ?: date('Y-m-t'); $prev_dari = date('Y-m-01', strtotime('-1 month', strtotime($filter_dari))); $prev_sampai = date('Y-m-t', strtotime('-1 month', strtotime($filter_dari))); $next_dari = date('Y-m-01', strtotime('+1 month', strtotime($filter_dari))); $next_sampai = date('Y-m-t', strtotime('+1 month', strtotime($filter_dari))); $tgl_dari_text = date('d', strtotime($filter_dari)); $tgl_sampai_text = date('d', strtotime($filter_sampai)); // Translate month manually $eng_months = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); $idn_months = array('Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des'); $bln_text = str_replace($eng_months, $idn_months, date('M Y', strtotime($filter_dari))); $display_text = "$tgl_dari_text sd $tgl_sampai_text $bln_text"; // Calculate total reimbursement for this period as display $user_nik = auth()->user()->karyawan->nik ?? (auth()->user()->userkaryawan->nik ?? ''); $total_amount_period = \App\Models\Reimbursement::where('nik', $user_nik) ->whereBetween('tanggal_pengajuan', [$filter_dari, $filter_sampai]) ->where('status', '!=', 'R') // Exclude rejected ->sum('total_nominal'); @endphp
Belum ada pengajuan reimbursement.