Skip to content

Commit

Permalink
revert: "fix: Salary component account filter (#26605)" (#27446) (#27447
Browse files Browse the repository at this point in the history
)

This reverts commit aaea5ed.

(cherry picked from commit 5c1f0c9)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
  • Loading branch information
frappe-pr-bot and ankush authored Sep 13, 2021
1 parent 71e4230 commit e39db1a
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions erpnext/payroll/doctype/salary_component/salary_component.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,11 @@
frappe.ui.form.on('Salary Component', {
setup: function(frm) {
frm.set_query("account", "accounts", function(doc, cdt, cdn) {
let d = frappe.get_doc(cdt, cdn);

let root_type = "Liability";
if (frm.doc.type == "Deduction") {
root_type = "Expense";
}

var d = locals[cdt][cdn];
return {
filters: {
"is_group": 0,
"company": d.company,
"root_type": root_type
"company": d.company
}
};
});
Expand Down

0 comments on commit e39db1a

Please sign in to comment.