From c30988b8a459df627084779bdddbb5c99b0760f2 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 25 Jul 2013 13:50:51 +0530 Subject: [PATCH] [minor] [fix] [patch] change item wise tax --- patches/may_2013/p08_change_item_wise_tax.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/patches/may_2013/p08_change_item_wise_tax.py b/patches/may_2013/p08_change_item_wise_tax.py index fd74dcbdbb..a4f85318fd 100644 --- a/patches/may_2013/p08_change_item_wise_tax.py +++ b/patches/may_2013/p08_change_item_wise_tax.py @@ -16,8 +16,9 @@ def execute(): except ValueError: out = {} for t in item_wise_tax_detail.split("\n"): - if ":" in t: - account_head, amount = t.split(":") + if " : " in t: + split_index = t.rfind(" : ") + account_head, amount = t[:split_index], t[split_index+3:] out[account_head.strip()] = flt(amount.strip()) if out: