refactor: filter on advance payments

This commit is contained in:
ruthra kumar
2023-07-04 09:02:05 +05:30
parent 52f609e67a
commit 86bac2cf52
2 changed files with 6 additions and 0 deletions

View File

@@ -2396,6 +2396,9 @@ def get_common_query(
q = q.select((payment_entry.target_exchange_rate).as_("exchange_rate"))
if condition:
if condition.get("name", None):
q = q.where(payment_entry.name.like(f"%{condition.get('name')}%"))
q = q.where(payment_entry.company == condition["company"])
q = (
q.where(payment_entry.posting_date >= condition["from_payment_date"])