Fix Edit di Admin APbdes, dan fix data real di apbdes user

This commit is contained in:
2025-11-18 16:26:09 +08:00
parent 6c32f3ebdb
commit 2608a5ffdd
7 changed files with 56 additions and 163 deletions

View File

@@ -123,6 +123,8 @@ function CreateAPBDes() {
return toast.warn("Kode dan uraian wajib diisi");
}
const finalTipe = level === 1 ? 'pendapatan' : tipe; // Berikan default
const selisih = realisasi - anggaran;
const persentase = anggaran > 0 ? (realisasi / anggaran) * 100 : 0;
@@ -134,7 +136,7 @@ function CreateAPBDes() {
selisih,
persentase,
level,
tipe,
tipe: finalTipe,
});
// Reset form input