mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-19 09:35:03 +00:00
Merge pull request #36324 from GursheenK/cost-center-filter-in-TB
fix: filter by cost center in trial balance
This commit is contained in:
@@ -253,7 +253,7 @@ def get_opening_balance(
|
||||
lft, rgt = frappe.db.get_value("Cost Center", filters.cost_center, ["lft", "rgt"])
|
||||
cost_center = frappe.qb.DocType("Cost Center")
|
||||
opening_balance = opening_balance.where(
|
||||
closing_balance.cost_center.in_(
|
||||
closing_balance.cost_center.isin(
|
||||
frappe.qb.from_(cost_center)
|
||||
.select("name")
|
||||
.where((cost_center.lft >= lft) & (cost_center.rgt <= rgt))
|
||||
|
||||
Reference in New Issue
Block a user