Skip to content

Commit

Permalink
fix: cost center filter for fetching payments
Browse files Browse the repository at this point in the history
  • Loading branch information
GursheenK committed Jul 25, 2023
1 parent 82f05bf commit c9daa85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -2223,15 +2223,15 @@ def get_advance_payment_entries(
'Payment Entry' as reference_type, t1.name as reference_name,
t1.remarks, t2.allocated_amount as amount, t2.name as reference_row,
t2.reference_name as against_order, t1.posting_date,
t1.{0} as currency, t1.{4} as exchange_rate
t1.{0} as currency, t1.{5} as exchange_rate
from `tabPayment Entry` t1, `tabPayment Entry Reference` t2
where
t1.name = t2.parent and t1.{1} = %s and t1.payment_type = %s
and t1.party_type = %s and t1.party = %s and t1.docstatus = 1
and t2.reference_doctype = %s {2}
order by t1.posting_date {3}
and t2.reference_doctype = %s {2} {3}
order by t1.posting_date {4}
""".format(
currency_field, party_account_field, reference_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 c9daa85

Please sign in to comment.