Merge branch 'develop' into call-summary-dialog
diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js
index 9560b2a..70f193e 100644
--- a/erpnext/accounts/report/accounts_payable/accounts_payable.js
+++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js
@@ -8,6 +8,7 @@
 			"label": __("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
+			"reqd": 1,
 			"default": frappe.defaults.get_user_default("Company")
 		},
 		{
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js
index 27c7993..3661afe 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js
@@ -8,6 +8,7 @@
 			"label": __("Company"),
 			"fieldtype": "Link",
 			"options": "Company",
+			"reqd": 1,
 			"default": frappe.defaults.get_user_default("Company")
 		},
 		{
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
index 7127663..f0769f6 100755
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py
@@ -541,10 +541,11 @@
 			conditions.append("""cost_center in (select name from `tabCost Center` where
 				lft >= {0} and rgt <= {1})""".format(lft, rgt))
 
-		accounts = [d.name for d in frappe.get_all("Account",
-			filters={"account_type": account_type, "company": self.filters.company})]
-		conditions.append("account in (%s)" % ','.join(['%s'] *len(accounts)))
-		values += accounts
+		if self.filters.company:
+			accounts = [d.name for d in frappe.get_all("Account",
+				filters={"account_type": account_type, "company": self.filters.company})]
+			conditions.append("account in (%s)" % ','.join(['%s'] *len(accounts)))
+			values += accounts
 
 		return " and ".join(conditions), values
 
diff --git a/erpnext/assets/doctype/asset/asset_list.js b/erpnext/assets/doctype/asset/asset_list.js
index 8e262f1..3b95a17 100644
--- a/erpnext/assets/doctype/asset/asset_list.js
+++ b/erpnext/assets/doctype/asset/asset_list.js
@@ -1,3 +1,37 @@
 frappe.listview_settings['Asset'] = {
-	add_fields: ['image']
+	add_fields: ['status'],
+	get_indicator: function (doc) {
+		if (doc.status === "Fully Depreciated") {
+			return [__("Fully Depreciated"), "green", "status,=,Fully Depreciated"];
+
+		} else if (doc.status === "Partially Depreciated") {
+			return [__("Partially Depreciated"), "grey", "status,=,Partially Depreciated"];
+
+		} else if (doc.status === "Sold") {
+			return [__("Sold"), "green", "status,=,Sold"];
+
+		} else if (doc.status === "Scrapped") {
+			return [__("Scrapped"), "grey", "status,=,Scrapped"];
+
+		} else if (doc.status === "In Maintenance") {
+			return [__("In Maintenance"), "orange", "status,=,In Maintenance"];
+
+		} else if (doc.status === "Out of Order") {
+			return [__("Out of Order"), "grey", "status,=,Out of Order"];
+
+		} else if (doc.status === "Issue") {
+			return [__("Issue"), "orange", "status,=,Issue"];
+
+		} else if (doc.status === "Receipt") {
+			return [__("Receipt"), "green", "status,=,Receipt"];
+
+		} else if (doc.status === "Submitted") {
+			return [__("Submitted"), "blue", "status,=,Submitted"];
+
+		} else if (doc.status === "Draft") {
+			return [__("Draft"), "red", "status,=,Draft"];
+
+		}
+
+	},
 }
\ No newline at end of file