mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 23:22:52 +00:00
[script report] payments made with ageing
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
from webnotes import msgprint, _
|
||||
from webnotes.utils import getdate, nowdate, flt, cstr
|
||||
|
||||
def execute(filters=None):
|
||||
@@ -68,13 +69,16 @@ def get_conditions(filters, upto_report_date=True):
|
||||
customer_accounts = []
|
||||
if filters.get("account"):
|
||||
customer_accounts = [filters["account"]]
|
||||
elif filters.get("company"):
|
||||
else:
|
||||
customer_accounts = webnotes.conn.sql_list("""select name from `tabAccount`
|
||||
where ifnull(master_type, '') = 'Customer' and docstatus < 2 %s""" %
|
||||
conditions, filters)
|
||||
|
||||
if customer_accounts:
|
||||
conditions += " and account in (%s)" % (", ".join(['%s']*len(customer_accounts)))
|
||||
else:
|
||||
msgprint(_("No Customer Accounts found. Customer Accounts are identified based on \
|
||||
'Master Type' value in account record."), raise_exception=1)
|
||||
|
||||
if filters.get("report_date"):
|
||||
if upto_report_date:
|
||||
|
||||
Reference in New Issue
Block a user