From 6b66c387ad3b5d5d83144c0dd41cc951f12f5fb9 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 6 Jan 2014 16:28:17 +0530 Subject: [PATCH] Fixes in item-wise sales/purchase register --- .../item_wise_purchase_register.py | 3 ++- .../item_wise_sales_register/item_wise_sales_register.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py index 7d81308a80..7d8a358aa1 100644 --- a/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py +++ b/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py @@ -12,7 +12,8 @@ def execute(filters=None): item_list = get_items(filters) aii_account_map = get_aii_accounts() - item_tax, tax_accounts = get_tax_accounts(item_list, columns) + if item_list: + item_tax, tax_accounts = get_tax_accounts(item_list, columns) data = [] for d in item_list: diff --git a/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/accounts/report/item_wise_sales_register/item_wise_sales_register.py index dc5ecda3da..9f1fd87f70 100644 --- a/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -11,7 +11,8 @@ def execute(filters=None): last_col = len(columns) item_list = get_items(filters) - item_tax, tax_accounts = get_tax_accounts(item_list, columns) + if item_list: + item_tax, tax_accounts = get_tax_accounts(item_list, columns) data = [] for d in item_list: @@ -39,7 +40,6 @@ def get_columns(): "Qty:Float:120", "Rate:Currency:120", "Amount:Currency:120" ] - def get_conditions(filters): conditions = ""