Skip to content

Commit

Permalink
fix: cost center filter by company (backport #42297) (#42299)
Browse files Browse the repository at this point in the history
fix: cost center filter by company (#42297)

(cherry picked from commit 9838f7e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
  • Loading branch information
mergify[bot] and rohitwaghchaure authored Jul 12, 2024
1 parent 1de66e5 commit 4c9ce1b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@ frappe.ui.form.on("Subcontracting Order", {
};
});

frm.set_query("cost_center", (doc) => {
return {
filters: {
company: doc.company,
},
};
});

frm.set_query("cost_center", "items", (doc) => {
return {
filters: {
company: doc.company,
},
};
});

frm.set_query("set_warehouse", () => {
return {
filters: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,22 @@ frappe.ui.form.on("Subcontracting Receipt", {
};
});

frm.set_query("cost_center", (doc) => {
return {
filters: {
company: doc.company,
},
};
});

frm.set_query("cost_center", "items", (doc) => {
return {
filters: {
company: doc.company,
},
};
});

frm.set_query("supplier_warehouse", () => {
return {
filters: {
Expand Down

0 comments on commit 4c9ce1b

Please sign in to comment.