fix: Opening balance in TB report (#36171)

This commit is contained in:
Deepesh Garg 2023-07-18 12:26:19 +05:30 committed by GitHub
parent 9fb1533b8f
commit cfae52a40a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,7 +221,10 @@ def get_opening_balance(
)
else:
if start_date:
opening_balance = opening_balance.where(closing_balance.posting_date >= start_date)
opening_balance = opening_balance.where(
(closing_balance.posting_date >= start_date)
& (closing_balance.posting_date < filters.from_date)
)
opening_balance = opening_balance.where(closing_balance.is_opening == "No")
else:
opening_balance = opening_balance.where(