From f08b424972b08e98f24cc0dc8d70a4cade3690cb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:21:55 +0530 Subject: [PATCH] fix: use correct field name in accounts controller (backport #39884) (#39897) fix: use correct field name in accounts controller (#39884) Changes to get advance payments in SI or PI from JV's (cherry picked from commit b124081065d475c5b042eaf898773b35f1ac5dc6) Co-authored-by: Rohit Gunjegaonkar <135806454+rohitg-pbspl@users.noreply.github.com> --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index fa4333ab47e6..0f087d485418 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -2651,7 +2651,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)