Merge pull request #4065 from nabinhait/receivable_payable
[fix] Fetch gl entries in receivable/payable report only if party mentioned
This commit is contained in:
commit
ba8ec17f0b
@ -209,7 +209,8 @@ class ReceivablePayableReport(object):
|
|||||||
self.gl_entries = frappe.db.sql("""select name, posting_date, account, party_type, party,
|
self.gl_entries = frappe.db.sql("""select name, posting_date, account, party_type, party,
|
||||||
voucher_type, voucher_no, against_voucher_type, against_voucher, account_currency, remarks, {0}
|
voucher_type, voucher_no, against_voucher_type, against_voucher, account_currency, remarks, {0}
|
||||||
from `tabGL Entry`
|
from `tabGL Entry`
|
||||||
where docstatus < 2 and party_type=%s {1} order by posting_date, party"""
|
where docstatus < 2 and party_type=%s and ifnull(party, '') != '' {1}
|
||||||
|
order by posting_date, party"""
|
||||||
.format(select_fields, conditions), values, as_dict=True)
|
.format(select_fields, conditions), values, as_dict=True)
|
||||||
|
|
||||||
return self.gl_entries
|
return self.gl_entries
|
||||||
|
Loading…
Reference in New Issue
Block a user