Finished Quick Entry

This commit is contained in:
Ty Reynolds
2026-02-13 10:59:38 -05:00
parent 4357ce7fcc
commit aefb2d4cc6
2 changed files with 32 additions and 3 deletions

View File

@@ -55,11 +55,16 @@ ns_app.customer.open_quick_entry = function (opts = {}) {
fieldtype: "Check",
default: 0
},
{
fieldname: "custom_auto_pay_id",
label: "AutoPay ID",
fieldtype: "Data"
},
{
fieldname: "custom_send_via",
label: "Send Via",
fieldtype: "Select",
options: "Mail\nEmail\nFax"
options: "mail\nemail\nfax"
},
// ───────── CONTACT ─────────
@@ -170,6 +175,24 @@ ns_app.customer.open_quick_entry = function (opts = {}) {
d.show();
let autoPayField = d.get_field("custom_auto_pay_enabled");
// Initial state
d.set_df_property(
"custom_auto_pay_id",
"hidden",
!d.get_value("custom_auto_pay_enabled")
);
// When checkbox changes
autoPayField.$input.on("change", () => {
let isChecked = d.get_value("custom_auto_pay_enabled");
d.set_df_property("custom_auto_pay_id", "hidden", !isChecked);
});
// Prevent Enter from submitting unless primary button is focused
d.$wrapper.on("keydown", "input, select, textarea", function (e) {
if (e.key === "Enter") {