Skip to content

Commit

Permalink
fix: test with None conditon in PE
Browse files Browse the repository at this point in the history
  • Loading branch information
GursheenK committed Jul 26, 2023
1 parent c3b21a6 commit 479cab0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -2217,6 +2217,9 @@ def get_advance_payment_entries(
reference_condition = ""
order_list = []

if not condition:
condition = ""

payment_entries_against_order = frappe.db.sql(
"""
select
Expand All @@ -2231,12 +2234,12 @@ def get_advance_payment_entries(
and t2.reference_doctype = %s {2} {3}
order by t1.posting_date {4}
""".format(
currency_field,
party_account_field,
reference_condition,
condition,
limit_cond,
exchange_rate_field
currency_field,
party_account_field,
reference_condition,
condition,
limit_cond,
exchange_rate_field,
),
[party_account, payment_type, party_type, party, order_doctype] + order_list,
as_dict=1,
Expand Down

0 comments on commit 479cab0

Please sign in to comment.