mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-19 01:25:07 +00:00
Merge pull request #40251 from frappe/mergify/bp/version-14-hotfix/pr-40250
fix(minor): company filter in cost center allocation (backport #40250)
This commit is contained in:
@@ -3,16 +3,21 @@
|
||||
|
||||
frappe.ui.form.on('Cost Center Allocation', {
|
||||
setup: function(frm) {
|
||||
let filters = {"is_group": 0};
|
||||
if (frm.doc.company) {
|
||||
$.extend(filters, {
|
||||
"company": frm.doc.company
|
||||
});
|
||||
}
|
||||
|
||||
frm.set_query('main_cost_center', function() {
|
||||
return {
|
||||
filters: filters
|
||||
filters: {
|
||||
company: frm.doc.company,
|
||||
is_group: 0
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
frm.set_query('cost_center', 'allocation_percentages', function() {
|
||||
return {
|
||||
filters: {
|
||||
company: frm.doc.company,
|
||||
is_group: 0
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user