feat: add enable or disable invoicing and print format field

This commit is contained in:
Shivam Mishra 2020-07-28 11:06:42 +05:30
parent 8ca57eb5dd
commit a16b24d50a
2 changed files with 33 additions and 2 deletions

View File

@ -10,6 +10,15 @@ frappe.ui.form.on("Membership Settings", {
}) })
}); });
} }
frm.set_query('print_format', function(doc) {
return {
filters: {
"doc_type": "Sales Invoice"
}
};
});
frm.trigger("add_generate_button"); frm.trigger("add_generate_button");
}, },

View File

@ -9,7 +9,10 @@
"razorpay_settings_section", "razorpay_settings_section",
"billing_cycle", "billing_cycle",
"billing_frequency", "billing_frequency",
"webhook_secret" "webhook_secret",
"column_break_6",
"enable_auto_invoicing",
"print_format"
], ],
"fields": [ "fields": [
{ {
@ -41,11 +44,30 @@
"fieldtype": "Password", "fieldtype": "Password",
"label": "Webhook Secret", "label": "Webhook Secret",
"read_only": 1 "read_only": 1
},
{
"fieldname": "column_break_6",
"fieldtype": "Column Break"
},
{
"default": "0",
"fieldname": "enable_auto_invoicing",
"fieldtype": "Check",
"label": "Enable Auto Invoicing"
},
{
"depends_on": "eval:doc.enable_auto_invoicing",
"fieldname": "print_format",
"fieldtype": "Link",
"label": "Print Format",
"mandatory_depends_on": "eval:doc.enable_auto_invoicing",
"options": "Print Format"
} }
], ],
"index_web_pages_for_search": 1,
"issingle": 1, "issingle": 1,
"links": [], "links": [],
"modified": "2020-05-22 12:38:27.103759", "modified": "2020-07-28 11:01:40.125896",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Non Profit", "module": "Non Profit",
"name": "Membership Settings", "name": "Membership Settings",