Merge pull request #7490 from rohitwaghchaure/pos_discount_issue

[Fix] Discount not working in the POS
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index bc7ef57..0083ceb 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
 from __future__ import unicode_literals
 import frappe
 
-__version__ = '7.2.8'
+__version__ = '7.2.11'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/patches/v7_2/update_salary_slips.py b/erpnext/patches/v7_2/update_salary_slips.py
index 232de28..c694fc5 100644
--- a/erpnext/patches/v7_2/update_salary_slips.py
+++ b/erpnext/patches/v7_2/update_salary_slips.py
@@ -2,11 +2,15 @@
 from erpnext.hr.doctype.process_payroll.process_payroll import get_month_details
 
 def execute():
+	ss_columns = frappe.db.get_table_columns("Salary Slip")
+	if "fiscal_year" not in ss_columns or "month" not in ss_columns:
+		return
+		
 	salary_slips = frappe.db.sql("""select fiscal_year, month, name from `tabSalary Slip` 
 				where (month is not null and month != '') 
 				and (fiscal_year is not null and fiscal_year != '') and
 				(start_date is null  or start_date = '') and 
-				(end_date is null  or end_date = '') and docstatus != 2""")
+				(end_date is null  or end_date = '') and docstatus != 2""", as_dict=1)
 
 	for salary_slip in salary_slips:
 		get_start_end_date = get_month_details(salary_slip.fiscal_year, salary_slip.month)