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 1c3cef3115..4f11a61cc3 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 @@ -86,7 +86,7 @@ def get_tax_accounts(item_list, columns): item_wise_tax_detail = json.loads(item_wise_tax_detail) for item, tax_amount in item_wise_tax_detail.items(): item_tax.setdefault(parent, {}).setdefault(item, {})[account_head] = \ - flt(tax_amount[1]) + flt(tax_amount[1]) if isinstance(tax_amount, list) else flt(tax_amount) except ValueError: continue 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 48bc463f14..ce8e3c566b 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 @@ -83,7 +83,7 @@ def get_tax_accounts(item_list, columns): item_wise_tax_detail = json.loads(item_wise_tax_detail) for item, tax_amount in item_wise_tax_detail.items(): item_tax.setdefault(parent, {}).setdefault(item, {})[account_head] = \ - flt(tax_amount[1]) + flt(tax_amount[1]) if isinstance(tax_amount, list) else flt(tax_amount) except ValueError: continue