Merge branch 'shf_rename' of github.com:webnotes/erpnext into shf_rename
diff --git a/erpnext/accounts/doctype/journal_voucher/listview.js b/erpnext/accounts/doctype/journal_voucher/listview.js
index 5d7f85a..f3c6a74 100644
--- a/erpnext/accounts/doctype/journal_voucher/listview.js
+++ b/erpnext/accounts/doctype/journal_voucher/listview.js
@@ -4,7 +4,8 @@
this.fields = this.fields.concat([
'`tabJournal Voucher`.voucher_type',
'`tabJournal Voucher`.remark',
- '`tabJournal Voucher`.total_debit'
+ '`tabJournal Voucher`.total_debit',
+ '`tabJournal Voucher`.company',
]);
this.stats = this.stats.concat(['voucher_type']);
},
@@ -25,7 +26,7 @@
{
width: '18%',
content: function(parent, data) {
- $(parent).html(sys_defaults.currency + ' ' + fmt_money(data.total_debit))
+ $(parent).html(wn.boot.company[data.company].default_currency + ' ' + fmt_money(data.total_debit))
},
css: {'text-align':'right'}
},
diff --git a/erpnext/startup/event_handlers.py b/erpnext/startup/event_handlers.py
index a67a214..9f4ff9b 100644
--- a/erpnext/startup/event_handlers.py
+++ b/erpnext/startup/event_handlers.py
@@ -88,6 +88,13 @@
if hasattr(conf, 'max_users'): bootinfo['max_users'] = conf.max_users
if hasattr(conf, 'expires_on'): bootinfo['expires_on'] = conf.expires_on
+ company = webnotes.conn.sql("select name, default_currency from `tabCompany`", as_dict=1)
+ company_dict = {}
+ for c in company:
+ company_dict.setdefault(c['name'], {}).update(c)
+
+ bootinfo['company'] = company_dict
+
def get_letter_heads():
"""load letter heads with startup"""