Fix validate: sender name check used wrong field ID (from_name → sn)

https://claude.ai/code/session_01MkM7p8Us3L8YAfLKGA13NS
This commit is contained in:
Claude 2026-06-08 16:55:34 +00:00
parent cf0994ae13
commit 46d2c95d94
No known key found for this signature in database

View file

@ -1451,7 +1451,7 @@ function validateInvoice() {
const errors = []; const errors = [];
const ino = (document.getElementById("ino")?.value || "").trim(); const ino = (document.getElementById("ino")?.value || "").trim();
if (!ino) errors.push(t("val-invoice-no") || "Invoice number is required"); if (!ino) errors.push(t("val-invoice-no") || "Invoice number is required");
const fromName = (document.getElementById("from_name")?.value || "").trim(); const fromName = (document.getElementById("sn")?.value || "").trim();
if (!fromName) errors.push(t("val-from-name") || "Sender name is required"); if (!fromName) errors.push(t("val-from-name") || "Sender name is required");
const ctPick = document.getElementById("ct-pick"); const ctPick = document.getElementById("ct-pick");
if (!ctPick || !ctPick.value) errors.push(t("val-charge-to") || "Charge-to is required"); if (!ctPick || !ctPick.value) errors.push(t("val-charge-to") || "Charge-to is required");