added format_currency and added options to all currency fields
diff --git a/public/js/utils.js b/public/js/utils.js
index 436c532..06d3a53 100644
--- a/public/js/utils.js
+++ b/public/js/utils.js
@@ -16,6 +16,15 @@
wn.provide('erpnext.utils');
+erpnext.get_currency = function(company) {
+ if(!company && cur_frm)
+ company = cur_frm.doc.company;
+ if(company)
+ return wn.boot.company[company].default_currency || wn.boot.sysdefaults.currency;
+ else
+ return wn.boot.sysdefaults.currency;
+}
+
// TODO
erpnext.utils.Controller = Class.extend({
init: function(opts) {