Penambahn P1 Dev
This commit is contained in:
@@ -192,13 +192,17 @@ class PaguController extends Controller
|
||||
return '?';
|
||||
}
|
||||
|
||||
return 'Rp '.number_format($row->pagu, 0, ',', '.');
|
||||
return 'Rp. '.number_format($row->pagu, 0, ',', '.');
|
||||
})
|
||||
->editColumn('pagu_smt1', function ($row) {
|
||||
return 'Rp '.number_format($row->pagu_smt1 ?? 0, 0, ',', '.');
|
||||
->editColumn('pagu_smt1', function ($row) use ($showQuestionMark) {
|
||||
if ($showQuestionMark) {
|
||||
return '?';
|
||||
}
|
||||
|
||||
return 'Rp. '.number_format($row->pagu_smt1 ?? 0, 0, ',', '.');
|
||||
})
|
||||
->editColumn('pagu_smt2', function ($row) {
|
||||
return 'Rp '.number_format($row->pagu_smt2 ?? 0, 0, ',', '.');
|
||||
return 'Rp. '.number_format($row->pagu_smt2 ?? 0, 0, ',', '.');
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
|
||||
@@ -192,15 +192,17 @@ class P1Controller extends Controller
|
||||
$previousYear = $bulan === 1 ? $tahun - 1 : $tahun;
|
||||
$jenisPegawai = $request->input('jenis_pegawai');
|
||||
$arah = $request->input('arah', '');
|
||||
$includePppk2025 = $request->boolean('include_pppk_2025');
|
||||
$monthNames = [
|
||||
1 => 'Januari', 2 => 'Februari', 3 => 'Maret', 4 => 'April', 5 => 'Mei', 6 => 'Juni',
|
||||
7 => 'Juli', 8 => 'Agustus', 9 => 'September', 10 => 'Oktober', 11 => 'November', 12 => 'Desember',
|
||||
];
|
||||
|
||||
$baseQuery = function (int $queryYear, int $queryMonth) use ($unit, $jenisPegawai) {
|
||||
$baseQuery = function (int $queryYear, int $queryMonth) use ($unit, $jenisPegawai, $includePppk2025) {
|
||||
return P1::query()
|
||||
->where('tahun', $queryYear)
|
||||
->where('bulan', $queryMonth)
|
||||
->when(! $includePppk2025, fn ($query) => $query->where('nip', 'not like', '%202521%'))
|
||||
->when($unit !== null && $unit !== '', fn ($query) => $query->where('id_unit_kerja', $unit))
|
||||
->when($jenisPegawai === 'dosen' || $jenisPegawai === 'tendik', fn ($query) => $query->whereRaw('LOWER(jenis_pegawai) = ?', [$jenisPegawai]))
|
||||
->get()
|
||||
@@ -522,6 +524,7 @@ class P1Controller extends Controller
|
||||
$tahun = (int) ($request->tahun ?? $tahunNow);
|
||||
$bulan = $request->bulan ?? null;
|
||||
$arah = $request->arah ?? '';
|
||||
$includePppk2025 = $request->boolean('include_pppk_2025');
|
||||
|
||||
$unitIdForModel = ($unit == 99) ? 0 : $unit;
|
||||
|
||||
@@ -544,13 +547,13 @@ class P1Controller extends Controller
|
||||
$namaBulanSekarang = $bulanNames[(int) $bulanNow];
|
||||
$filename = "P1_Perbandingan_Januari_sampai_{$namaBulanSekarang}_{$tahun}{$unitName}.xlsx";
|
||||
|
||||
return Excel::download(new P1PerbandinganExport($jenisPegawai, $tahun, null, $unitIdForModel, $arah), $filename);
|
||||
return Excel::download(new P1PerbandinganExport($jenisPegawai, $tahun, null, $unitIdForModel, $arah, $includePppk2025), $filename);
|
||||
}
|
||||
|
||||
$bulanName = $bulanNames[(int) $bulan];
|
||||
$filename = "P1_Perbandingan_{$bulanName}_{$tahun}{$unitName}.xlsx";
|
||||
|
||||
return Excel::download(new P1PerbandinganExport($jenisPegawai, $tahun, (int) $bulan, $unitIdForModel, $arah), $filename);
|
||||
return Excel::download(new P1PerbandinganExport($jenisPegawai, $tahun, (int) $bulan, $unitIdForModel, $arah, $includePppk2025), $filename);
|
||||
}
|
||||
|
||||
public function logs(Request $request): JsonResponse
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user