Merge branch 'hotfix'
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 46a30d0..8a247cc 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.26'
+__version__ = '10.1.27'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/patches/v10_0/taxes_issue_with_pos.py b/erpnext/patches/v10_0/taxes_issue_with_pos.py
index 5d6b786..9b54297 100644
--- a/erpnext/patches/v10_0/taxes_issue_with_pos.py
+++ b/erpnext/patches/v10_0/taxes_issue_with_pos.py
@@ -8,7 +8,7 @@
 	for d in frappe.get_all('Sales Invoice', fields=["name"],
 		filters = {'is_pos':1, 'docstatus': 1, 'creation': ('>', '2018-04-23')}):
 		doc = frappe.get_doc('Sales Invoice', d.name)
-		if (not doc.taxes and doc.taxes_and_charges and doc.pos_profile and
+		if (not doc.taxes and doc.taxes_and_charges and doc.pos_profile and doc.outstanding_amount != 0 and
 			frappe.db.get_value('POS Profile', doc.pos_profile, 'taxes_and_charges', cache=True) == doc.taxes_and_charges):
 
 			doc.append_taxes_from_master()
@@ -19,7 +19,7 @@
 			doc.db_update()
 
 			delete_gle_for_voucher(doc.name)
-			doc.make_gl_entries()
+			doc.make_gl_entries(repost_future_gle=False)
 
 def delete_gle_for_voucher(voucher_no):
 	frappe.db.sql("""delete from `tabGL Entry` where voucher_no = %(voucher_no)s""",