[script report] collection report

This commit is contained in:
Nabin Hait
2013-05-01 15:05:29 +05:30
parent e388465e17
commit 006d074b26
8 changed files with 155 additions and 10 deletions

View File

@@ -145,7 +145,6 @@ def get_customer_deatils(invoice_list):
customers = list(set([inv.customer for inv in invoice_list]))
for cust in webnotes.conn.sql("""select name, territory from `tabCustomer`
where name in (%s)""" % ", ".join(["%s"]*len(customers)), tuple(customers), as_dict=1):
customer_map.setdefault(cust.name, "")
customer_map[cust.name] = cust.territory
return customer_map
@@ -155,7 +154,6 @@ def get_account_details(invoice_list):
accounts = list(set([inv.debit_to for inv in invoice_list]))
for acc in webnotes.conn.sql("""select name, parent_account from tabAccount
where name in (%s)""" % ", ".join(["%s"]*len(accounts)), tuple(accounts), as_dict=1):
account_map.setdefault(acc.name, "")
account_map[acc.name] = acc.parent_account
return account_map