mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
fix: add company filters to project
This commit is contained in:
@@ -43,6 +43,20 @@ frappe.ui.form.on("Journal Entry", {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frm.set_query("project", "accounts", function (doc, cdt, cdn) {
|
||||||
|
let row = frappe.get_doc(cdt, cdn);
|
||||||
|
let filters = {
|
||||||
|
company: doc.company,
|
||||||
|
};
|
||||||
|
if (row.party_type == "Customer") {
|
||||||
|
filters.customer = row.party;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
query: "erpnext.controllers.queries.get_project_name",
|
||||||
|
filters,
|
||||||
|
};
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
get_balance_for_periodic_accounting(frm) {
|
get_balance_for_periodic_accounting(frm) {
|
||||||
|
|||||||
@@ -138,6 +138,24 @@ frappe.ui.form.on("Stock Entry", {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frm.set_query("project", "items", function (doc) {
|
||||||
|
return {
|
||||||
|
query: "erpnext.controllers.queries.get_project_name",
|
||||||
|
filters: {
|
||||||
|
company: doc.company,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
frm.set_query("project", function (doc) {
|
||||||
|
return {
|
||||||
|
query: "erpnext.controllers.queries.get_project_name",
|
||||||
|
filters: {
|
||||||
|
company: doc.company,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
frm.add_fetch("bom_no", "inspection_required", "inspection_required");
|
frm.add_fetch("bom_no", "inspection_required", "inspection_required");
|
||||||
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
|
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user