diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index f19aaf8..7c12ece 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -72,7 +72,7 @@
 
 	return out
 
-def set_address_details(out, party, party_type, doctype=None, company=None, party_address=None, shipping_address=None):  
+def set_address_details(out, party, party_type, doctype=None, company=None, party_address=None, shipping_address=None):
 	billing_address_field = "customer_address" if party_type == "Lead" \
 		else party_type.lower() + "_address"
 	out[billing_address_field] = party_address or get_default_address(party_type, party.name)
@@ -459,38 +459,61 @@
 
 def get_dashboard_info(party_type, party):
 	current_fiscal_year = get_fiscal_year(nowdate(), as_dict=True)
-	company = frappe.db.get_default("company") or frappe.get_all("Company")[0].name
-	party_account_currency = get_party_account_currency(party_type, party, company)
-	company_default_currency = get_default_currency() \
-		or frappe.get_cached_value('Company',  company,  'default_currency')
-
-	if party_account_currency==company_default_currency:
-		total_field = "base_grand_total"
-	else:
-		total_field = "grand_total"
 
 	doctype = "Sales Invoice" if party_type=="Customer" else "Purchase Invoice"
 
-	billing_this_year = frappe.db.sql("""
-		select sum({0})
-		from `tab{1}`
-		where {2}=%s and docstatus=1 and posting_date between %s and %s
-	""".format(total_field, doctype, party_type.lower()),
-	(party, current_fiscal_year.year_start_date, current_fiscal_year.year_end_date))
+	companies = frappe.db.sql("""
+		select distinct company from `tab{0}`
+		where docstatus =1 and {1} = %s
+		""".format(doctype, party_type.lower()), (party), as_dict=1)
 
-	total_unpaid = frappe.db.sql("""
-		select sum(debit_in_account_currency) - sum(credit_in_account_currency)
+	company_wise_info = []
+
+	company_wise_grand_total = frappe._dict(frappe.db.sql("""
+			select company, sum(grand_total)
+			from `tab{0}`
+			where {1}=%s and docstatus=1 and posting_date between %s and %s
+			group by company
+		""".format(doctype, party_type.lower()),
+		(party, current_fiscal_year.year_start_date, current_fiscal_year.year_end_date)))
+
+	company_wise_base_grand_total = frappe._dict(frappe.db.sql("""
+			select company, sum(base_grand_total)
+			from `tab{0}`
+			where {1}=%s and docstatus=1 and posting_date between %s and %s
+			group by company
+		""".format(doctype, party_type.lower()),
+		(party, current_fiscal_year.year_start_date, current_fiscal_year.year_end_date)))
+
+	company_wise_total_unpaid = frappe._dict(frappe.db.sql("""
+		select company, sum(debit_in_account_currency) - sum(credit_in_account_currency)
 		from `tabGL Entry`
-		where party_type = %s and party=%s""", (party_type, party))
+		where party_type = %s and party=%s
+		group by company""", (party_type, party)))
 
-	info = {}
-	info["billing_this_year"] = flt(billing_this_year[0][0]) if billing_this_year else 0
-	info["currency"] = party_account_currency
-	info["total_unpaid"] = flt(total_unpaid[0][0]) if total_unpaid else 0
-	if party_type == "Supplier":
-		info["total_unpaid"] = -1 * info["total_unpaid"]
+	for d in companies:
+		company_default_currency = frappe.db.get_value("Company", d.company, 'default_currency')
+		party_account_currency = get_party_account_currency(party_type, party, d.company)
 
-	return info
+		if party_account_currency==company_default_currency:
+			billing_this_year = flt(company_wise_base_grand_total.get(d.company))
+		else:
+			billing_this_year = flt(company_wise_grand_total.get(d.company))
+
+		total_unpaid = flt(company_wise_total_unpaid.get(d.company))
+
+		info = {}
+		info["billing_this_year"] = flt(billing_this_year) if billing_this_year else 0
+		info["currency"] = party_account_currency
+		info["total_unpaid"] = flt(total_unpaid) if total_unpaid else 0
+		info["company"] = d.company
+
+		if party_type == "Supplier":
+			info["total_unpaid"] = -1 * info["total_unpaid"]
+
+		company_wise_info.append(info)
+
+	return company_wise_info
 
 def get_party_shipping_address(doctype, name):
 	"""
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index baee68e..4f5470d 100644
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -103,12 +103,17 @@
 $.extend(erpnext.utils, {
 	set_party_dashboard_indicators: function(frm) {
 		if(frm.doc.__onload && frm.doc.__onload.dashboard_info) {
-			var info = frm.doc.__onload.dashboard_info;
-			frm.dashboard.add_indicator(__('Annual Billing: {0}',
-				[format_currency(info.billing_this_year, info.currency)]), 'blue');
-			frm.dashboard.add_indicator(__('Total Unpaid: {0}',
-				[format_currency(info.total_unpaid, info.currency)]),
-				info.total_unpaid ? 'orange' : 'green');
+			var company_wise_info = frm.doc.__onload.dashboard_info;
+			frm.dashboard.add_indicator(__('Company'));
+			frm.dashboard.add_indicator(__('Annual Billing'));
+			frm.dashboard.add_indicator(__('Total Unpaid'));
+			company_wise_info.forEach(function(info){
+				frm.dashboard.add_indicator(__('{0}',[info.company]));
+				frm.dashboard.add_indicator(__('{0}',
+					[format_currency(info.billing_this_year, info.currency)]));
+				frm.dashboard.add_indicator(__('{0}',
+					[format_currency(info.total_unpaid, info.currency)]));
+			});
 		}
 	},
 
