Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 26ca05709f | |||
| dab7dad163 | |||
| e2e3400685 | |||
| dd18f39565 | |||
| 2780e6b91c | |||
| 46ae587bbe |
@@ -30,6 +30,9 @@ class SimulasiJabatanExport implements WithMultipleSheets
|
|||||||
/** Poin Grade 14-17 statis untuk simulasi dosen bergrade < 14. */
|
/** Poin Grade 14-17 statis untuk simulasi dosen bergrade < 14. */
|
||||||
public const GRADE_1417_POIN = 12;
|
public const GRADE_1417_POIN = 12;
|
||||||
|
|
||||||
|
/** Plafon Total Poin (basis P2) per pegawai; rumus P2 memakai min(68, ...). */
|
||||||
|
public const TOTAL_POIN_MAX = 68;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly int $periode,
|
private readonly int $periode,
|
||||||
private readonly ?int $bulan = null,
|
private readonly ?int $bulan = null,
|
||||||
@@ -202,7 +205,11 @@ class SimulasiJabatanSheet implements FromCollection, WithHeadings, WithStyles,
|
|||||||
// Tambahan poin grade (opsional) — dihargai pada tarif dasar jabatan.
|
// Tambahan poin grade (opsional) — dihargai pada tarif dasar jabatan.
|
||||||
$jfPoinDelta = $jttPoinDelta = 0.0;
|
$jfPoinDelta = $jttPoinDelta = 0.0;
|
||||||
if ($eligibleGrade12) {
|
if ($eligibleGrade12) {
|
||||||
$poinP2NonAdhocSim = max(0.0, $poinP2 + SimulasiJabatanExport::GRADE_1417_POIN - $adhocPoin);
|
// Tambahan +12 tetap dibatasi plafon 68 (net 68-12 setelah
|
||||||
|
// poin wajib dikeluarkan). Dosen yang poin P2-nya sudah mentok
|
||||||
|
// tidak ikut naik; efek grafik/tabel jadi konsisten.
|
||||||
|
$poinP2Sim = min((float) (SimulasiJabatanExport::TOTAL_POIN_MAX - SimulasiJabatanExport::GRADE_1417_POIN), $poinP2 + SimulasiJabatanExport::GRADE_1417_POIN);
|
||||||
|
$poinP2NonAdhocSim = max(0.0, $poinP2Sim - $adhocPoin);
|
||||||
$jttPoinSim = $hasJtt ? ($isTendik ? $poinP2NonAdhocSim : min(28.0, $poinP2NonAdhocSim)) : 0.0;
|
$jttPoinSim = $hasJtt ? ($isTendik ? $poinP2NonAdhocSim : min(28.0, $poinP2NonAdhocSim)) : 0.0;
|
||||||
$jfPoinSim = max(0.0, $poinP2NonAdhocSim - $jttPoinSim);
|
$jfPoinSim = max(0.0, $poinP2NonAdhocSim - $jttPoinSim);
|
||||||
$jfPoinDelta = $jfPoinSim - $jfPoin;
|
$jfPoinDelta = $jfPoinSim - $jfPoin;
|
||||||
|
|||||||
@@ -89,8 +89,14 @@ class SimulasiJabatanController extends Controller
|
|||||||
$row['p2_total_excel'] = $row['p2_total_excel_g12'];
|
$row['p2_total_excel'] = $row['p2_total_excel_g12'];
|
||||||
if (! empty($row['grade12_eligible'])) {
|
if (! empty($row['grade12_eligible'])) {
|
||||||
$parseN = fn ($v) => (float) str_replace(',', '.', str_replace('.', '', $v));
|
$parseN = fn ($v) => (float) str_replace(',', '.', str_replace('.', '', $v));
|
||||||
$row['poin_grade_14_17'] = number_format((float) SimulasiJabatanExport::GRADE_1417_POIN, 2, ',', '.');
|
// Total Poin dosen mentok di 68 (aturan yang sama dengan
|
||||||
$row['total_poin'] = number_format($parseN($row['total_poin']) + SimulasiJabatanExport::GRADE_1417_POIN, 2, ',', '.');
|
// rumus P2: min(68, ...)). Tambahan +12 hanya berlaku
|
||||||
|
// sampai plafon itu, jadi dosen yang sudah 68 tidak
|
||||||
|
// bertambah dan yang mendekati 68 hanya naik sebagian.
|
||||||
|
$totalPoin = $parseN($row['total_poin']);
|
||||||
|
$tambahanEfektif = max(0.0, min((float) SimulasiJabatanExport::TOTAL_POIN_MAX, $totalPoin + SimulasiJabatanExport::GRADE_1417_POIN) - $totalPoin);
|
||||||
|
$row['poin_grade_14_17'] = number_format($tambahanEfektif, 2, ',', '.');
|
||||||
|
$row['total_poin'] = number_format($totalPoin + $tambahanEfektif, 2, ',', '.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return array_merge($row, ['DT_RowIndex' => $start + $index + 1]);
|
return array_merge($row, ['DT_RowIndex' => $start + $index + 1]);
|
||||||
@@ -387,7 +393,9 @@ class SimulasiJabatanController extends Controller
|
|||||||
|
|
||||||
// Tambahan "+12 poin grade" (opsional) — dihargai tarif dasar jabatan.
|
// Tambahan "+12 poin grade" (opsional) — dihargai tarif dasar jabatan.
|
||||||
if ($eligibleG12) {
|
if ($eligibleG12) {
|
||||||
$poinNonAdhocSim = $poinP2NonAdhoc + SimulasiJabatanExport::GRADE_1417_POIN;
|
// Plafon 68 tetap berlaku (net 68-12 di luar poin wajib), jadi
|
||||||
|
// bulan yang poin P2-nya sudah mentok tidak ikut naik.
|
||||||
|
$poinNonAdhocSim = min((float) (SimulasiJabatanExport::TOTAL_POIN_MAX - SimulasiJabatanExport::GRADE_1417_POIN), $poinP2NonAdhoc + SimulasiJabatanExport::GRADE_1417_POIN);
|
||||||
$jttPoinSim = $hasJtt ? min(28.0, $poinNonAdhocSim) : 0.0;
|
$jttPoinSim = $hasJtt ? min(28.0, $poinNonAdhocSim) : 0.0;
|
||||||
$jfPoinSim = max(0.0, $poinNonAdhocSim - $jttPoinSim);
|
$jfPoinSim = max(0.0, $poinNonAdhocSim - $jttPoinSim);
|
||||||
$jttPortion += ($jttPoinSim - $jttPoin) * $jtt377 / 6;
|
$jttPortion += ($jttPoinSim - $jttPoin) * $jtt377 / 6;
|
||||||
|
|||||||
Reference in New Issue
Block a user