fix: hide delete company transacations button if not system manager (#21839)

This commit is contained in:
Prssanna Desai 2020-05-21 18:35:03 +05:30 committed by GitHub
parent 7978907cc8
commit ce8f8f4ed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,6 +107,9 @@ frappe.ui.form.on("Company", {
erpnext.company.set_chart_of_accounts_options(frm.doc);
if (!frappe.user.has_role('System Manager')) {
frm.get_field("delete_company_transactions").hide();
}
},
make_default_tax_template: function(frm) {
@ -134,7 +137,7 @@ frappe.ui.form.on("Company", {
var d = frappe.prompt({
fieldtype:"Data",
fieldname: "company_name",
label: __("Please re-type company name to confirm"),
label: __("Please enter the company name to confirm"),
reqd: 1,
description: __("Please make sure you really want to delete all the transactions for this company. Your master data will remain as it is. This action cannot be undone.")
},