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;
}
}
}
Tuesday, 6 March 2018
Cancel permission based on grand total
Subscribe to:
Post Comments (Atom)
Django rest api - filter
views.py from django_filters.rest_framework import DjangoFilterBackend class PollList(viewsets.ModelViewSet): queryset = X.objects...
-
1) add code on report_name.js file // Copyright (c) 2016, DP and contributors // For license information, please see license.txt /* esli...
-
form.py text = forms.CharField(required=False, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder...
-
frappe.ui.form.on("Sales Order", "refresh", function(frm, doctype, name) { cur_frm.add_custom_button(__('Get Indi...
No comments:
Post a Comment