Merge branch 'hotfix'
diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index 8bad8a4..38183fb 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
 from __future__ import unicode_literals
-__version__ = '6.27.6'
+__version__ = '6.27.7'
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index b25566a..cf418f6 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -7,7 +7,7 @@
 app_description = """ERP made simple"""
 app_icon = "icon-th"
 app_color = "#e74c3c"
-app_version = "6.27.6"
+app_version = "6.27.7"
 app_email = "info@erpnext.com"
 app_license = "GNU General Public License (v3)"
 source_link = "https://github.com/frappe/erpnext"
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.py b/erpnext/hr/doctype/leave_allocation/leave_allocation.py
index 6740c6e..331a82b 100755
--- a/erpnext/hr/doctype/leave_allocation/leave_allocation.py
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.py
@@ -77,7 +77,9 @@
 			frappe.throw(_("Total leaves allocated is mandatory"))
 
 	def validate_total_leaves_allocated(self):
-		if date_diff(self.to_date, self.from_date) <= flt(self.total_leaves_allocated):
+		# Adding a day to include To Date in the difference
+		date_difference = date_diff(self.to_date, self.from_date) + 1
+		if date_difference < self.total_leaves_allocated:
 			frappe.throw(_("Total allocated leaves are more than days in the period"), OverAllocationError)
 			
 	def validate_against_leave_applications(self):
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index f9f7377..63147d5 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -4,10 +4,11 @@
 from __future__ import unicode_literals
 import frappe
 
-from frappe.utils import add_days, cint, cstr, flt, getdate, nowdate, rounded, date_diff
+from frappe.utils import add_days, cint, cstr, flt, getdate, nowdate, rounded, date_diff, money_in_words
 from frappe.model.naming import make_autoname
 
 from frappe import msgprint, _
+from erpnext.accounts.utils import get_fiscal_year
 from erpnext.setup.utils import get_company_currency
 from erpnext.hr.utils import set_employee_name
 from erpnext.hr.doctype.process_payroll.process_payroll import get_month_details
@@ -18,6 +19,22 @@
 	def autoname(self):
 		self.name = make_autoname('Sal Slip/' +self.employee + '/.#####')
 
+	def validate(self):
+		self.check_existing()
+
+		if not (len(self.get("earnings")) or len(self.get("deductions"))):
+			self.get_emp_and_leave_details()
+		else:
+			self.get_leave_details(lwp = self.leave_without_pay)
+
+		if not self.net_pay:
+			self.calculate_net_pay()
+
+		company_currency = get_company_currency(self.company)
+		self.total_in_words = money_in_words(self.rounded_total, company_currency)
+
+		set_employee_name(self)
+
 	def get_emp_and_leave_details(self):
 		if self.employee:
 			joining_date, relieving_date = frappe.db.get_value("Employee", self.employee,
@@ -59,7 +76,9 @@
 
 	def get_leave_details(self, joining_date=None, relieving_date=None, lwp=None):
 		if not self.fiscal_year:
-			self.fiscal_year = frappe.db.get_default("fiscal_year")
+			# if default fiscal year is not set, get from nowdate
+			self.fiscal_year = get_fiscal_year(nowdate())[0]
+
 		if not self.month:
 			self.month = "%02d" % getdate(nowdate()).month
 
@@ -150,23 +169,6 @@
 			self.employee = ''
 			frappe.throw(_("Salary Slip of employee {0} already created for this month").format(self.employee))
 
-	def validate(self):
-		from frappe.utils import money_in_words
-		self.check_existing()
-
-		if not (len(self.get("earnings")) or len(self.get("deductions"))):
-			self.get_emp_and_leave_details()
-		else:
-			self.get_leave_details(lwp = self.leave_without_pay)
-
-		if not self.net_pay:
-			self.calculate_net_pay()
-
-		company_currency = get_company_currency(self.company)
-		self.total_in_words = money_in_words(self.rounded_total, company_currency)
-
-		set_employee_name(self)
-
 	def calculate_earning_total(self):
 		self.gross_pay = flt(self.arrear_amount) + flt(self.leave_encashment_amount)
 		for d in self.get("earnings"):
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index efcceb3..1b9cbe5 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -257,4 +257,5 @@
 execute:frappe.delete_doc_if_exists("Web Form", "contact") #2016-03-10
 erpnext.patches.v6_20x.remove_fiscal_year_from_holiday_list
 erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
-erpnext.patches.v6_27.fix_recurring_order_status
\ No newline at end of file
+erpnext.patches.v6_27.fix_recurring_order_status
+erpnext.patches.v6_20x.update_product_bundle_description
diff --git a/erpnext/patches/v6_20x/update_product_bundle_description.py b/erpnext/patches/v6_20x/update_product_bundle_description.py
new file mode 100644
index 0000000..1fac44b
--- /dev/null
+++ b/erpnext/patches/v6_20x/update_product_bundle_description.py
@@ -0,0 +1,11 @@
+from __future__ import unicode_literals
+import frappe
+from frappe.utils import sanitize_html
+
+def execute():
+	for product_bundle in frappe.get_all('Product Bundle'):
+		doc = frappe.get_doc('Product Bundle', product_bundle.name)
+		for item in doc.items:
+			if item.description:
+				description = sanitize_html(item.description)
+				item.db_set('description', description, update_modified=False)
diff --git a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html
index 5fe7a14..fe8a963 100644
--- a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html
+++ b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html
@@ -21,7 +21,7 @@
 			<h3>{%= __("Next Steps") %}</h3>
 			<ul class="list-unstyled">
 				<li><a class="text-muted" href="#">{%= __("Go to the Desktop and start using ERPNext") %}</a></li>
-				<li><a class="text-muted" href="#Module/Learn">{%= __("View a list of all the help videos") %}</a></li>
+				<li><a class="text-muted" href="#modules/Learn">{%= __("View a list of all the help videos") %}</a></li>
 				<li><a class="text-muted" href="https://manual.erpnext.com" target="_blank">{%= __("Read the ERPNext Manual") %}</a></li>
 				<li><a class="text-muted" href="https://discuss.erpnext.com" target="_blank">{%= __("Community Forum") %}</a></li>
 			</ul>
diff --git a/setup.py b/setup.py
index 21398cc..ac55dce 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 from setuptools import setup, find_packages
 from pip.req import parse_requirements
 
-version = "6.27.6"
+version = "6.27.7"
 requirements = parse_requirements("requirements.txt", session="")
 
 setup(