Perbaikan P2 #33

Merged
arbi merged 1 commits from development into main 2026-09-29 13:27:03 +07:00
2 changed files with 3 additions and 1 deletions
@@ -120,7 +120,7 @@ class KeseluruhanController extends Controller
private function buildRekap(int $tahun, ?string $jenisPegawai): Collection
{
$cacheKey = 'remunerasi_keseluruhan_v4_'.$tahun.'_'.($jenisPegawai ?: 'semua');
$cacheKey = 'remunerasi_keseluruhan_v5_'.$tahun.'_'.($jenisPegawai ?: 'semua');
return collect(Cache::remember($cacheKey, now()->addHours(6), fn () => $this->computeRekap($tahun, $jenisPegawai)));
}
@@ -167,6 +167,7 @@ class KeseluruhanController extends Controller
->selectRaw('SUM(rpb.p2_bruto) as total')
->whereNull('rpb.deleted_at')
->where('jp.periode', $periodeSemester1)
->where('jp.active', true)
->when($jenisPegawai, fn ($q) => $q->where('jpd.jenis_pegawai', $jenisPegawai))
->groupBy('verifikator.pegawais.nip')
->havingRaw('SUM(rpb.p2_bruto) > 0')
@@ -142,6 +142,7 @@ class P2Controller extends Controller
->selectRaw('SUM(rpb.p2_netto) as total_p2_netto')
->whereNull('rpb.deleted_at')
->where('jp.periode', $periode)
->where('jp.active', true)
->groupBy('verifikator.pegawais.nip', 'verifikator.pegawais.nama')
->havingRaw('SUM(rpb.p2_bruto) > 0');