Merge branch 'master' of github.com:webnotes/erpnext into responsive

Conflicts:
	accounts/search_criteria/trend_analyzer/trend_analyzer.py
	buying/doctype/purchase_common/purchase_common.js
diff --git a/public/js/transaction.js b/public/js/transaction.js
index a7e8c10..9df0147 100644
--- a/public/js/transaction.js
+++ b/public/js/transaction.js
@@ -70,7 +70,7 @@
 	},
 	
 	company: function() {
-		if(this.frm.doc.company) {
+		if(this.frm.doc.company && this.frm.fields_dict.currency) {
 			var me = this;
 			var company_currency = this.get_company_currency();
 			$.each(["currency", "price_list_currency"], function(i, fieldname) {
@@ -87,6 +87,9 @@
 	},
 	
 	currency: function() {
+		if(this.frm.doc.currency === this.get_company_currency())
+			this.frm.set_value("conversion_rate", 1.0);
+		
 		this.price_list_currency();
 	},