Merge pull request #5019 from saurabh6790/supp1.0

[fixes] set todays date on employee attendance tool
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index d109c65..6de5154 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -841,11 +841,11 @@
 			return;
 		}
 
-		if(!this.frm.doc.recurring_id) {
-			this.frm.set_value('recurring_id', this.frm.doc.name);
-		}
-
 		if(this.frm.doc.is_recurring) {
+			if(!this.frm.doc.recurring_id) {
+				this.frm.set_value('recurring_id', this.frm.doc.name);
+			}
+			
 			var owner_email = this.frm.doc.owner=="Administrator"
 				? frappe.user_info("Administrator").email
 				: this.frm.doc.owner;