Merge pull request #27089 from frappe/revert-26604-salary-component-account-filter
Revert "fix: Salary component account filter"
This commit is contained in:
commit
dd3372a3a5
@ -4,18 +4,11 @@
|
|||||||
frappe.ui.form.on('Salary Component', {
|
frappe.ui.form.on('Salary Component', {
|
||||||
setup: function(frm) {
|
setup: function(frm) {
|
||||||
frm.set_query("account", "accounts", function(doc, cdt, cdn) {
|
frm.set_query("account", "accounts", function(doc, cdt, cdn) {
|
||||||
let d = frappe.get_doc(cdt, cdn);
|
var d = locals[cdt][cdn];
|
||||||
|
|
||||||
let root_type = "Liability";
|
|
||||||
if (frm.doc.type == "Deduction") {
|
|
||||||
root_type = "Expense";
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
"is_group": 0,
|
"is_group": 0,
|
||||||
"company": d.company,
|
"company": d.company
|
||||||
"root_type": root_type
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user