Skip to content

Commit

Permalink
fix: filter condition in item-wise purchase register
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihantra-Patel committed Aug 6, 2024
1 parent f0f8a2f commit bc9b461
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def get_columns(additional_table_columns, filters):


def apply_conditions(query, pi, pii, filters):
for opts in ("company", "supplier", "item_code", "mode_of_payment"):
for opts in ("company", "supplier", "mode_of_payment"):
if filters.get(opts):
query = query.where(pi[opts] == filters[opts])

Expand All @@ -299,6 +299,9 @@ def apply_conditions(query, pi, pii, filters):
if filters.get("to_date"):
query = query.where(pi.posting_date <= filters.get("to_date"))

if filters.get("item_code"):
query = query.where(pii.item_code == filters.get("item_code"))

if filters.get("item_group"):
query = query.where(pii.item_group == filters.get("item_group"))

Expand Down

0 comments on commit bc9b461

Please sign in to comment.