From dbe4d1930b9b66df70a94418c051b05b3d12b64e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 2 Aug 2013 11:20:02 +0530 Subject: [PATCH] [minor] added customer/supplier id and name in sales/purchase register --- accounts/report/purchase_register/purchase_register.py | 9 +++++---- accounts/report/sales_register/sales_register.py | 10 +++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/accounts/report/purchase_register/purchase_register.py b/accounts/report/purchase_register/purchase_register.py index 0a4711ffb8..91525fbc4e 100644 --- a/accounts/report/purchase_register/purchase_register.py +++ b/accounts/report/purchase_register/purchase_register.py @@ -43,7 +43,7 @@ def execute(filters=None): 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", []))) - 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, inv.remarks, ", ".join(purchase_order), ", ".join(purchase_receipt)] @@ -76,9 +76,10 @@ def execute(filters=None): def get_columns(invoice_list): """return columns based on filters""" columns = [ - "Invoice:Link/Purchase Invoice:120", "Posting Date:Date:80", "Supplier::120", - "Supplier Account:Link/Account:120", "Account Group:LInk/Account:120", - "Project:Link/Project:80", "Bill No::120", "Bill Date:Date:80", "Remarks::150", + "Invoice:Link/Purchase Invoice:120", "Posting Date:Date:80", "Supplier Id::120", + "Supplier Name::120", "Supplier Account:Link/Account:120", + "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" ] expense_accounts = tax_accounts = expense_columns = tax_columns = [] diff --git a/accounts/report/sales_register/sales_register.py b/accounts/report/sales_register/sales_register.py index 87c58164bc..0c96684aa3 100644 --- a/accounts/report/sales_register/sales_register.py +++ b/accounts/report/sales_register/sales_register.py @@ -43,7 +43,7 @@ def execute(filters=None): 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", []))) - 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, inv.remarks, ", ".join(sales_order), ", ".join(delivery_note)] @@ -76,10 +76,10 @@ def execute(filters=None): def get_columns(invoice_list): """return columns based on filters""" columns = [ - "Invoice:Link/Sales Invoice:120", "Posting Date:Date:80", "Customer::120", - "Customer Account:Link/Account:120", "Account Group:LInk/Account:120", - "Territory:Link/Territory:80", "Project:Link/Project:80", - "Remarks::150", "Sales Order:Link/Sales Order:100", "Delivery Note:Link/Delivery Note:100" + "Invoice:Link/Sales Invoice:120", "Posting Date:Date:80", "Customer Id::120", + "Customer Name::120", "Customer Account:Link/Account:120", "Account Group:LInk/Account:120", + "Territory:Link/Territory:80", "Project:Link/Project:80", "Remarks::150", + "Sales Order:Link/Sales Order:100", "Delivery Note:Link/Delivery Note:100" ] income_accounts = tax_accounts = income_columns = tax_columns = []