fix: add company filter to cost center and project in process statement of accounts

(cherry picked from commit 14313b162a)
This commit is contained in:
ljain112
2025-05-28 13:56:42 +05:30
committed by Mergify
parent 9bf8904c80
commit 5ebf1b9cc4

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());