Skip to content

Commit

Permalink
refactor: combine vouchers from both ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Aug 13, 2024
1 parent 2455499 commit 4cc5cd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/accounts/report/general_ledger/general_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ def get_conditions(filters):
as_list=True,
)
if system_generated_cr_dr_journals:
filters.update({"voucher_no_not_in": [x[0] for x in system_generated_cr_dr_journals]})
vouchers_to_ignore = (filters.get("voucher_no_not_in") or []) + [
x[0] for x in system_generated_cr_dr_journals
]
filters.update({"voucher_no_not_in": vouchers_to_ignore})

if filters.get("voucher_no_not_in"):
conditions.append("voucher_no not in %(voucher_no_not_in)s")
Expand Down

0 comments on commit 4cc5cd5

Please sign in to comment.