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