From 1f5a58eed74aa7a48ff5810b7fd98768934ca914 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 22 Jun 2012 14:19:06 +0530 Subject: [PATCH] listview of sales invoice --- erpnext/accounts/doctype/sales_invoice/listview.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/listview.js b/erpnext/accounts/doctype/sales_invoice/listview.js index 8171b913b22..ae923f48596 100644 --- a/erpnext/accounts/doctype/sales_invoice/listview.js +++ b/erpnext/accounts/doctype/sales_invoice/listview.js @@ -4,6 +4,7 @@ wn.doclistviews['Sales Invoice'] = wn.views.ListView.extend({ this._super(d); this.fields = this.fields.concat([ "`tabSales Invoice`.customer_name", + "`tabSales Invoice`.debit_to", "ifnull(`tabSales Invoice`.outstanding_amount,0) as outstanding_amount", "ifnull(`tabSales Invoice`.grand_total,0) as grand_total", "`tabSales Invoice`.currency", @@ -19,7 +20,13 @@ wn.doclistviews['Sales Invoice'] = wn.views.ListView.extend({ {width: '5%', content: 'avatar'}, {width: '3%', content: 'docstatus'}, {width: '15%', content: 'name'}, - {width: '34%', content: 'customer_name+tags', css: {color:'#222'}}, + { + width: '34%', + content: function(parent, data) { + $(parent).html(data.customer_name?data.customer_name:data.debit_to) + }, + css: {color: '#222'} + }, { width: '18%', content: function(parent, data) {