fix: Don't fetch already discounted invoice
This commit is contained in:
parent
36bb3f55f2
commit
8170585faf
@ -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)
|
Loading…
x
Reference in New Issue
Block a user