From a0630671da7a98ef93051046355ec506ef25597d Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 9 Apr 2015 13:34:57 +0530 Subject: [PATCH] [hotfix] batch query --- erpnext/controllers/queries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index ea1c4fe9eb..e1826e7388 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -264,7 +264,7 @@ def get_batch_no(doctype, txt, searchfield, start, page_len, filters): where item = %(item_code)s and name like %(txt)s and docstatus < 2 - and (ifnull(batch.expiry_date, '')='' or batch.expiry_date >= %(posting_date)s) + and (ifnull(expiry_date, '')='' or expiry_date >= %(posting_date)s) {match_conditions} order by expiry_date, name desc limit %(start)s, %(page_len)s""".format(match_conditions=get_match_cond(doctype)), args)