Skip to content

Commit

Permalink
feat: add party type filter
Browse files Browse the repository at this point in the history
  • Loading branch information
GursheenK committed Jul 26, 2023
1 parent 82f05bf commit 32fea64
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,28 @@ frappe.query_reports["TDS Payable Monthly"] = {
"default": frappe.defaults.get_default('company')
},
{
"fieldname":"supplier",
"label": __("Supplier"),
"fieldtype": "Link",
"options": "Supplier",
"fieldname":"party_type",
"label": __("Party Type"),
"fieldtype": "Select",
"options": ["Supplier", "Customer"],
"reqd": 1,
"default": "Supplier",
"on_change": function(){
frappe.query_report.set_filter_value("party", "");
}
},
{
"fieldname":"party",
"label": __("Party"),
"fieldtype": "Dynamic Link",
"get_options": function() {
var party_type = frappe.query_report.get_filter_value('party_type');
var party = frappe.query_report.get_filter_value('party');
if(party && !party_type) {
frappe.throw(__("Please select Party Type first"));
}
return party_type;
}
},
{
"fieldname":"from_date",
Expand Down

0 comments on commit 32fea64

Please sign in to comment.