Skip to content

Commit

Permalink
Update transaction.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bvisible committed Aug 30, 2023
1 parent 983c084 commit 3c2b227
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions erpnext/public/js/controllers/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,16 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe

if (this.frm.fields_dict["items"].grid.get_field("expense_account")) {
this.frm.set_query("expense_account", "items", function(doc) {
////
if (doc.doctype == "Purchase Invoice" || doc.doctype == "Purchase Order") {
return {
filters: {
"company": doc.company,
"is_group": 0
}
};
}
////
return {
filters: {
"company": doc.company,
Expand Down

0 comments on commit 3c2b227

Please sign in to comment.