diff --git a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql index f951388aaf..af49c813f1 100644 --- a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql +++ b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql @@ -1,5 +1,5 @@ SELECT gl.account,sum(gl.credit) as amount FROM `tabGL Entry` gl, `tabAccount` a -WHERE gl.account=a.name and a.master_type='Customer' and gl.posting_date between '%(date)s' and '%(date1)s' +WHERE gl.account=a.name and a.master_type='Customer' and gl.posting_date between '%(date)s' and '%(date1)s' and ifnull(gl.is_cancelled, 'No') = 'No' GROUP BY gl.account ORDER BY posting_date