Merge branch 'shf_rename'
Conflicts: erpnext/stock/doctype/item/listview.js
This commit is contained in:
commit
00175612ac
@ -7,7 +7,7 @@ wn.doclistviews['Journal Voucher'] = wn.views.ListView.extend({
|
||||
'`tabJournal Voucher`.total_debit',
|
||||
'`tabJournal Voucher`.company',
|
||||
]);
|
||||
this.stats = this.stats.concat(['voucher_type']);
|
||||
this.stats = this.stats.concat(['voucher_type', 'company']);
|
||||
},
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
|
@ -4,8 +4,9 @@ wn.doclistviews['Supplier'] = wn.views.ListView.extend({
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabSupplier`.supplier_type",
|
||||
"`tabSupplier`.supplier_name",
|
||||
]);
|
||||
this.stats = this.stats.concat([]);
|
||||
//this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
@ -14,7 +15,8 @@ wn.doclistviews['Supplier'] = wn.views.ListView.extend({
|
||||
|
||||
columns: [
|
||||
{width: '5%', content:'avatar'},
|
||||
{width: '50%', content:'name'},
|
||||
{width: '20%', content:'name'},
|
||||
{width: '30%', content:'supplier_name'},
|
||||
{width: '10%', content:'tags'},
|
||||
{width: '23%', content:'supplier_type', css: {'color': '#aaa'}},
|
||||
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
||||
|
31
erpnext/hr/doctype/appraisal/listview.js
Normal file
31
erpnext/hr/doctype/appraisal/listview.js
Normal file
@ -0,0 +1,31 @@
|
||||
// render
|
||||
wn.doclistviews['Appraisal'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabAppraisal`.employee_name",
|
||||
"`tabAppraisal`.start_date",
|
||||
"`tabAppraisal`.end_date",
|
||||
"`tabAppraisal`.total_score",
|
||||
"`tabAppraisal`.status",
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.start_date = wn.datetime.str_to_user(data.start_date);
|
||||
data.end_date = wn.datetime.str_to_user(data.end_date);
|
||||
data.date_range = data.start_date + " to " + data.end_date;
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '15%', content: 'name'},
|
||||
{width: '28%', content: 'employee_name'},
|
||||
{width: '12%', content: 'status+tags'},
|
||||
{width: '12%', content: 'total_score', css: {'text-align': 'right'}},
|
||||
{width: '30%', content:'date_range',
|
||||
css: {'text-align': 'right', 'color': '#777'}},
|
||||
]
|
||||
});
|
28
erpnext/hr/doctype/attendance/listview.js
Normal file
28
erpnext/hr/doctype/attendance/listview.js
Normal file
@ -0,0 +1,28 @@
|
||||
// render
|
||||
wn.doclistviews['Attendance'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabAttendance`.att_date",
|
||||
"`tabAttendance`.employee_name",
|
||||
"`tabAttendance`.`status`",
|
||||
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.att_date = wn.datetime.str_to_user(data.att_date);
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content:'docstatus'},
|
||||
{width: '12%', content:'name'},
|
||||
{width: '50%', content:'employee_name'},
|
||||
{width: '13%', content:'status'},
|
||||
{width: '10%', content:'tags'},
|
||||
//{width: '23%', content:'supplier_type', css: {'color': '#aaa'}},
|
||||
{width: '12%', content:'att_date', css: {'text-align': 'right', 'color':'#777'}}
|
||||
]
|
||||
});
|
46
erpnext/hr/doctype/employee/listview.js
Normal file
46
erpnext/hr/doctype/employee/listview.js
Normal file
@ -0,0 +1,46 @@
|
||||
// render
|
||||
wn.doclistviews['Employee'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabEmployee`.employee_name",
|
||||
"`tabEmployee`.employee_number",
|
||||
"`tabEmployee`.employment_type",
|
||||
"`tabEmployee`.designation",
|
||||
"`tabEmployee`.department",
|
||||
"`tabEmployee`.branch",
|
||||
"`tabEmployee`.company",
|
||||
"`tabEmployee`.reports_to",
|
||||
"`tabEmployee`.date_of_joining",
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
|
||||
data.employee_name = data.employee_name
|
||||
+ (data.employee_number ? ' [' + data.employee_number + ']' : '');
|
||||
|
||||
data.date_of_joining = wn.datetime.str_to_user(data.date_of_joining);
|
||||
data.designation = data.designation
|
||||
+ (data.employment_type ? ' [' + data.employment_type + ']' : '');
|
||||
|
||||
var concat_list = [];
|
||||
data.designation && concat_list.push(data.designation);
|
||||
data.department && concat_list.push(data.department);
|
||||
data.company && concat_list.push(data.company);
|
||||
data.branch && concat_list.push(data.branch);
|
||||
data.description = concat_list.join(", ");
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '12%', content: 'name'},
|
||||
{width: '25%', content: 'employee_name'},
|
||||
{width: '48%', content: 'description+tags',
|
||||
css: {'color': '#aaa'}},
|
||||
{width: '12%', content:'date_of_joining',
|
||||
css: {'text-align': 'right', 'color': '#777'}},
|
||||
]
|
||||
});
|
41
erpnext/hr/doctype/expense_claim/listview.js
Normal file
41
erpnext/hr/doctype/expense_claim/listview.js
Normal file
@ -0,0 +1,41 @@
|
||||
// render
|
||||
wn.doclistviews['Expense Claim'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabExpense Claim`.employee_name",
|
||||
"`tabExpense Claim`.posting_date",
|
||||
"`tabExpense Claim`.approval_status",
|
||||
"`tabExpense Claim`.total_claimed_amount",
|
||||
"`tabExpense Claim`.total_sanctioned_amount",
|
||||
"`tabExpense Claim`.company",
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.posting_date = wn.datetime.str_to_user(data.posting_date);
|
||||
data.employee_name = data.employee_name + 'claimed '
|
||||
+ wn.boot.company[data.company].default_currency + ' '
|
||||
+ fmt_money(data.total_claimed_amount);
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '5%', content: 'avatar'},
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '12%', content: 'name'},
|
||||
{width: '44%', content: 'employee_name+tags'},
|
||||
{width: '10%', content: 'approval_status'},
|
||||
{
|
||||
width: '12%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(wn.boot.company[data.company].default_currency
|
||||
+ ' ' + fmt_money(data.total_sanctioned_amount));
|
||||
},
|
||||
css: {'text-align': 'right'},
|
||||
},
|
||||
{width: '12%', content: 'posting_date',
|
||||
css: {'text-align': 'right', 'color': '#777'}},
|
||||
]
|
||||
});
|
36
erpnext/hr/doctype/leave_application/listview.js
Normal file
36
erpnext/hr/doctype/leave_application/listview.js
Normal file
@ -0,0 +1,36 @@
|
||||
// render
|
||||
wn.doclistviews['Leave Application'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabLeave Application`.employee_name",
|
||||
"`tabLeave Application`.total_leave_days",
|
||||
"`tabLeave Application`.from_date",
|
||||
"`tabLeave Application`.to_date",
|
||||
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.from_date = wn.datetime.str_to_user(data.from_date);
|
||||
data.to_date = wn.datetime.str_to_user(data.to_date);
|
||||
data.date_range = (data.from_date === data.to_date)
|
||||
? data.from_date
|
||||
: data.from_date + " to " + data.to_date;
|
||||
data.total_leave_days = data.total_leave_days<=1
|
||||
? data.total_leave_days + " day"
|
||||
: data.total_leave_days + " days"
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '5%', content:'avatar'},
|
||||
{width: '3%', content:'docstatus'},
|
||||
{width: '12%', content:'name'},
|
||||
{width: '40%', content:'employee_name+tags'},
|
||||
{width: '10%', content:'total_leave_days',
|
||||
css: {'color':'#777'}},
|
||||
{width: '30%', content:'date_range'},
|
||||
]
|
||||
});
|
46
erpnext/hr/doctype/salary_slip/listview.js
Normal file
46
erpnext/hr/doctype/salary_slip/listview.js
Normal file
@ -0,0 +1,46 @@
|
||||
// render
|
||||
wn.doclistviews['Salary Slip'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabSalary Slip`.employee_name",
|
||||
"`tabSalary Slip`.designation",
|
||||
"`tabSalary Slip`.branch",
|
||||
"`tabSalary Slip`.rounded_total",
|
||||
"`tabSalary Slip`.company",
|
||||
"`tabSalary Slip`.month",
|
||||
"`tabSalary Slip`.fiscal_year",
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
var concat_list = [];
|
||||
data.designation && concat_list.push(data.designation);
|
||||
data.branch && concat_list.push(data.branch);
|
||||
data.description = concat_list.join(", ");
|
||||
data.month = month_list[cint(data.month)-1] + " [" + data.fiscal_year + "]";
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '14%', content: 'name'},
|
||||
{width: '20%', content: 'employee_name'},
|
||||
{width: '30%', content: 'description+tags', css: {'color': '#aaa'}},
|
||||
{width: '17%', content:'month', css: {'text-align': 'right', 'color':'#aaa'}},
|
||||
{
|
||||
width: '16%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(
|
||||
(
|
||||
data.company
|
||||
? wn.boot.company[data.company].default_currency
|
||||
: sys_defaults.currency
|
||||
)
|
||||
+ ' ' + fmt_money(data.rounded_total));
|
||||
},
|
||||
css: {'text-align': 'right'},
|
||||
},
|
||||
]
|
||||
});
|
47
erpnext/production/doctype/bom/listview.js
Normal file
47
erpnext/production/doctype/bom/listview.js
Normal file
@ -0,0 +1,47 @@
|
||||
// render
|
||||
wn.doclistviews['BOM'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d);
|
||||
this.fields = this.fields.concat([
|
||||
'`tabBOM`.item',
|
||||
'`tabBOM`.uom',
|
||||
'IFNULL(`tabBOM`.quantity, 0) as quantity',
|
||||
'`tabBOM`.is_active',
|
||||
'`tabBOM`.costing_date',
|
||||
'`tabBOM`.total_cost',
|
||||
'`tabBOM`.description',
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.costing_date = wn.datetime.str_to_user(data.costing_date);
|
||||
data.description = (data.is_active === 'Yes' ? '' : '[Inactive] ') + data.description;
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '15%', content: 'name'},
|
||||
{width: '15%', content: 'item'},
|
||||
{width: '26%', content: 'description+tags'},
|
||||
{
|
||||
width: '12%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(data.quantity + ' ' + data.uom)
|
||||
},
|
||||
css: {'text-align':'right'},
|
||||
},
|
||||
{
|
||||
width: '20%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(sys_defaults.currency + " "
|
||||
+ fmt_money(data.total_cost));
|
||||
},
|
||||
css: {'text-align': 'right'},
|
||||
},
|
||||
{width: '12%', content:'costing_date', css: {
|
||||
'text-align': 'right', 'color':'#777'
|
||||
}},
|
||||
]
|
||||
});
|
39
erpnext/production/doctype/production_order/listview.js
Normal file
39
erpnext/production/doctype/production_order/listview.js
Normal file
@ -0,0 +1,39 @@
|
||||
// render
|
||||
wn.doclistviews['Production Order'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d);
|
||||
this.fields = this.fields.concat([
|
||||
'`tabProduction Order`.production_item',
|
||||
'`tabProduction Order`.fg_warehouse',
|
||||
'`tabProduction Order`.stock_uom',
|
||||
'IFNULL(`tabProduction Order`.qty, 0) as qty',
|
||||
'`tabProduction Order`.posting_date',
|
||||
'`tabProduction Order`.status',
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.posting_date = wn.datetime.str_to_user(data.posting_date);
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '5%', content: 'avatar'},
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '20%', content: 'name'},
|
||||
{width: '16%', content: 'production_item'},
|
||||
{width: '20%', content: 'fg_warehouse'},
|
||||
{width: '12%', content: 'status+tags'},
|
||||
{
|
||||
width: '12%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(data.qty + ' ' + data.stock_uom)
|
||||
},
|
||||
css: {'text-align':'right'}
|
||||
},
|
||||
{width: '12%', content:'posting_date', css: {
|
||||
'text-align': 'right', 'color':'#777'
|
||||
}},
|
||||
]
|
||||
});
|
@ -12,6 +12,9 @@ wn.doclistviews['Item'] = wn.views.ListView.extend({
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.description = repl("%(item_name)s | %(description)s", data);
|
||||
if(data.description && data.description.length > 50) {
|
||||
data.description = '<span title="'+data.description+'">' + data.description.substr(0,50) + '...</span>';
|
||||
}
|
||||
},
|
||||
|
||||
columns: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user