mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-23 05:04:52 +01:00
Merge pull request #53415 from ruthra-kumar/broken_cost_center_filter_in_get_outstanding_documents
fix: broke cost center filter in get outstanding reference docs
This commit is contained in:
@@ -2558,14 +2558,9 @@ def get_orders_to_be_billed(
|
||||
if not voucher_type:
|
||||
return []
|
||||
|
||||
# Add cost center condition
|
||||
doc = frappe.get_doc({"doctype": voucher_type})
|
||||
condition = ""
|
||||
if doc and hasattr(doc, "cost_center") and doc.cost_center:
|
||||
condition = " and cost_center='%s'" % cost_center
|
||||
|
||||
# dynamic dimension filters
|
||||
active_dimensions = get_dimensions()[0]
|
||||
condition = ""
|
||||
active_dimensions = get_dimensions(True)[0]
|
||||
for dim in active_dimensions:
|
||||
if filters.get(dim.fieldname):
|
||||
condition += f" and {dim.fieldname}='{filters.get(dim.fieldname)}'"
|
||||
|
||||
Reference in New Issue
Block a user