fix: select sal comp while making sal struct
This commit is contained in:
parent
c474caba70
commit
c69ab6d184
@ -70,6 +70,9 @@ frappe.ui.form.on('Salary Structure', {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
company: function(frm) {
|
||||||
|
frm.trigger('set_earning_deduction_component');
|
||||||
|
},
|
||||||
|
|
||||||
currency: function(frm) {
|
currency: function(frm) {
|
||||||
calculate_totals(frm.doc);
|
calculate_totals(frm.doc);
|
||||||
@ -117,6 +120,7 @@ frappe.ui.form.on('Salary Structure', {
|
|||||||
fields_read_only.forEach(function(field) {
|
fields_read_only.forEach(function(field) {
|
||||||
frappe.meta.get_docfield("Salary Detail", field, frm.doc.name).read_only = 1;
|
frappe.meta.get_docfield("Salary Detail", field, frm.doc.name).read_only = 1;
|
||||||
});
|
});
|
||||||
|
frm.trigger('set_earning_deduction_component');
|
||||||
},
|
},
|
||||||
|
|
||||||
assign_to_employees:function (frm) {
|
assign_to_employees:function (frm) {
|
||||||
|
@ -216,7 +216,7 @@ def get_earning_deduction_components(doctype, txt, searchfield, start, page_len,
|
|||||||
return frappe.db.sql("""
|
return frappe.db.sql("""
|
||||||
select t1.salary_component
|
select t1.salary_component
|
||||||
from `tabSalary Component` t1, `tabSalary Component Account` t2
|
from `tabSalary Component` t1, `tabSalary Component Account` t2
|
||||||
where t1.salary_component = t2.parent
|
where t1.name = t2.parent
|
||||||
and t1.type = %s
|
and t1.type = %s
|
||||||
and t2.company = %s
|
and t2.company = %s
|
||||||
order by salary_component
|
order by salary_component
|
||||||
|
Loading…
x
Reference in New Issue
Block a user