From a45d16414063b4a95e1118d10fe169c959f1862e Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 18 Jul 2013 13:31:07 +0530 Subject: [PATCH] [currency exchange] set the default Currency as To Currency for a new record --- setup/doctype/currency_exchange/currency_exchange.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup/doctype/currency_exchange/currency_exchange.js b/setup/doctype/currency_exchange/currency_exchange.js index 02cba115f0..f10bdf01ff 100644 --- a/setup/doctype/currency_exchange/currency_exchange.js +++ b/setup/doctype/currency_exchange/currency_exchange.js @@ -15,6 +15,12 @@ // along with this program. If not, see . $.extend(cur_frm.cscript, { + onload: function() { + if(cur_frm.doc.__islocal) { + cur_frm.set_value("to_currency", wn.defaults.get_global_default("currency")); + } + }, + refresh: function() { cur_frm.cscript.set_exchange_rate_label(); },