Prepend all the HTML ID and class names with "accounting-" to avoid name conflict.

This commit is contained in:
2023-02-07 17:57:26 +08:00
parent b1c7bc61c4
commit 1d61fa93d3
13 changed files with 108 additions and 123 deletions

View File

@ -23,13 +23,13 @@
// Initializes the page JavaScript.
document.addEventListener("DOMContentLoaded", function () {
const list = document.getElementById("account-order-list");
const list = document.getElementById("accounting-order-list");
if (list !== null) {
const onReorder = function () {
const accounts = Array.from(list.children);
for (let i = 0; i < accounts.length; i++) {
const no = document.getElementById("account-order-" + accounts[i].dataset.id + "-no");
const code = document.getElementById("account-order-" + accounts[i].dataset.id + "-code");
const no = document.getElementById("accounting-order-" + accounts[i].dataset.id + "-no");
const code = document.getElementById("accounting-order-" + accounts[i].dataset.id + "-code");
no.value = String(i + 1);
code.innerText = list.dataset.baseCode + "-" + ("000" + (i + 1)).slice(-3);
}