mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
[fix] [minor] journal entry, via error report
This commit is contained in:
@@ -552,10 +552,12 @@ def get_opening_accounts(company):
|
|||||||
|
|
||||||
|
|
||||||
def get_against_jv(doctype, txt, searchfield, start, page_len, filters):
|
def get_against_jv(doctype, txt, searchfield, start, page_len, filters):
|
||||||
|
if not filters.get("party"):
|
||||||
|
return []
|
||||||
return frappe.db.sql("""select jv.name, jv.posting_date, jv.user_remark
|
return frappe.db.sql("""select jv.name, jv.posting_date, jv.user_remark
|
||||||
from `tabJournal Entry` jv, `tabJournal Entry Account` jv_detail
|
from `tabJournal Entry` jv, `tabJournal Entry Account` jv_detail
|
||||||
where jv_detail.parent = jv.name and jv_detail.account = %s and jv_detail.party = %s
|
where jv_detail.parent = jv.name and jv_detail.account = %s and jv_detail.party = %s
|
||||||
and (ifnull(jv_detail.against_invoice, '') = '' and ifnull(jv_detail.against_voucher, '') = ''
|
and (ifnull(jv_detail.against_invoice, '') = '' and ifnull(jv_detail.against_voucher, '') = ''
|
||||||
and ifnull(jv_detail.against_jv, '') = '' )
|
and ifnull(jv_detail.against_jv, '') = '' )
|
||||||
and jv.docstatus = 1 and jv.{0} like %s order by jv.name desc limit %s, %s""".format(searchfield),
|
and jv.docstatus = 1 and jv.{0} like %s order by jv.name desc limit %s, %s""".format(searchfield),
|
||||||
(filters["account"], filters["party"], "%{0}%".format(txt), start, page_len))
|
(filters["account"], filters["party"], "%{0}%".format(txt), start, page_len))
|
||||||
|
|||||||
Reference in New Issue
Block a user