Merge pull request #40250 from GursheenK/company-filter-in-cost-center-allocation
fix(minor): company filter in cost center allocation
This commit is contained in:
commit
031b99f373
@ -3,16 +3,21 @@
|
|||||||
|
|
||||||
frappe.ui.form.on('Cost Center Allocation', {
|
frappe.ui.form.on('Cost Center Allocation', {
|
||||||
setup: function(frm) {
|
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() {
|
frm.set_query('main_cost_center', function() {
|
||||||
return {
|
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
|
||||||
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user