Merge branch 'staging-fixes' into staging
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index ff96e92..45a1b1f 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
 from erpnext.hooks import regional_overrides
 from frappe.utils import getdate
 
-__version__ = '10.1.64'
+__version__ = '10.1.65'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index 528e3d3..314b91b 100755
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -1573,15 +1573,16 @@
 				style="margin-right: 5px;">${__('Print')}</a>
 			<a class="btn btn-default new_doc">${__('New')}</a>`);
 
-		$('.print_doc').click(function () {
-			var html = frappe.render(me.print_template_data, me.frm.doc)
-			me.print_document(html)
+		this.msgprint.msg_area.find('.print_doc').on('click', function() {
+			var html = frappe.render(me.print_template_data, me.frm.doc);
+			me.print_document(html);
 		})
 
-		$('.new_doc').click(function () {
-			me.msgprint.hide()
-			me.make_new_cart()
+		this.msgprint.msg_area.find('.new_doc').on('click', function() {
+			me.msgprint.hide();
+			me.make_new_cart();
 		})
+
 	},
 
 	print_document: function (html) {
diff --git a/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py b/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py
index 0c7baa8..3f1d5b3 100644
--- a/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py
+++ b/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py
@@ -73,6 +73,7 @@
 	return att_map
 
 def get_students_with_leave_application(from_date, to_date, students_list):
+	if not students_list: return
 	leave_applications = frappe.db.sql("""
 		select student, from_date, to_date 
 		from `tabStudent Leave Application` 
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 6c1575c..9d21e4b 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -12,7 +12,7 @@
 source_link = "https://github.com/frappe/erpnext"
 
 develop_version = '11.x.x-develop'
-staging_version = '11.0.3-beta.15'
+staging_version = '11.0.3-beta.16'
 
 error_report_email = "support@erpnext.com"
 
diff --git a/erpnext/hr/doctype/employee_advance/employee_advance.py b/erpnext/hr/doctype/employee_advance/employee_advance.py
index 6f550bc..ee0cb83 100644
--- a/erpnext/hr/doctype/employee_advance/employee_advance.py
+++ b/erpnext/hr/doctype/employee_advance/employee_advance.py
@@ -69,7 +69,7 @@
 			where employee_advance = %s and docstatus=1 and allocated_amount > 0
 		""", self.name)[0][0]
 
-		frappe.db.set_value("Employee Advance", self.name, "claimed_amount", claimed_amount)
+		frappe.db.set_value("Employee Advance", self.name, "claimed_amount", flt(claimed_amount))
 
 @frappe.whitelist()
 def get_due_advance_amount(employee, posting_date):
@@ -109,4 +109,4 @@
 		"account_type": payment_account.account_type
 	})
 
-	return je.as_dict()
\ No newline at end of file
+	return je.as_dict()
diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.py b/erpnext/manufacturing/report/production_analytics/production_analytics.py
index 1dc821c..0602193 100644
--- a/erpnext/manufacturing/report/production_analytics/production_analytics.py
+++ b/erpnext/manufacturing/report/production_analytics/production_analytics.py
@@ -31,7 +31,7 @@
 		columns.append(
 			{
 			"label": _(label),
-			"field_name":field_name,
+			"fieldname": field_name,
 			"fieldtype": "Float",
 			"width": 120
 		},
diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less
index e962e91..b746cc1 100644
--- a/erpnext/public/less/erpnext.less
+++ b/erpnext/public/less/erpnext.less
@@ -426,6 +426,12 @@
 	.collapse-btn {
 		cursor: pointer;
 	}
+	
+	@media (max-width: @screen-xs) {
+		.page-actions {
+			max-width: 110px;
+		}
+	}
 }
 
 .price-info {