Fixes and patch for Currency Exchange based on date
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index b82f142..c31b0c8 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -413,7 +413,7 @@
 	transaction_date: function() {
 		if (this.frm.doc.transaction_date) {
 			this.frm.transaction_date = this.frm.doc.transaction_date;
-			frappe.ui.form.trigger(me.frm.doc.doctype, "currency");
+			frappe.ui.form.trigger(this.frm.doc.doctype, "currency");
 		}
 	},
 
@@ -455,7 +455,7 @@
 
 	currency: function() {
 		/* manqala 19/09/2016: let the translation date be whichever of the transaction_date or posting_date is available */
-		translation_date = this.frm.doc.transaction_date || this.frm.doc.posting_date;
+		var transaction_date = this.frm.doc.transaction_date || this.frm.doc.posting_date;
 		/* end manqala */
 		
 		var me = this;
@@ -465,7 +465,7 @@
 		// Added `ignore_pricing_rule` to determine if document is loading after mapping from another doc
 		if(this.frm.doc.currency && this.frm.doc.currency !== company_currency
 				&& !this.frm.doc.ignore_pricing_rule) {
-			this.get_exchange_rate(translation_date, this.frm.doc.currency, company_currency,
+			this.get_exchange_rate(transaction_date, this.frm.doc.currency, company_currency,
 				function(exchange_rate) {
 					me.frm.set_value("conversion_rate", exchange_rate);
 				});
@@ -493,11 +493,11 @@
 		}
 	},
 
-	get_exchange_rate: function(translation_date, from_currency, to_currency, callback) {
+	get_exchange_rate: function(transaction_date, from_currency, to_currency, callback) {
 		return frappe.call({
 			method: "erpnext.setup.utils.get_exchange_rate",
 			args: {
-				translation_date: translation_date,
+				transaction_date: transaction_date,
 				from_currency: from_currency,
 				to_currency: to_currency
 			},