mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 17:55:40 +00:00
fix: Don't fetch already discounted invoice
This commit is contained in:
@@ -190,9 +190,11 @@ def get_invoices(filters):
|
||||
customer,
|
||||
posting_date,
|
||||
outstanding_amount
|
||||
from `tabSales Invoice`
|
||||
from `tabSales Invoice` si
|
||||
where
|
||||
docstatus = 1
|
||||
and outstanding_amount > 0
|
||||
%s
|
||||
and not exists(select di.name from `tabDiscounted Invoice` di
|
||||
where di.docstatus=1 and di.sales_invoice=si.name)
|
||||
""" % where_condition, filters, as_dict=1)
|
||||
Reference in New Issue
Block a user