Merge pull request #47844 from frappe/mergify/bp/version-15-hotfix/pr-47781

fix: add company filter to cost center and project in process statement of accounts (backport #47781)
This commit is contained in:
ruthra kumar
2025-06-02 13:41:21 +05:30
committed by GitHub

View File

@@ -60,6 +60,20 @@ frappe.ui.form.on("Process Statement Of Accounts", {
},
};
});
frm.set_query("cost_center", function () {
return {
filters: {
company: frm.doc.company,
},
};
});
frm.set_query("project", function () {
return {
filters: {
company: frm.doc.company,
},
};
});
if (frm.doc.__islocal) {
frm.set_value("from_date", frappe.datetime.add_months(frappe.datetime.get_today(), -1));
frm.set_value("to_date", frappe.datetime.get_today());