feat: update settings and link filters

This commit is contained in:
Shivam Mishra 2020-07-31 13:46:50 +05:30
parent 15340e0c7f
commit 62e344188a
2 changed files with 60 additions and 33 deletions

View File

@ -11,7 +11,7 @@ frappe.ui.form.on("Membership Settings", {
});
}
frm.set_query('print_format', function(doc) {
frm.set_query('inv_print_format', function(doc) {
return {
filters: {
"doc_type": "Sales Invoice"
@ -19,6 +19,14 @@ frappe.ui.form.on("Membership Settings", {
};
});
frm.set_query('membership_print_format', function(doc) {
return {
filters: {
"doc_type": "Membership"
}
};
});
frm.set_query('debit_account', function(doc) {
return {
filters: {

View File

@ -11,15 +11,14 @@
"billing_frequency",
"webhook_secret",
"column_break_6",
"print_format",
"enable_auto_invoicing",
"company",
"debit_account",
"column_break_9",
"enable_auto_invoicing",
"send_email",
"send_invoice",
"section_break_10",
"new_member",
"renewal"
"membership_print_format",
"inv_print_format"
],
"fields": [
{
@ -61,60 +60,63 @@
"default": "0",
"fieldname": "enable_auto_invoicing",
"fieldtype": "Check",
"label": "Enable Auto Invoicing"
},
{
"fieldname": "print_format",
"fieldtype": "Link",
"label": "Print Format",
"options": "Print Format"
},
{
"fieldname": "new_member",
"fieldtype": "Text Editor",
"label": "Message for New Member",
"label": "Enable Auto Invoicing",
"mandatory_depends_on": "eval:doc.send_invoice"
},
{
"fieldname": "renewal",
"fieldtype": "Text Editor",
"label": "Message for Renewal",
"mandatory_depends_on": "eval:doc.send_invoice"
},
{
"depends_on": "eval:doc.company",
"depends_on": "eval:doc.enable_auto_invoicing",
"fieldname": "debit_account",
"fieldtype": "Link",
"label": "Debit Account",
"mandatory_depends_on": "eval:doc.enable_auto_invoicing",
"options": "Account"
},
{
"depends_on": "eval:doc.send_invoice",
"fieldname": "section_break_10",
"fieldtype": "Section Break",
"hide_border": 1
},
{
"fieldname": "column_break_9",
"fieldtype": "Column Break"
},
{
"depends_on": "eval:doc.enable_auto_invoicing",
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"mandatory_depends_on": "eval:doc.enable_auto_invoicing",
"options": "Company"
},
{
"default": "0",
"depends_on": "eval:doc.enable_auto_invoicing && doc.send_email",
"fieldname": "send_invoice",
"fieldtype": "Check",
"label": "Send Email with Invoice"
"label": "Send Invoice with Email"
},
{
"default": "0",
"fieldname": "send_email",
"fieldtype": "Check",
"label": "Send Acknowledge Email"
},
{
"depends_on": "eval: doc.send_invoice",
"fieldname": "inv_print_format",
"fieldtype": "Link",
"label": "Invoice Print Format",
"mandatory_depends_on": "eval: doc.send_invoice",
"options": "Print Format"
},
{
"depends_on": "eval:doc.send_email",
"fieldname": "membership_print_format",
"fieldtype": "Link",
"label": "Membership Print Format",
"mandatory_depends_on": "eval:doc.send_email",
"options": "Print Format"
}
],
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2020-07-28 12:18:35.289893",
"modified": "2020-07-31 13:45:28.868235",
"modified_by": "Administrator",
"module": "Non Profit",
"name": "Membership Settings",
@ -129,6 +131,23 @@
"role": "System Manager",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "Non Profit Manager",
"share": 1,
"write": 1
},
{
"email": 1,
"print": 1,
"read": 1,
"role": "Non Profit Member",
"share": 1
}
],
"quick_entry": 1,