User GuideManualEnglish DocumentationMiscellaneous
Restrict Cancel Rights
Add a handler to custom_before_cancel event:
cur_frm.cscript.custom_before_cancel = function(doc) { if (mjara.user_roles.indexOf("Accounts User")!=-1 && mjara.user_roles.indexOf("Accounts Manager")==-1 && user_roles.indexOf("System Manager")==-1) { if (flt(doc.grand_total) > 10000) { mjara.msgprint("You can not cancel this transaction, because grand total is greater than 10000"); mjara.validated = false; } } }
Last updated 3 weeks agoWas this helpful?
Submit
Thanks!