mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
finished listviews
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-01-22 15:11:37",
|
||||
"creation": "2013-01-29 17:54:10",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-29 16:27:59",
|
||||
"modified": "2013-01-29 18:16:48",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -71,6 +71,7 @@
|
||||
"fieldname": "supplier_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Name",
|
||||
"read_only": 1
|
||||
},
|
||||
@@ -402,6 +403,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "grand_total_import",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Grand Total (Import)",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "grand_total_import",
|
||||
@@ -725,7 +727,8 @@
|
||||
"description": "% of materials received against this Purchase Order",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "per_received",
|
||||
"fieldtype": "Float",
|
||||
"fieldtype": "Percent",
|
||||
"in_list_view": 1,
|
||||
"label": "% Received",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "per_received",
|
||||
@@ -738,7 +741,8 @@
|
||||
"description": "% of materials billed against this Purchase Order.",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "per_billed",
|
||||
"fieldtype": "Float",
|
||||
"fieldtype": "Percent",
|
||||
"in_list_view": 1,
|
||||
"label": "% Billed",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "per_billed",
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
// 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",
|
||||
"`tabPurchase Order`.transaction_date",
|
||||
|
||||
]);
|
||||
this.stats = this.stats.concat(['status', 'company']);
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'check'},
|
||||
{width: '5%', content: 'avatar'},
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '15%', content: 'name'},
|
||||
{width: '28%', content: 'supplier_name+tags', css: {color:'#222'}},
|
||||
{
|
||||
width: '18%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(format_currency(data.grand_total_import, data.currency))
|
||||
},
|
||||
css: {'text-align':'right'}
|
||||
},
|
||||
{width: '8%', content: 'per_received', type:'bar-graph', label:'Received'},
|
||||
{width: '8%', content: 'per_billed', type:'bar-graph', label:'Billed'},
|
||||
{width: '12%', content:'transaction_date',
|
||||
css: {'text-align': 'right', 'color':'#777'},
|
||||
title: "Purchase Order Date", type: "date"}
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-21 18:19:20",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-23 16:59:33",
|
||||
"modified": "2013-01-29 18:14:11",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -183,6 +183,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "requested_by",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 0,
|
||||
"label": "Requested By",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "requested_by",
|
||||
@@ -226,6 +227,7 @@
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Status",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "status",
|
||||
@@ -242,7 +244,8 @@
|
||||
"description": "% of materials ordered against this Purchase Requisition",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "per_ordered",
|
||||
"fieldtype": "Float",
|
||||
"fieldtype": "Percent",
|
||||
"in_list_view": 1,
|
||||
"label": "% Ordered",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "per_ordered",
|
||||
@@ -280,6 +283,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "remark",
|
||||
"fieldtype": "Small Text",
|
||||
"in_list_view": 1,
|
||||
"label": "Remarks",
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "remark",
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
// render
|
||||
wn.doclistviews['Purchase Request'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabPurchase Request`.status",
|
||||
"IFNULL(`tabPurchase Request`.per_ordered, 0) as per_ordered",
|
||||
"`tabPurchase Request`.remark",
|
||||
"`tabPurchase Request`.transaction_date",
|
||||
]);
|
||||
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: '3%', content: 'check'},
|
||||
{width: '5%', content:'avatar'},
|
||||
{width: '3%', content:'docstatus'},
|
||||
{width: '17%', content:'name'},
|
||||
{width: '50%', content:'status_html+remark+tags', css: {'color': '#222'}},
|
||||
{width: '10%', content: 'per_ordered', type:'bar-graph', label:'Ordered'},
|
||||
{width: '12%', content:'transaction_date',
|
||||
css: {'text-align': 'right', 'color':'#777'},
|
||||
title: "Quotation Date", type: "date"}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-01-21 18:19:20",
|
||||
"creation": "2013-01-29 17:54:11",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-29 16:27:59",
|
||||
"modified": "2013-01-29 18:11:12",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -71,6 +71,7 @@
|
||||
"fieldname": "supplier_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Name",
|
||||
"read_only": 1
|
||||
},
|
||||
@@ -357,6 +358,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "grand_total_import",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Grand Total (Import)",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "grand_total_import",
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
// render
|
||||
wn.doclistviews['Supplier Quotation'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabSupplier Quotation`.supplier_name",
|
||||
"`tabSupplier Quotation`.currency",
|
||||
"ifnull(`tabSupplier Quotation`.grand_total_import,0) as grand_total_import",
|
||||
"`tabSupplier Quotation`.transaction_date",
|
||||
]);
|
||||
this.stats = this.stats.concat(['status', 'company']);
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'check'},
|
||||
{width: '5%', content:'avatar'},
|
||||
{width: '3%', content:'docstatus'},
|
||||
{width: '15%', content:'name'},
|
||||
{width: '44%', content:'supplier_name+tags', css: {color:'#222'}},
|
||||
{
|
||||
width: '18%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(format_currency(data.grand_total_import, data.currency))
|
||||
},
|
||||
css: {'text-align':'right'}
|
||||
},
|
||||
{width: '12%', content:'transaction_date',
|
||||
css: {'text-align': 'right', 'color':'#777'},
|
||||
title: "Supplier Quotation Date", type: "date"}
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user