[minor] added customer/supplier id and name in sales/purchase register

This commit is contained in:
Nabin Hait 2013-08-02 11:20:02 +05:30
parent 8608f0e9fa
commit dbe4d1930b
2 changed files with 10 additions and 9 deletions

View File

@ -43,7 +43,7 @@ def execute(filters=None):
purchase_receipt = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_receipt", []))) purchase_receipt = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_receipt", [])))
project_name = list(set(invoice_po_pr_map.get(inv.name, {}).get("project_name", []))) project_name = list(set(invoice_po_pr_map.get(inv.name, {}).get("project_name", [])))
row = [inv.name, inv.posting_date, inv.supplier_name, inv.credit_to, row = [inv.name, inv.posting_date, inv.supplier, inv.supplier_name, inv.credit_to,
account_map.get(inv.credit_to), ", ".join(project_name), inv.bill_no, inv.bill_date, account_map.get(inv.credit_to), ", ".join(project_name), inv.bill_no, inv.bill_date,
inv.remarks, ", ".join(purchase_order), ", ".join(purchase_receipt)] inv.remarks, ", ".join(purchase_order), ", ".join(purchase_receipt)]
@ -76,9 +76,10 @@ def execute(filters=None):
def get_columns(invoice_list): def get_columns(invoice_list):
"""return columns based on filters""" """return columns based on filters"""
columns = [ columns = [
"Invoice:Link/Purchase Invoice:120", "Posting Date:Date:80", "Supplier::120", "Invoice:Link/Purchase Invoice:120", "Posting Date:Date:80", "Supplier Id::120",
"Supplier Account:Link/Account:120", "Account Group:LInk/Account:120", "Supplier Name::120", "Supplier Account:Link/Account:120",
"Project:Link/Project:80", "Bill No::120", "Bill Date:Date:80", "Remarks::150", "Account Group:LInk/Account:120", "Project:Link/Project:80", "Bill No::120",
"Bill Date:Date:80", "Remarks::150",
"Purchase Order:Link/Purchase Order:100", "Purchase Receipt:Link/Purchase Receipt:100" "Purchase Order:Link/Purchase Order:100", "Purchase Receipt:Link/Purchase Receipt:100"
] ]
expense_accounts = tax_accounts = expense_columns = tax_columns = [] expense_accounts = tax_accounts = expense_columns = tax_columns = []

View File

@ -43,7 +43,7 @@ def execute(filters=None):
sales_order = list(set(invoice_so_dn_map.get(inv.name, {}).get("sales_order", []))) sales_order = list(set(invoice_so_dn_map.get(inv.name, {}).get("sales_order", [])))
delivery_note = list(set(invoice_so_dn_map.get(inv.name, {}).get("delivery_note", []))) delivery_note = list(set(invoice_so_dn_map.get(inv.name, {}).get("delivery_note", [])))
row = [inv.name, inv.posting_date, inv.customer_name, inv.debit_to, row = [inv.name, inv.posting_date, inv.customer, inv.customer_name, inv.debit_to,
account_map.get(inv.debit_to), customer_map.get(inv.customer), inv.project_name, account_map.get(inv.debit_to), customer_map.get(inv.customer), inv.project_name,
inv.remarks, ", ".join(sales_order), ", ".join(delivery_note)] inv.remarks, ", ".join(sales_order), ", ".join(delivery_note)]
@ -76,10 +76,10 @@ def execute(filters=None):
def get_columns(invoice_list): def get_columns(invoice_list):
"""return columns based on filters""" """return columns based on filters"""
columns = [ columns = [
"Invoice:Link/Sales Invoice:120", "Posting Date:Date:80", "Customer::120", "Invoice:Link/Sales Invoice:120", "Posting Date:Date:80", "Customer Id::120",
"Customer Account:Link/Account:120", "Account Group:LInk/Account:120", "Customer Name::120", "Customer Account:Link/Account:120", "Account Group:LInk/Account:120",
"Territory:Link/Territory:80", "Project:Link/Project:80", "Territory:Link/Territory:80", "Project:Link/Project:80", "Remarks::150",
"Remarks::150", "Sales Order:Link/Sales Order:100", "Delivery Note:Link/Delivery Note:100" "Sales Order:Link/Sales Order:100", "Delivery Note:Link/Delivery Note:100"
] ]
income_accounts = tax_accounts = income_columns = tax_columns = [] income_accounts = tax_accounts = income_columns = tax_columns = []