Create restrict-cancel-rights.md
diff --git a/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/restrict-cancel-rights.md b/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/restrict-cancel-rights.md
new file mode 100644
index 0000000..ab12e38
--- /dev/null
+++ b/erpnext/docs/user/manual/de/customize-erpnext/custom-scripts/custom-script-examples/restrict-cancel-rights.md
@@ -0,0 +1,17 @@
+## 15.3.1.5 Abbruchrechte einschränken
+
+Fügen Sie dem Ereignis custom_before_cancel eine Steuerungsfunktion hinzu:
+
+ cur_frm.cscript.custom_before_cancel = function(doc) {
+ if (user_roles.indexOf("Accounts User")!=-1 && user_roles.indexOf("Accounts Manager")==-1
+ && user_roles.indexOf("System Manager")==-1) {
+ if (flt(doc.grand_total) > 10000) {
+ msgprint("You can not cancel this transaction, because grand total \
+ is greater than 10000");
+ validated = false;
+ }
+ }
+ }
+
+
+{next}