some buying listviews
diff --git a/erpnext/buying/doctype/indent/listview.js b/erpnext/buying/doctype/indent/listview.js
new file mode 100644
index 0000000..df78ea9
--- /dev/null
+++ b/erpnext/buying/doctype/indent/listview.js
@@ -0,0 +1,33 @@
+// render
+wn.doclistviews['Indent'] = wn.views.ListView.extend({
+ init: function(d) {
+ this._super(d)
+ this.fields = this.fields.concat([
+ "`tabIndent`.status",
+ "IFNULL(`tabIndent`.per_ordered, 0) as per_ordered",
+ "`tabIndent`.remark",
+ ]);
+ this.stats = this.stats.concat(['status', 'company']);
+ },
+
+ prepare_data: function(data) {
+ this._super(data);
+ if(['Stopped', 'Cancelled'].indexOf(data.status)!=-1) {
+ data.label_type = 'important';
+ } else if(data.status == 'Submitted') {
+ data.label_type = 'success';
+ }
+
+ data.status_html = repl('<span class="label label-%(label_type)s">%(status)s</span>', data);
+ },
+
+ columns: [
+ {width: '5%', content:'avatar'},
+ {width: '3%', content:'docstatus'},
+ {width: '17%', content:'name'},
+ {width: '53%', content:'status_html+tags+remark', css: {'color': '#aaa'}},
+ {width: '10%', content: 'per_ordered', type:'bar-graph', label:'Ordered'},
+ {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ ]
+});
+
diff --git a/erpnext/buying/doctype/purchase_order/listview.js b/erpnext/buying/doctype/purchase_order/listview.js
new file mode 100644
index 0000000..528fe60
--- /dev/null
+++ b/erpnext/buying/doctype/purchase_order/listview.js
@@ -0,0 +1,33 @@
+// render
+wn.doclistviews['Purchase Order'] = wn.views.ListView.extend({
+ init: function(d) {
+ this._super(d)
+ this.fields = this.fields.concat([
+ "`tabPurchase Order`.supplier_name",
+ "ifnull(`tabPurchase Order`.per_received,0) as per_received",
+ "ifnull(`tabPurchase Order`.per_billed,0) as per_billed",
+ "`tabPurchase Order`.currency",
+ "ifnull(`tabPurchase Order`.grand_total_import,0) as grand_total_import"
+ ]);
+ this.stats = this.stats.concat(['status', 'company']);
+ },
+
+ columns: [
+ {width: '5%', content:'avatar'},
+ {width: '3%', content:'docstatus'},
+ {width: '15%', content:'name'},
+ {width: '35%', content:'tags+supplier_name', css: {color:'#aaa'}},
+ {
+ width: '18%',
+ content: function(parent, data) {
+ $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_import))
+ },
+ css: {'text-align':'right'}
+ },
+ {width: '8%', content: 'per_received', type:'bar-graph', label:'Delivered'},
+ {width: '8%', content: 'per_billed', type:'bar-graph', label:'Billed'},
+ {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ ]
+
+});
+
diff --git a/erpnext/buying/doctype/supplier/listview.js b/erpnext/buying/doctype/supplier/listview.js
new file mode 100644
index 0000000..86e22d6
--- /dev/null
+++ b/erpnext/buying/doctype/supplier/listview.js
@@ -0,0 +1,23 @@
+// render
+wn.doclistviews['Supplier'] = wn.views.ListView.extend({
+ init: function(d) {
+ this._super(d)
+ this.fields = this.fields.concat([
+ "`tabSupplier`.supplier_type",
+ ]);
+ this.stats = this.stats.concat([]);
+ },
+
+ prepare_data: function(data) {
+ this._super(data);
+ },
+
+ columns: [
+ {width: '5%', content:'avatar'},
+ {width: '50%', content:'name'},
+ {width: '10%', content:'tags'},
+ {width: '23%', content:'supplier_type', css: {'color': '#aaa'}},
+ {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ ]
+});
+
diff --git a/erpnext/stock/doctype/item/listview.js b/erpnext/stock/doctype/item/listview.js
index af41abf..7f0dbc8 100644
--- a/erpnext/stock/doctype/item/listview.js
+++ b/erpnext/stock/doctype/item/listview.js
@@ -6,17 +6,18 @@
"`tabItem`.item_name",
"`tabItem`.description",
]);
+ this.stats = this.stats.concat(['default_warehouse', 'brand']);
},
prepare_data: function(data) {
this._super(data);
- data.description = repl("[%(item_name)s] %(description)s", data);
+ data.description = repl("%(item_name)s | %(description)s", data);
},
columns: [
{width: '5%', content:'avatar'},
{width: '20%', content:'name'},
- {width: '63%', content:'description', css: {'color': '#aaa'}},
+ {width: '63%', content:'tags+description', css: {'color': '#aaa'}},
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
]
});