Skip to content

Commit

Permalink
fix: query in Provident Fund and Professional Tax Deductions reports …
Browse files Browse the repository at this point in the history
…(backport #2026) (#2034)

(cherry picked from commit 7fd1af0)

Co-authored-by: Nihantra C. Patel <[email protected]>
  • Loading branch information
mergify[bot] and Nihantra-Patel authored Aug 5, 2024
1 parent 8cb16a0 commit 8d056db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ def get_data(filters):
WHERE sal.name = ded.parent
AND ded.parentfield = 'deductions'
AND ded.parenttype = 'Salary Slip'
AND sal.docstatus = 1 %s
AND ded.salary_component IN (%s)
""",
(conditions, ", ".join(["%s"] * len(component_type_dict))),
AND sal.docstatus = 1 {}
AND ded.salary_component IN ({})
""".format(conditions, ", ".join(["%s"] * len(component_type_dict))),
tuple(component_type_dict.keys()),
as_dict=1,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ def get_data(filters):
and ded.parenttype = 'Salary Slip'
and sal.docstatus = 1 {}
and ded.salary_component in ({})
""",
(conditions, ", ".join(["%s"] * len(component_type_dict.keys()))),
""".format(conditions, ", ".join(["%s"] * len(component_type_dict.keys()))),
tuple(component_type_dict.keys()),
as_dict=1,
)
Expand Down

0 comments on commit 8d056db

Please sign in to comment.