From 6fa5e42b40326ccf79d136ef6fb8e614a206114e Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 19 Jul 2013 15:33:11 +0530 Subject: [PATCH 1/2] [minor] [fix] [issue] #617 --- accounts/doctype/journal_voucher/journal_voucher.js | 2 +- accounts/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/doctype/journal_voucher/journal_voucher.js b/accounts/doctype/journal_voucher/journal_voucher.js index ff520f6b9a..2e89a67cb1 100644 --- a/accounts/doctype/journal_voucher/journal_voucher.js +++ b/accounts/doctype/journal_voucher/journal_voucher.js @@ -163,7 +163,7 @@ cur_frm.cscript.account = function(doc,dt,dn) { method: "accounts.utils.get_balance_on", args: {account: d.account, date: doc.posting_date}, callback: function(r) { - d.balance = format_currency(r.message, erpnext.get_currency(doc.company)); + d.balance = r.message; refresh_field('balance', d.name, 'entries'); } }); diff --git a/accounts/utils.py b/accounts/utils.py index 3de445c68d..77665ea2a1 100644 --- a/accounts/utils.py +++ b/accounts/utils.py @@ -119,7 +119,7 @@ def get_balance_on(account=None, date=None): bal = -bal # if bal is None, return 0 - return bal or 0 + return flt(bal) @webnotes.whitelist() def add_ac(args=None): From 0d009f3db014b99082c43f8ea6e1e7db2786918c Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 19 Jul 2013 16:11:21 +0530 Subject: [PATCH 2/2] [minor] [fix] [patch] cost center company --- patches/march_2013/p08_create_aii_accounts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patches/march_2013/p08_create_aii_accounts.py b/patches/march_2013/p08_create_aii_accounts.py index 0156a17c28..e4260d3508 100644 --- a/patches/march_2013/p08_create_aii_accounts.py +++ b/patches/march_2013/p08_create_aii_accounts.py @@ -1,6 +1,7 @@ import webnotes def execute(): webnotes.reload_doc("setup", "doctype", "company") + webnotes.reload_doc("accounts", "doctype", "cost_center") create_chart_of_accounts_if_not_exists() add_group_accounts() add_ledger_accounts()