fix: added query for fetching salary component
This commit is contained in:
parent
6058ea88e8
commit
02d495f1fb
@ -12,6 +12,8 @@ frappe.ui.form.on('Additional Salary', {
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
frm.trigger('set_earning_component');
|
||||
},
|
||||
|
||||
employee: function(frm) {
|
||||
@ -43,6 +45,20 @@ frappe.ui.form.on('Additional Salary', {
|
||||
});
|
||||
},
|
||||
|
||||
company: function(frm) {
|
||||
frm.trigger('set_earning_component');
|
||||
},
|
||||
|
||||
set_earning_component: function(frm) {
|
||||
if(!frm.doc.company) return;
|
||||
frm.set_query("salary_component", function() {
|
||||
return {
|
||||
query : "erpnext.payroll.doctype.salary_structure.salary_structure.get_earning_deduction_components",
|
||||
filters: {type: "earning", company: frm.doc.company}
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
get_employee_currency: function(frm) {
|
||||
frappe.call({
|
||||
method: "erpnext.payroll.doctype.salary_structure_assignment.salary_structure_assignment.get_employee_currency",
|
||||
|
Loading…
x
Reference in New Issue
Block a user