[fix] [minor] itemwise sales/purchase register

This commit is contained in:
Nabin Hait 2013-11-01 18:08:55 +05:30
parent 75a4206a24
commit 4144b1c841
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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