listview of purchase invoice and deletion of supplier
diff --git a/erpnext/accounts/doctype/purchase_invoice/listview.js b/erpnext/accounts/doctype/purchase_invoice/listview.js
index 54913a5..c0c6625 100644
--- a/erpnext/accounts/doctype/purchase_invoice/listview.js
+++ b/erpnext/accounts/doctype/purchase_invoice/listview.js
@@ -4,6 +4,7 @@
 		this._super(d);
 		this.fields = this.fields.concat([
 			'`tabPurchase Invoice`.supplier_name',
+			'`tabPurchase Invoice`.credit_to',
 			'`tabPurchase Invoice`.currency',
 			'IFNULL(`tabPurchase Invoice`.grand_total_import, 0) as grand_total_import',
 			'IFNULL(`tabPurchase Invoice`.grand_total, 0) as grand_total',
@@ -24,7 +25,13 @@
 		{width: '5%', content: 'avatar'},
 		{width: '3%', content: 'docstatus'},
 		{width: '15%', content: 'name'},
-		{width: '34%', content: 'supplier_name+tags', css: {color: '#222'}},
+		{
+			width: '34%', 
+			content: function(parent, data) {
+				$(parent).html(data.supplier_name?data.supplier_name:data.credit_to)
+			}, 
+			css: {color: '#222'}
+		},
 		{
 			width: '18%', 
 			content: function(parent, data) { 
diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py
index 67a2aae..20de364 100644
--- a/erpnext/buying/doctype/supplier/supplier.py
+++ b/erpnext/buying/doctype/supplier/supplier.py
@@ -163,10 +163,21 @@
 			delete from `tabCommunication`
 			where supplier = %s and customer is null""", self.doc.name)
 			
+	def delete_supplier_account(self):
+		"""delete supplier's ledger if exist and check balance before deletion"""
+		acc = sql("select name from `tabAccount` where master_type = 'Supplier' \
+			and master_name = %s and docstatus < 2", self.doc.name)
+		if acc:
+			from webnotes.model import delete_doc
+			delete_doc('Account', acc[0][0])
+			
+			
 	def on_trash(self):
 		self.delete_supplier_address()
 		self.delete_supplier_contact()
 		self.delete_supplier_communication()
+		self.delete_supplier_account()
+		
 		
 	# on rename
 	# ---------