[accounts] [fix] aganist_jv query error

This commit is contained in:
Rushabh Mehta 2013-03-26 14:43:41 +05:30
parent 2c3f35f557
commit 08c33bd6bc

View File

@ -377,7 +377,7 @@ def get_against_sales_invoice(doctype, txt, searchfield, start, page_len, filter
def get_against_jv(doctype, txt, searchfield, start, page_len, filters):
return webnotes.conn.sql("""select jv.name, jv.posting_date, jv.user_remark
from `tabJournal Voucher` jv, `tabJournal Voucher Detail` jv_detail
where jv_detail.parent = jv.name and jv_detail.account = %s and docstatus = 1
where jv_detail.parent = jv.name and jv_detail.account = %s and jv.docstatus = 1
and jv.%s like %s order by jv.name desc limit %s, %s""" %
("%s", searchfield, "%s", "%s", "%s"),
(filters["account"], "%%%s%%" % txt, start, page_len))