Merge branch 'develop'
diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index 741b326..f3915b4 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
 from __future__ import unicode_literals
-__version__ = '5.6.2'
+__version__ = '5.6.3'
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index b05adbd..ff1ace4 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -48,10 +48,6 @@
 			}
 		});
 
-		$.each([["against_voucher", "Purchase Invoice", "supplier"],
-			["against_invoice", "Sales Invoice", "customer"]], function(i, opts) {
-		});
-
 		me.frm.set_query("reference_name", "accounts", function(doc, cdt, cdn) {
 			var jvd = frappe.get_doc(cdt, cdn);
 
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index d891dd5..9f38696 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -605,7 +605,7 @@
 	return frappe.db.sql("""select jv.name, jv.posting_date, jv.user_remark
 		from `tabJournal Entry` jv, `tabJournal Entry Account` jv_detail
 		where jv_detail.parent = jv.name and jv_detail.account = %s and ifnull(jv_detail.party, '') = %s
-		and (ifnull(jv_detail.reference_type, '') = ''
+		and ifnull(jv_detail.reference_type, '') = ''
 		and jv.docstatus = 1 and jv.{0} like %s order by jv.name desc limit %s, %s""".format(searchfield),
 		(filters.get("account"), cstr(filters.get("party")), "%{0}%".format(txt), start, page_len))
 
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 8dc1238..deecfb8 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -27,7 +27,7 @@
 """
 app_icon = "icon-th"
 app_color = "#e74c3c"
-app_version = "5.6.2"
+app_version = "5.6.3"
 github_link = "https://github.com/frappe/erpnext"
 
 error_report_email = "support@erpnext.com"
diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json
index 46d7bb8..8be16b2 100644
--- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json
+++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.json
@@ -1,123 +1,123 @@
 {
- "allow_copy": 0, 
- "allow_import": 0, 
- "allow_rename": 0, 
- "creation": "2014-11-27 14:12:07.542534", 
- "custom": 0, 
- "docstatus": 0, 
- "doctype": "DocType", 
- "document_type": "Master", 
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "creation": "2014-11-27 14:12:07.542534",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Master",
  "fields": [
   {
-   "fieldname": "capacity_planning", 
-   "fieldtype": "Section Break", 
-   "label": "Capacity Planning", 
-   "permlevel": 0, 
+   "fieldname": "capacity_planning",
+   "fieldtype": "Section Break",
+   "label": "Capacity Planning",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "description": "Disables creation of time logs against Production Orders.\nOperations shall not be tracked against Production Order", 
-   "fieldname": "disable_capacity_planning", 
-   "fieldtype": "Check", 
-   "label": "Disable Capacity Planning and Time Tracking", 
-   "permlevel": 0, 
+   "description": "Disables creation of time logs against Production Orders.\nOperations shall not be tracked against Production Order",
+   "fieldname": "disable_capacity_planning",
+   "fieldtype": "Check",
+   "label": "Disable Capacity Planning and Time Tracking",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "description": "Plan time logs outside Workstation Working Hours.", 
-   "fieldname": "allow_overtime", 
-   "fieldtype": "Check", 
-   "label": "Allow Overtime", 
-   "permlevel": 0, 
+   "description": "Plan time logs outside Workstation Working Hours.",
+   "fieldname": "allow_overtime",
+   "fieldtype": "Check",
+   "label": "Allow Overtime",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "default": "", 
-   "fieldname": "allow_production_on_holidays", 
-   "fieldtype": "Check", 
-   "in_list_view": 1, 
-   "label": "Allow Production on Holidays", 
-   "options": "", 
-   "permlevel": 0, 
+   "default": "",
+   "fieldname": "allow_production_on_holidays",
+   "fieldtype": "Check",
+   "in_list_view": 1,
+   "label": "Allow Production on Holidays",
+   "options": "",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "default": "BOM", 
-   "fieldname": "backflush_raw_materials_based_on", 
-   "fieldtype": "Select", 
-   "label": "Backflush Raw Materials Based On", 
-   "options": "BOM\nMaterial Transferred for Manufacture", 
-   "permlevel": 0, 
+   "default": "BOM",
+   "fieldname": "backflush_raw_materials_based_on",
+   "fieldtype": "Select",
+   "label": "Backflush Raw Materials Based On",
+   "options": "BOM\nMaterial Transferred for Manufacture",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "fieldname": "column_break_3", 
-   "fieldtype": "Column Break", 
-   "permlevel": 0, 
+   "fieldname": "column_break_3",
+   "fieldtype": "Column Break",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "default": "30", 
-   "description": "Try planning operations for X days in advance.", 
-   "fieldname": "capacity_planning_for_days", 
-   "fieldtype": "Int", 
-   "label": "Capacity Planning For (Days)", 
-   "permlevel": 0, 
+   "default": "30",
+   "description": "Try planning operations for X days in advance.",
+   "fieldname": "capacity_planning_for_days",
+   "fieldtype": "Int",
+   "label": "Capacity Planning For (Days)",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "description": "Default 10 mins", 
-   "fieldname": "mins_between_operations", 
-   "fieldtype": "Int", 
-   "label": "Time Between Operations (in mins)", 
-   "permlevel": 0, 
+   "description": "Default 10 mins",
+   "fieldname": "mins_between_operations",
+   "fieldtype": "Int",
+   "label": "Time Between Operations (in mins)",
+   "permlevel": 0,
    "precision": ""
-  }, 
+  },
   {
-   "fieldname": "over_production_allowance_percentage", 
-   "fieldtype": "Percent", 
-   "label": "Over Production Allowance Percentage", 
-   "permlevel": 0, 
+   "fieldname": "over_production_allowance_percentage",
+   "fieldtype": "Percent",
+   "label": "Over Production Allowance Percentage",
+   "permlevel": 0,
    "precision": ""
   }
- ], 
- "hide_heading": 0, 
- "hide_toolbar": 0, 
- "icon": "icon-wrench", 
- "in_create": 0, 
- "in_dialog": 0, 
- "is_submittable": 0, 
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "icon": "icon-wrench",
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
  "issingle": 1,
  "istable": 0,
- "modified": "2015-07-23 08:12:33.889753", 
- "modified_by": "Administrator", 
- "module": "Manufacturing", 
- "name": "Manufacturing Settings", 
- "name_case": "", 
- "owner": "Administrator", 
+ "modified": "2015-08-12 08:12:33.889753",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Manufacturing Settings",
+ "name_case": "",
+ "owner": "Administrator",
  "permissions": [
   {
-   "amend": 0, 
-   "apply_user_permissions": 0, 
-   "cancel": 0, 
-   "create": 1, 
-   "delete": 0, 
-   "email": 0, 
-   "export": 0, 
-   "import": 0, 
-   "permlevel": 0, 
-   "print": 0, 
-   "read": 1, 
-   "report": 0, 
-   "role": "Manufacturing Manager", 
-   "set_user_permissions": 0, 
-   "share": 1, 
-   "submit": 0, 
+   "amend": 0,
+   "apply_user_permissions": 0,
+   "cancel": 0,
+   "create": 1,
+   "delete": 0,
+   "email": 0,
+   "export": 0,
+   "import": 0,
+   "permlevel": 0,
+   "print": 0,
+   "read": 1,
+   "report": 0,
+   "role": "Manufacturing Manager",
+   "set_user_permissions": 0,
+   "share": 1,
+   "submit": 0,
    "write": 1
   }
- ], 
- "read_only": 0, 
- "read_only_onload": 0, 
- "sort_field": "modified", 
+ ],
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
  "sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/setup.py b/setup.py
index 7cb9c20..c10b407 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-version = "5.6.2"
+version = "5.6.3"
 
 with open("requirements.txt", "r") as f:
 	install_requires = f.readlines()