Filter cancelled and draft payments

This commit is contained in:
Charles-Henri Decultot 2018-12-20 14:04:00 +00:00
parent 67db77cfa8
commit 813485023b

View File

@ -170,6 +170,7 @@ def get_mode_of_payments(filters):
from `tabSales Invoice` a, `tabPayment Entry` b,`tabPayment Entry Reference` c from `tabSales Invoice` a, `tabPayment Entry` b,`tabPayment Entry Reference` c
where a.name = c.reference_name where a.name = c.reference_name
and b.name = c.parent and b.name = c.parent
and b.docstatus = 1
and a.name in ({invoice_list_names}) and a.name in ({invoice_list_names})
union union
select a.owner, a.posting_date, select a.owner, a.posting_date,
@ -211,6 +212,7 @@ def get_mode_of_payment_details(filters):
from `tabSales Invoice` a, `tabPayment Entry` b,`tabPayment Entry Reference` c from `tabSales Invoice` a, `tabPayment Entry` b,`tabPayment Entry Reference` c
where a.name = c.reference_name where a.name = c.reference_name
and b.name = c.parent and b.name = c.parent
and b.docstatus = 1
and a.name in ({invoice_list_names}) and a.name in ({invoice_list_names})
group by a.owner, a.posting_date, mode_of_payment group by a.owner, a.posting_date, mode_of_payment
union union