refactor: filter on advance payments
This commit is contained in:
parent
52f609e67a
commit
86bac2cf52
@ -75,6 +75,9 @@ class PaymentReconciliation(Document):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.payment_name:
|
||||||
|
condition.update({"name": self.payment_name})
|
||||||
|
|
||||||
payment_entries = get_advance_payment_entries(
|
payment_entries = get_advance_payment_entries(
|
||||||
self.party_type,
|
self.party_type,
|
||||||
self.party,
|
self.party,
|
||||||
|
@ -2396,6 +2396,9 @@ def get_common_query(
|
|||||||
q = q.select((payment_entry.target_exchange_rate).as_("exchange_rate"))
|
q = q.select((payment_entry.target_exchange_rate).as_("exchange_rate"))
|
||||||
|
|
||||||
if condition:
|
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.company == condition["company"])
|
||||||
q = (
|
q = (
|
||||||
q.where(payment_entry.posting_date >= condition["from_payment_date"])
|
q.where(payment_entry.posting_date >= condition["from_payment_date"])
|
||||||
|
Loading…
Reference in New Issue
Block a user