feat: prompt that company and COA will be overwritten

(cherry picked from commit 51305a028b)
This commit is contained in:
Gavin D'souza
2020-04-30 04:07:14 +05:30
committed by mergify-bot
parent 0a7afd77e2
commit d50cceaafa

View File

@@ -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) {
frm.add_custom_button(
label,