mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 06:58:27 +00:00
setting list_views
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-10 16:34:17",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-23 17:11:21",
|
||||
"modified": "2013-01-29 17:01:19",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -215,11 +215,12 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "project_value",
|
||||
"fieldtype": "Currency",
|
||||
"in_list_view": 1,
|
||||
"label": "Project Value",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "project_value",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "eval:erpnext.get_currency()",
|
||||
"options": "Company:company:default_currency",
|
||||
"reqd": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
@@ -231,7 +232,7 @@
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "est_material_cost",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "eval:erpnext.get_currency()",
|
||||
"options": "Company:company:default_currency",
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
@@ -250,7 +251,7 @@
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "gross_margin_value",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "eval:erpnext.get_currency()",
|
||||
"options": "Company:company:default_currency",
|
||||
"reqd": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
@@ -262,7 +263,7 @@
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "per_gross_margin",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "eval:erpnext.get_currency()",
|
||||
"options": "Company:company:default_currency",
|
||||
"reqd": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
// render
|
||||
wn.doclistviews['Project'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d);
|
||||
this.fields = this.fields.concat([
|
||||
'`tabProject`.project_name',
|
||||
'`tabProject`.status',
|
||||
'`tabProject`.is_active',
|
||||
'`tabProject`.priority',
|
||||
'IFNULL(`tabProject`.project_value, 0) as project_value',
|
||||
'IFNULL(`tabProject`.per_gross_margin, 0) as per_gross_margin',
|
||||
'`tabProject`.creation',
|
||||
]);
|
||||
//this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.completion_date = wn.datetime.str_to_user(data.completion_date);
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'check'},
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '15%', content: 'name'},
|
||||
{width: '22%', content: 'project_name+tags'},
|
||||
{
|
||||
width: '20%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(data.status + " [" + data.priority + "] "
|
||||
+ (data.is_active=='No'?" [Inactive]":""));
|
||||
},
|
||||
},
|
||||
{
|
||||
width: '15%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(format_currency(data.project_value));
|
||||
},
|
||||
css: {'text-align': 'right'},
|
||||
},
|
||||
{
|
||||
width: '10%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(format_number(data.per_gross_margin) + " %");
|
||||
},
|
||||
css: {'text-align': 'right'},
|
||||
},
|
||||
{
|
||||
width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}
|
||||
},
|
||||
]
|
||||
});
|
||||
Reference in New Issue
Block a user