mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 21:19:19 +00:00
This reverts commitaaea5edbdb. (cherry picked from commit5c1f0c98f8) Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
This commit is contained in:
@@ -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
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user