Compare commits

..

2 Commits

Author SHA1 Message Date
arbi 3750aa82d3 Merge pull request 'Perbaikan P2' (#33) from development into main
Reviewed-on: #33
2026-09-29 13:27:03 +07:00
Ariyutta 3f49372822 Perbaikan P2 2026-09-29 13:26:42 +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');