Merge pull request #47781 from ljain112/fix-cc-psa

fix: add company filter to cost center and project in process statement of accounts
This commit is contained in:
ruthra kumar
2025-06-02 13:37:54 +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());