fix: opening entry causing discepancy between stock and trial balance

This commit is contained in:
Rohit Waghchaure
2022-09-23 15:21:09 +05:30
parent 3d356763d0
commit bc3ab45af2
3 changed files with 11 additions and 5 deletions

View File

@@ -237,9 +237,9 @@ def get_conditions(filters):
or filters.get("party")
or filters.get("group_by") in ["Group by Account", "Group by Party"]
):
conditions.append("posting_date >=%(from_date)s")
conditions.append("(posting_date >=%(from_date)s or is_opening = 'Yes')")
conditions.append("(posting_date <=%(to_date)s or is_opening = 'Yes')")
conditions.append("(posting_date <=%(to_date)s)")
if filters.get("project"):
conditions.append("project in %(project)s")