diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 308a134ded..34eff77a2b 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2691,7 +2691,7 @@ def get_advance_journal_entries( if order_list: q = q.where( - (journal_acc.reference_type == order_doctype) & ((journal_acc.reference_type).isin(order_list)) + (journal_acc.reference_type == order_doctype) & ((journal_acc.reference_name).isin(order_list)) ) q = q.orderby(journal_entry.posting_date)