commit | e06eb8e6a9fe6f6c36bf83f49bb5f72f1203b794 | [log] [tgz] |
---|---|---|
author | GangaManoj <ganga.manoj98@gmail.com> | Tue Jul 13 02:14:18 2021 +0530 |
committer | Deepesh Garg <deepeshgarg6@gmail.com> | Wed Jul 21 14:22:26 2021 +0530 |
tree | 32b0fb5193f2ad5f0e9b0aa68c30e15e4e525534 | |
parent | 377775ad8ead56e000717ce769e4da06fb5e7855 [diff] |
fix: Filter options for Discount Account
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 81e3aaa..a1ee5d0 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -508,6 +508,16 @@ } } } + + 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) {