fix: Filter options for Discount Account

This commit is contained in:
GangaManoj 2021-07-13 02:14:18 +05:30
parent 81375aec1f
commit 65e2b9fee6

View File

@ -508,6 +508,16 @@ frappe.ui.form.on("Purchase Invoice", {
}
}
}
frm.fields_dict['items'].grid.get_field('discount_account').get_query = function(doc) {
return {
filters: {
'report_type': 'Profit and Loss',
'company': doc.company,
"is_group": 0
}
}
}
},
refresh: function(frm) {