diff --git a/controllers/accounts_controller.py b/controllers/accounts_controller.py index 6d4a6ad53b..d6bf392861 100644 --- a/controllers/accounts_controller.py +++ b/controllers/accounts_controller.py @@ -265,7 +265,7 @@ class AccountsController(TransactionBase): tax.grand_total_for_current_item = \ flt(self.tax_doclist[i-1].grand_total_for_current_item + current_tax_amount, self.precision("total", tax)) - + # in tax.total, accumulate grand total of each item tax.total += tax.grand_total_for_current_item diff --git a/patches/august_2013/p02_rename_price_list.py b/patches/august_2013/p02_rename_price_list.py index c29c563157..cea7c79856 100644 --- a/patches/august_2013/p02_rename_price_list.py +++ b/patches/august_2013/p02_rename_price_list.py @@ -15,11 +15,12 @@ def execute(): ("Item Price", "price_list_name", "price_list"), ("BOM", "price_list", "buying_price_list"), ]: - if t[2] in webnotes.conn.get_table_columns(t[0]): + table_columns = webnotes.conn.get_table_columns(t[0]) + if t[2] in table_columns and t[1] in table_columns: # already reloaded, so copy into new column and drop old column webnotes.conn.sql("""update `tab%s` set `%s`=`%s`""" % (t[0], t[2], t[1])) webnotes.conn.sql("""alter table `tab%s` drop column `%s`""" % (t[0], t[1])) - else: + elif t[1] in table_columns: webnotes.conn.sql_ddl("alter table `tab%s` change `%s` `%s` varchar(180)" % t) webnotes.reload_doc(webnotes.conn.get_value("DocType", t[0], "module"), "DocType", t[0]) diff --git a/public/js/transaction.js b/public/js/transaction.js index e460982f70..118594c816 100644 --- a/public/js/transaction.js +++ b/public/js/transaction.js @@ -312,7 +312,8 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ if(!item_tax[item_code]) item_tax[item_code] = {}; if($.isArray(tax_data)) { var tax_rate = tax_data[0] == null ? "" : (flt(tax_data[0], tax_rate_precision) + "%"), - tax_amount = format_currency(flt(tax_data[1], tax_amount_precision), company_currency); + tax_amount = format_currency(flt(tax_data[1], tax_amount_precision), company_currency, + tax_amount_precision); item_tax[item_code][tax.name] = [tax_rate, tax_amount]; } else {