Merge pull request #20595 from anuradha-8/develop

fix: to date cannot be less than from date validation on student leave application form
diff --git a/erpnext/buying/doctype/supplier/supplier_dashboard.py b/erpnext/buying/doctype/supplier/supplier_dashboard.py
index 887a093..b3b294d 100644
--- a/erpnext/buying/doctype/supplier/supplier_dashboard.py
+++ b/erpnext/buying/doctype/supplier/supplier_dashboard.py
@@ -9,7 +9,8 @@
 		'heatmap_message': _('This is based on transactions against this Supplier. See timeline below for details'),
 		'fieldname': 'supplier',
 		'non_standard_fieldnames': {
-			'Payment Entry': 'party_name'
+			'Payment Entry': 'party_name',
+			'Bank Account': 'party'
 		},
 		'transactions': [
 			{
@@ -25,6 +26,10 @@
 				'items': ['Payment Entry']
 			},
 			{
+				'label': _('Bank'),
+				'items': ['Bank Account']
+			},
+			{
 				'label': _('Pricing'),
 				'items': ['Pricing Rule']
 			}
diff --git a/erpnext/education/doctype/student/student.py b/erpnext/education/doctype/student/student.py
index 99c4c0e..ae8f3a2 100644
--- a/erpnext/education/doctype/student/student.py
+++ b/erpnext/education/doctype/student/student.py
@@ -25,6 +25,9 @@
 		if self.date_of_birth and getdate(self.date_of_birth) >= getdate(today()):
 			frappe.throw(_("Date of Birth cannot be greater than today."))
 
+		if self.date_of_birth and getdate(self.date_of_birth) >= getdate(self.joining_date):
+			frappe.throw(_("Date of Birth cannot be greater than Joining Date."))
+
 		if self.joining_date and self.date_of_leaving and getdate(self.joining_date) > getdate(self.date_of_leaving):
 			frappe.throw(_("Joining Date can not be greater than Leaving Date"))
 
diff --git a/erpnext/education/doctype/student_group/student_group.js b/erpnext/education/doctype/student_group/student_group.js
index 4165ce0..1372440 100644
--- a/erpnext/education/doctype/student_group/student_group.js
+++ b/erpnext/education/doctype/student_group/student_group.js
@@ -70,6 +70,16 @@
 	group_based_on: function(frm) {
 		if (frm.doc.group_based_on == "Batch") {
 			frm.doc.course = null;
+			frm.set_df_property('program', 'reqd', 1);
+			frm.set_df_property('course', 'reqd', 0);
+		}
+		else if (frm.doc.group_based_on == "Course") {
+			frm.set_df_property('program', 'reqd', 0);
+			frm.set_df_property('course', 'reqd', 1);
+		}
+		else if (frm.doc.group_based_on == "Activity") {
+			frm.set_df_property('program', 'reqd', 0);
+			frm.set_df_property('course', 'reqd', 0);
 		}
 	},