fix: Expense Account filter in Sales Invoice (#35944)

fix: Expense Account filter in Sales Invoice (#35944)

(cherry picked from commit d54f52474a)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
mergify[bot]
2023-07-01 18:14:17 +05:30
committed by GitHub
parent 0602ddcfc8
commit b63fbe4286
2 changed files with 3 additions and 14 deletions

View File

@@ -653,19 +653,6 @@ frappe.ui.form.on('Sales Invoice', {
}
}
// expense account
frm.fields_dict['items'].grid.get_field('expense_account').get_query = function(doc) {
if (erpnext.is_perpetual_inventory_enabled(doc.company)) {
return {
filters: {
'report_type': 'Profit and Loss',
'company': doc.company,
"is_group": 0
}
}
}
}
// discount account
frm.fields_dict['items'].grid.get_field('discount_account').get_query = function(doc) {
return {

View File

@@ -173,7 +173,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
this.frm.set_query("expense_account", "items", function(doc) {
return {
filters: {
"company": doc.company
"company": doc.company,
"report_type": "Profit and Loss",
"is_group": 0
}
};
});