feat: prompt that company and COA will be overwritten
This commit is contained in:
parent
3f4fdafdcf
commit
51305a028b
@ -73,6 +73,16 @@ frappe.ui.form.on("Tally Migration", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
erpnext_company: function (frm) {
|
||||||
|
frappe.db.exists("Company", frm.doc.erpnext_company).then(exists => {
|
||||||
|
if (exists) {
|
||||||
|
frappe.msgprint(
|
||||||
|
__("Company {0} already exists. Continuing will overwrite the Company and Chart of Accounts", [frm.doc.erpnext_company]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
add_button: function (frm, label, method) {
|
add_button: function (frm, label, method) {
|
||||||
frm.add_custom_button(
|
frm.add_custom_button(
|
||||||
label,
|
label,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user