[fix] Fetch advance journal entry in invoice if it is tagged against linked order
This commit is contained in:
parent
6e4ab60e4c
commit
ca627fb806
@ -674,8 +674,7 @@ def get_advance_journal_entries(party_type, party, party_account, amount_field,
|
||||
t1.name = t2.parent and t2.account = %s
|
||||
and t2.party_type = %s and t2.party = %s
|
||||
and t2.is_advance = 'Yes' and t1.docstatus = 1
|
||||
and {1} > 0
|
||||
and (ifnull(t2.reference_name, '')='' {2})
|
||||
and {1} > 0 {2}
|
||||
order by t1.posting_date""".format(amount_field, dr_or_cr, reference_condition),
|
||||
[party_account, party_type, party] + order_list, as_dict=1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user