Removed company from Finance Book and related changes
diff --git a/erpnext/accounts/doctype/finance_book/finance_book.json b/erpnext/accounts/doctype/finance_book/finance_book.json
index d13a484..c9fb843 100644
--- a/erpnext/accounts/doctype/finance_book/finance_book.json
+++ b/erpnext/accounts/doctype/finance_book/finance_book.json
@@ -43,38 +43,6 @@
    "set_only_once": 0, 
    "translatable": 0, 
    "unique": 0
-  }, 
-  {
-   "allow_bulk_edit": 0, 
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "fieldname": "company", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_global_search": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "label": "Company", 
-   "length": 0, 
-   "no_copy": 0, 
-   "options": "Company", 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "translatable": 0, 
-   "unique": 0
   }
  ], 
  "has_web_view": 0, 
@@ -88,7 +56,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2018-04-23 02:15:07.997774", 
+ "modified": "2018-05-09 14:55:01.394387", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Finance Book", 
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.json b/erpnext/accounts/doctype/journal_entry/journal_entry.json
index 916c71f..a975aa0 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.json
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.json
@@ -244,6 +244,38 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
+   "fieldname": "finance_book", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Finance Book", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Finance Book", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "translatable": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
    "fieldname": "2_add_edit_gl_entries", 
    "fieldtype": "Section Break", 
    "hidden": 0, 
@@ -1553,7 +1585,7 @@
  "istable": 0, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2018-05-05 13:11:33.696498", 
+ "modified": "2018-05-09 14:56:08.687994", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Journal Entry", 
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js
index cd6a8fc..f39df3d 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.js
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js
@@ -14,15 +14,7 @@
 			"fieldname":"finance_book",
 			"label": __("Finance Book"),
 			"fieldtype": "Link",
-			"options": "Finance Book",
-			"get_query": function() {
-				var company = frappe.query_report_filters_by_name.company.get_value();
-				return {
-					"filters": {
-						"company": company,
-					}
-				};
-			}
+			"options": "Finance Book"
 		},
 		{
 			"fieldname":"supplier",
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js
index 776835e..2caf359 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js
@@ -14,15 +14,7 @@
 			"fieldname":"finance_book",
 			"label": __("Finance Book"),
 			"fieldtype": "Link",
-			"options": "Finance Book",
-			"get_query": function() {
-				var company = frappe.query_report_filters_by_name.company.get_value();
-				return {
-					"filters": {
-						"company": company,
-					}
-				};
-			}
+			"options": "Finance Book"
 		},
 		{
 			"fieldname":"customer",
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index eb14513..fc76be4 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -322,7 +322,7 @@
 			values.append(self.filters.company)
 
 		if self.filters.finance_book:
-			conditions.append("finance_book=%s")
+			conditions.append("finance_book in (%s, '')")
 			values.append(self.filters.finance_book)
 		else:
 			conditions.append("ifnull(finance_book,'')=%s")
diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py
index 87b7ba1..ea22bac 100644
--- a/erpnext/accounts/report/financial_statements.py
+++ b/erpnext/accounts/report/financial_statements.py
@@ -376,7 +376,8 @@
 		if filters.get("cost_center"):
 			additional_conditions.append(get_cost_center_cond(filters.get("cost_center")))
 		if filters.get("finance_book"):
-			additional_conditions.append("finance_book = '%s'" % frappe.db.escape(filters.get("finance_book")))
+			additional_conditions.append("finance_book in ('%s', '')" %
+				frappe.db.escape(filters.get("finance_book")))
 		else:
 			additional_conditions.append("ifnull(finance_book, '') = ''")
 
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js
index 91879a8..9a774ce 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.js
+++ b/erpnext/accounts/report/general_ledger/general_ledger.js
@@ -15,15 +15,7 @@
 			"fieldname":"finance_book",
 			"label": __("Finance Book"),
 			"fieldtype": "Link",
-			"options": "Finance Book",
-			"get_query": function() {
-				var company = frappe.query_report_filters_by_name.company.get_value();
-				return {
-					"filters": {
-						"company": company,
-					}
-				};
-			}
+			"options": "Finance Book"
 		},
 		{
 			"fieldname":"from_date",
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py
index 6c16a84..2d0bd52 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@ -165,7 +165,7 @@
 		conditions.append("project=%(project)s")
 
 	if filters.get("finance_book"):
-		conditions.append("finance_book=%(finance_book)s")
+		conditions.append("finance_book in (%(finance_book)s, '')")
 	else:
 		conditions.append("ifnull(finance_book, '')=''")
 
diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js
index 94518f8..7e31c57 100644
--- a/erpnext/public/js/financial_statements.js
+++ b/erpnext/public/js/financial_statements.js
@@ -74,15 +74,7 @@
 			"fieldname":"finance_book",
 			"label": __("Finance Book"),
 			"fieldtype": "Link",
-			"options": "Finance Book",
-			"get_query": function() {
-				var company = frappe.query_report_filters_by_name.company.get_value();
-				return {
-					"filters": {
-						"company": company,
-					}
-				};
-			}
+			"options": "Finance Book"
 		},
 		{
 			"fieldname":"from_fiscal_year",