chore: progress bar

(cherry picked from commit 0b88f98a86)
This commit is contained in:
ruthra kumar
2025-10-20 12:41:15 +05:30
committed by Mergify
parent 6f58614ef2
commit 83e0ce4020

View File

@@ -56,5 +56,16 @@ frappe.ui.form.on("Process Period Closing Voucher", {
});
});
}
// progress bar
let progress = 0;
let normal_finished = frm.doc.normal_balances.filter((x) => x.status == "Completed").length;
let opening_finished = frm.doc.z_opening_balances.filter((x) => x.status == "Completed").length;
progress =
((normal_finished + opening_finished) /
(frm.doc.normal_balances.length + frm.doc.z_opening_balances.length)) *
100;
frm.dashboard.add_progress("Books closure progress", progress, "");
},
});