revert: "fix: Salary component account filter (#26605)" (#27446) (#27447)

This reverts commit aaea5edbdb.

(cherry picked from commit 5c1f0c98f8)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
This commit is contained in:
Frappe PR Bot
2021-09-13 10:33:28 +05:30
committed by GitHub
parent 71e4230ab0
commit e39db1abe3

View File

@@ -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
}
};
});