Skip to content

Commit

Permalink
Merge pull request #1038 from 8848digital/budget_variance_report
Browse files Browse the repository at this point in the history
Budget variance report
  • Loading branch information
aasif-patel authored Jan 15, 2025
2 parents f0b0792 + 53a9a07 commit c8deb23
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ def get_actual_details(name, filters):
if filters.get("budget_against") == "Cost Center":
cc_lft, cc_rgt = frappe.db.get_value("Cost Center", name, ["lft", "rgt"])
cond = f"""
and lft >= "{cc_lft}"
and rgt <= "{cc_rgt}"
and lft >= {cc_lft}
and rgt <= {cc_rgt}
"""

ac_details = frappe.db.sql(
Expand All @@ -251,8 +251,8 @@ def get_actual_details(name, filters):
gl.debit,
gl.credit,
gl.fiscal_year,
MONTHNAME(gl.posting_date) as month_name,
b.{budget_against} as budget_against
TO_CHAR(gl.posting_date, 'Month') AS month_name,
(ARRAY_AGG(b.{budget_against}))[1] as budget_against
from
`tabGL Entry` gl,
`tabBudget Account` ba,
Expand Down

0 comments on commit c8deb23

Please sign in to comment.