Add button to unlink bank account

This commit is contained in:
Charles-Henri Decultot
2018-12-14 16:50:35 +00:00
parent 422d483baf
commit c45e271b3e
2 changed files with 10 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Bank Account', {
@@ -24,5 +24,13 @@ frappe.ui.form.on('Bank Account', {
else {
frappe.contacts.render_address_and_contact(frm);
}
if (frm.doc.integration_id) {
frm.add_custom_button(__("Unlink external integrations"), function() {
frappe.confirm(__("This action will unlink this account from any external service integrating ERPNext with your bank accounts. It cannot be undone. Are you certain ?"), function() {
frm.set_value("integration_id", "")
})
})
}
}
});

View File

@@ -471,7 +471,7 @@ erpnext.accounts.ReconciliationRow = class ReconciliationRow {
})
} else {
const empty_data_msg = __("ERPNext could not find any matching payment entry")
proposals_wrapper.append(`<div class="flex justify-center align-center text-muted" style="height: 50vh; display: flex;"><h5 class="text-muted">${empty_data_msg}</h5></div>`)
proposals_wrapper.append(`<div class="text-center"><h5 class="text-muted">${empty_data_msg}</h5></div>`)
}
$(me.dialog.body).on('click', '.reconciliation-btn', (e) => {