diff --git a/app/index.html b/app/index.html
index 0ce5ce6..50a7504 100644
--- a/app/index.html
+++ b/app/index.html
@@ -507,27 +507,23 @@ function buildForm() {
-
${t("payment")}
-
@@ -562,23 +558,29 @@ function buildForm() {
-
${t("invoice-details-section")}
-
-
-
-
-
-
-
-
-
+
${t("payment")}
+
+
+
+ ${t("payment-days")}
+
+
+
+
+
+
-
-
@@ -645,6 +647,9 @@ function fillChargeTo(v) {
const f = (id, val) => { const el = document.getElementById(id); if (el) el.value = val ?? ""; };
const fields = document.getElementById("ct-fields");
+ const bsec = document.getElementById("bank-section");
+ if (bsec) bsec.style.display = v === "__other__" ? "" : "none";
+
if (v === "" || v === "__other__") {
if (v === "") ["ctn","ca1","ca2","ca3","ca4","cc","cph","cem","cvat","creg"].forEach(id => f(id, ""));
fields?.classList.remove("locked");
@@ -1043,12 +1048,14 @@ function gatherData(renderLang) {
const pTerm = parseInt(document.getElementById("pterm")?.value) || 0;
const pPayBy = document.getElementById("paybydisp")?.textContent || "";
- const pAcct = g("pacct");
- const pIban = g("piban");
- const pBic = g("pbic");
- const pBadr1 = g("pbadr1");
- const pBadr2 = g("pbadr2");
- const pRef = g("pref");
+ const bsecEl = document.getElementById("bank-section");
+ const bankVis = bsecEl && bsecEl.style.display !== "none";
+ const pAcct = bankVis ? g("pacct") : "";
+ const pIban = bankVis ? g("piban") : "";
+ const pBic = bankVis ? g("pbic") : "";
+ const pBadr1 = bankVis ? g("pbadr1"): "";
+ const pBadr2 = bankVis ? g("pbadr2"): "";
+ const pRef = bankVis ? g("pref") : "";
const hasBank = !!(pAcct || pIban || pBic || pBadr1 || pRef);
const hidePaymentOut = cfg["hide-payment-info"] === true || cfg["hide-payment-info"] === "yes";
@@ -1142,16 +1149,14 @@ function buildPreviewHTML() {
${sPh ? `
${h(td("sender-phone"))}: ${h(sPh)}
` : ""}
${sEm ? `
${h(td("sender-email"))}: ${h(sEm)}
` : ""}
-
-
${h(td("payment"))}
- ${pTerm > 0 ? `
${h(td("payment-terms"))}: ${pTerm} ${h(td("payment-days"))}${pPayBy ? ` — ${h(td("pay-by"))}: ${h(pPayBy)}` : ""}
` : ""}
- ${showBank ? `
- ${pAcct ? `${h(td("account-holder"))}${h(pAcct)}` : ""}
- ${pIban ? `${h(td("account-no"))}${h(pIban)}` : ""}
- ${pBic ? `${h(td("bank-bic"))}${h(pBic)}` : ""}
- ${pBadr1 || pBadr2 ? `${h(td("bank-address"))}${[pBadr1,pBadr2].filter(Boolean).map(l=>h(l)).join("
")}` : ""}
-
- ${pRef ? `
${h(td("payment-ref"))}: ${h(pRef)}
` : ""}` : ""}
+
${h(td("charge-to"))}
@@ -1165,14 +1170,16 @@ function buildPreviewHTML() {
${ctReg ? `
${h(td("registration-no"))}: ${h(ctReg)}` : ""}
-