mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-11 19:05:08 +00:00
fix: broke cost center filter in get outstanding reference docs
(cherry picked from commit 7dfe36fdce)
This commit is contained in:
@@ -2556,14 +2556,9 @@ def get_orders_to_be_billed(
|
|||||||
if not voucher_type:
|
if not voucher_type:
|
||||||
return []
|
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
|
# dynamic dimension filters
|
||||||
active_dimensions = get_dimensions()[0]
|
condition = ""
|
||||||
|
active_dimensions = get_dimensions(True)[0]
|
||||||
for dim in active_dimensions:
|
for dim in active_dimensions:
|
||||||
if filters.get(dim.fieldname):
|
if filters.get(dim.fieldname):
|
||||||
condition += f" and {dim.fieldname}='{filters.get(dim.fieldname)}'"
|
condition += f" and {dim.fieldname}='{filters.get(dim.fieldname)}'"
|
||||||
|
|||||||
Reference in New Issue
Block a user