setting list_views

This commit is contained in:
Rushabh Mehta
2013-01-29 17:53:29 +05:30
parent 6abb2e67e9
commit 08da1a0a3d
105 changed files with 575 additions and 1736 deletions

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:12",
"docstatus": 0,
"modified": "2013-01-22 14:55:57",
"modified": "2013-01-29 17:50:21",
"modified_by": "Administrator",
"owner": "ashwini@webnotestech.com"
},
@@ -76,6 +76,7 @@
"fieldname": "employee_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "For Employee Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data",
@@ -96,6 +97,7 @@
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"oldfieldname": "status",
@@ -111,6 +113,7 @@
"fieldname": "start_date",
"fieldtype": "Date",
"in_filter": 1,
"in_list_view": 1,
"label": "Start Date",
"oldfieldname": "start_date",
"oldfieldtype": "Date",
@@ -159,6 +162,7 @@
"doctype": "DocField",
"fieldname": "total_score",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Total Score (Out of 5)",
"no_copy": 1,
"oldfieldname": "total_score",

View File

@@ -1,32 +0,0 @@
// 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: 'check'},
{width: '3%', content: 'docstatus'},
{width: '15%', content: 'name'},
{width: '25%', 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'}},
]
});

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:13",
"docstatus": 0,
"modified": "2013-01-22 14:16:20",
"modified": "2013-01-29 17:52:06",
"modified_by": "Administrator",
"owner": "ashwini@webnotestech.com"
},
@@ -73,6 +73,7 @@
"doctype": "DocField",
"fieldname": "employee_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Employee Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data"
@@ -82,6 +83,7 @@
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"oldfieldname": "status",
@@ -95,6 +97,7 @@
"fieldname": "leave_type",
"fieldtype": "Link",
"hidden": 1,
"in_list_view": 1,
"label": "Leave Type",
"oldfieldname": "leave_type",
"oldfieldtype": "Link",

View File

@@ -1,29 +0,0 @@
// 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: 'check'},
{width: '3%', content:'docstatus'},
{width: '12%', content:'name'},
{width: '47%', 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'}}
]
});

View File

@@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:13",
"creation": "2013-01-23 19:57:17",
"docstatus": 0,
"modified": "2013-01-22 14:56:01",
"modified": "2013-01-29 17:47:25",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -56,6 +56,7 @@
"doctype": "DocField",
"fieldname": "image_view",
"fieldtype": "Image",
"in_list_view": 1,
"label": "Image View",
"options": "image"
},
@@ -95,6 +96,7 @@
"doctype": "DocField",
"fieldname": "employee_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Full Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data",
@@ -191,6 +193,7 @@
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Status",
"oldfieldname": "status",
"oldfieldtype": "Select",
@@ -203,6 +206,7 @@
"fieldname": "employment_type",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Employment Type",
"oldfieldname": "employment_type",
"oldfieldtype": "Link",

View File

@@ -1,56 +0,0 @@
// 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",
"`tabEmployee`.status",
]);
this.stats = this.stats.concat(['status', '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(", ");
if(data.status=='Left') {
data.label_type = 'important';
} else if(data.status=='Active') {
data.label_type = 'success';
}
data.status_html = repl('<span class="label label-%(label_type)s" \
support_list_status="%(status)s">%(status)s</span>', data);
},
columns: [
{width: '3%', content: 'check'},
{width: '12%', content: 'name'},
{width: '25%', content: 'employee_name'},
{width: '10%', content: 'status_html'},
{width: '38%', content: 'description+tags',
css: {'color': '#aaa'}},
{width: '12%', content:'date_of_joining',
css: {'text-align': 'right', 'color': '#777'}},
]
});

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:14",
"docstatus": 0,
"modified": "2013-01-23 17:11:20",
"modified": "2013-01-29 16:27:51",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -47,7 +47,7 @@
"label": "Salary",
"oldfieldname": "salary",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
"options": "Company:company:default_currency"
},
{
"doctype": "DocField",

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:14",
"docstatus": 0,
"modified": "2013-01-23 17:11:20",
"modified": "2013-01-29 17:43:18",
"modified_by": "Administrator",
"owner": "harshada@webnotestech.com"
},
@@ -44,6 +44,7 @@
"fieldname": "approval_status",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Approval Status",
"no_copy": 1,
"oldfieldname": "approval_status",
@@ -72,11 +73,12 @@
"fieldname": "total_claimed_amount",
"fieldtype": "Currency",
"in_filter": 0,
"in_list_view": 1,
"label": "Total Claimed Amount",
"no_copy": 1,
"oldfieldname": "total_claimed_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1,
"reqd": 0,
"width": "160px"
@@ -86,11 +88,12 @@
"fieldname": "total_sanctioned_amount",
"fieldtype": "Currency",
"in_filter": 0,
"in_list_view": 1,
"label": "Total Sanctioned Amount",
"no_copy": 1,
"oldfieldname": "total_sanctioned_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1,
"width": "160px"
},
@@ -134,6 +137,7 @@
"fieldname": "employee_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Employee Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data",

View File

@@ -1,41 +0,0 @@
// 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 '
+ format_currency(data.total_claimed_amount, erpnext.get_currency(data.company));
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content: 'avatar'},
{width: '3%', content: 'docstatus'},
{width: '12%', content: 'name'},
{width: '41%', content: 'employee_name+tags'},
{width: '10%', content: 'approval_status'},
{
width: '12%',
content: function(parent, data) {
$(parent).html(format_currency(data.total_sanctioned_amount,
erpnext.get_currency(data.company)));
},
css: {'text-align': 'right'},
},
{width: '12%', content: 'posting_date',
css: {'text-align': 'right', 'color': '#777'}},
]
});

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:14",
"docstatus": 0,
"modified": "2013-01-23 17:11:20",
"modified": "2013-01-29 16:27:51",
"modified_by": "Administrator",
"owner": "harshada@webnotestech.com"
},
@@ -61,7 +61,7 @@
"label": "Claim Amount",
"oldfieldname": "claim_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"reqd": 1,
"width": "150px"
},
@@ -74,7 +74,7 @@
"no_copy": 1,
"oldfieldname": "sanctioned_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"width": "150px"
}
]

View File

@@ -1,77 +1,80 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2013-01-15 16:32:13",
"docstatus": 0,
"modified": "2013-01-29 17:44:52",
"modified_by": "Administrator",
"modified": "2013-01-15 17:40:29"
"owner": "Administrator"
},
{
"autoname": "field:applicant_name",
"allow_attach": 1,
"autoname": "field:applicant_name",
"description": "Applicant for a Job",
"doctype": "DocType",
"module": "HR",
"document_type": "Transaction",
"module": "HR",
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Job Applicant",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"parent": "Job Applicant",
"read": 1,
"cancel": 1,
"name": "__common__",
"create": 1,
"doctype": "DocPerm",
"write": 1,
"name": "__common__",
"parent": "Job Applicant",
"parentfield": "permissions",
"parenttype": "DocType",
"role": "HR User",
"report": 1,
"permlevel": 0,
"parentfield": "permissions"
"read": 1,
"report": 1,
"role": "HR User",
"write": 1
},
{
"name": "Job Applicant",
"doctype": "DocType"
"doctype": "DocType",
"name": "Job Applicant"
},
{
"doctype": "DocField",
"label": "Applicant Name",
"fieldname": "applicant_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Applicant Name",
"reqd": 1
},
{
"doctype": "DocField",
"label": "Email Id",
"fieldname": "email_id",
"fieldtype": "Data"
"fieldtype": "Data",
"label": "Email Id"
},
{
"doctype": "DocField",
"label": "Status",
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Status",
"options": "Open\nReplied\nRejected\nHold"
},
{
"doctype": "DocField",
"width": "50%",
"fieldname": "column_break_3",
"fieldtype": "Column Break"
"fieldtype": "Column Break",
"width": "50%"
},
{
"doctype": "DocField",
"label": "Job Opening",
"fieldname": "job_opening",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Job Opening",
"options": "Job Opening"
},
{
@@ -81,18 +84,19 @@
},
{
"doctype": "DocField",
"label": "Thread HTML",
"fieldname": "thread_html",
"fieldtype": "HTML"
"fieldtype": "HTML",
"label": "Thread HTML"
},
{
"print_hide": 1,
"no_copy": 1,
"doctype": "DocField",
"label": "File List",
"fieldname": "file_list",
"fieldtype": "Text",
"hidden": 1
"hidden": 1,
"in_list_view": 1,
"label": "File List",
"no_copy": 1,
"print_hide": 1
},
{
"doctype": "DocPerm"

View File

@@ -1,41 +0,0 @@
// render
wn.doclistviews['Job Applicant'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabJob Applicant`.status",
'`tabJob Applicant`.modified_by'
]);
this.stats = this.stats.concat(['status']);
this.show_hide_check_column();
},
label_style: {
"status": {
"Open": "danger",
"Hold": "info",
"Rejected": "plain",
}
},
prepare_data: function(data) {
this._super(data);
data.label_style = this.label_style.status[data.status];
if(data.label_style=="danger")
data.label_style = "important"
data.status_html = repl('<span class="label \
label-%(label_style)s">%(status)s</span>', data);
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content:'avatar_modified'},
{width: '30%', content:'name'},
{width: '50%', content:'status_html'},
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
]
});

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:14",
"docstatus": 0,
"modified": "2013-01-22 14:47:02",
"modified": "2013-01-29 17:41:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -42,6 +42,7 @@
"doctype": "DocField",
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"options": "Open\nApproved\nRejected",
@@ -61,6 +62,7 @@
"fieldname": "leave_type",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Leave Type",
"options": "link:Leave Type",
"permlevel": 0,
@@ -71,6 +73,7 @@
"doctype": "DocField",
"fieldname": "from_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "From Date",
"permlevel": 0,
"reqd": 1,
@@ -80,6 +83,7 @@
"doctype": "DocField",
"fieldname": "to_date",
"fieldtype": "Date",
"in_list_view": 0,
"label": "To Date",
"permlevel": 0,
"reqd": 1,
@@ -123,6 +127,7 @@
"fieldname": "employee_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Employee Name",
"permlevel": 0,
"read_only": 1,

View File

@@ -1,51 +0,0 @@
// render
wn.doclistviews['Leave Application'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabLeave Application`.status",
"`tabLeave Application`.employee_name",
"`tabLeave Application`.total_leave_days",
"`tabLeave Application`.from_date",
"`tabLeave Application`.to_date",
]);
this.stats = this.stats.concat(['company']);
},
label_style: {
"status": {
"Open": "danger",
"Approved": "success",
"Rejected": "info",
}
},
prepare_data: function(data) {
this._super(data);
data.label_style = this.label_style.status[data.status];
data.status_html = repl('<span class="label \
label-%(label_style)s">%(status)s</span>', 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: '3%', content: 'check'},
{width: '5%', content:'avatar'},
{width: '3%', content:'docstatus'},
{width: '15%', content:'status_html'},
{width: '12%', content:'name'},
{width: '25%', content:'employee_name+tags'},
{width: '25%', content:'date_range'},
{width: '12%', content:'modified'},
]
});

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
"modified": "2013-01-23 17:11:20",
"modified": "2013-01-29 17:38:08",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -61,6 +61,7 @@
"fieldname": "employee_name",
"fieldtype": "Data",
"in_filter": 1,
"in_list_view": 1,
"label": "Employee Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data",
@@ -153,6 +154,7 @@
"fieldname": "fiscal_year",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Fiscal Year",
"oldfieldname": "fiscal_year",
"oldfieldtype": "Data",
@@ -174,6 +176,7 @@
"fieldname": "month",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Month",
"oldfieldname": "month",
"oldfieldtype": "Select",
@@ -326,7 +329,7 @@
"label": "Arrear Amount",
"oldfieldname": "arrear_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
"options": "Company:company:default_currency"
},
{
"doctype": "DocField",
@@ -335,7 +338,7 @@
"label": "Leave Encashment Amount",
"oldfieldname": "encashment_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
"options": "Company:company:default_currency"
},
{
"doctype": "DocField",
@@ -344,7 +347,7 @@
"label": "Gross Pay",
"oldfieldname": "gross_pay",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1
},
{
@@ -354,7 +357,7 @@
"label": "Total Deduction",
"oldfieldname": "total_deduction",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1
},
{
@@ -372,7 +375,7 @@
"label": "Net Pay",
"oldfieldname": "net_pay",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1
},
{
@@ -380,7 +383,7 @@
"fieldname": "rounded_total",
"fieldtype": "Currency",
"label": "Rounded Total",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1
},
{

View File

@@ -1,42 +0,0 @@
// 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: 'check'},
{width: '3%', content: 'docstatus'},
{width: '14%', content: 'name'},
{width: '20%', content: 'employee_name'},
{width: '27%', content: 'description+tags', css: {'color': '#aaa'}},
{width: '17%', content:'month', css: {'text-align': 'right', 'color':'#aaa'}},
{
width: '16%',
content: function(parent, data) {
$(parent).html(format_currency(data.rounded_total,
erpnext.get_currency(data.company)));
},
css: {'text-align': 'right'},
},
]
});

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
"modified": "2013-01-23 17:11:20",
"modified": "2013-01-29 16:27:52",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -55,7 +55,7 @@
"label": "Amount",
"oldfieldname": "d_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1
},
{
@@ -63,7 +63,7 @@
"fieldname": "d_modified_amount",
"fieldtype": "Currency",
"label": "Modified Amount",
"options": "eval:erpnext.get_currency()"
"options": "Company:company:default_currency"
},
{
"doctype": "DocField",

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:15",
"docstatus": 0,
"modified": "2013-01-23 17:11:20",
"modified": "2013-01-29 16:27:52",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -55,7 +55,7 @@
"label": "Amount",
"oldfieldname": "e_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1
},
{
@@ -63,7 +63,7 @@
"fieldname": "e_modified_amount",
"fieldtype": "Currency",
"label": "Modified Amount",
"options": "eval:erpnext.get_currency()"
"options": "Company:company:default_currency"
},
{
"doctype": "DocField",

View File

@@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:15",
"creation": "2013-01-23 19:57:18",
"docstatus": 0,
"modified": "2013-01-23 17:11:20",
"modified": "2013-01-29 17:35:34",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -58,6 +58,7 @@
"doctype": "DocField",
"fieldname": "employee_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Employee Name",
"oldfieldname": "employee_name",
"oldfieldtype": "Data",
@@ -123,6 +124,7 @@
"fieldname": "is_active",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Is Active",
"oldfieldname": "is_active",
"oldfieldtype": "Select",
@@ -133,6 +135,7 @@
"doctype": "DocField",
"fieldname": "from_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "From Date",
"oldfieldname": "from_date",
"oldfieldtype": "Date",
@@ -142,6 +145,7 @@
"doctype": "DocField",
"fieldname": "to_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "To Date",
"oldfieldname": "to_date",
"oldfieldtype": "Date"
@@ -155,7 +159,7 @@
"label": "CTC",
"oldfieldname": "ctc",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"reqd": 1
},
{
@@ -235,7 +239,7 @@
"label": "Total Earning",
"oldfieldname": "total_earning",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1
},
{
@@ -245,7 +249,7 @@
"label": "Total Deduction",
"oldfieldname": "total_deduction",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1
},
{
@@ -259,7 +263,7 @@
"fieldname": "net_pay",
"fieldtype": "Currency",
"label": "Net Pay",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1
},
{

View File

@@ -1,42 +0,0 @@
// render
wn.doclistviews['Salary Structure'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabSalary Structure`.employee_name",
"`tabSalary Structure`.designation",
"`tabSalary Structure`.branch",
"`tabSalary Structure`.net_pay",
"`tabSalary Structure`.from_date",
"`tabSalary Structure`.to_date",
"`tabSalary Structure`.company"
]);
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.period = data.from_date + (data.to_date && ' to ' + data.to_date);
},
columns: [
{width: '2%', content: 'check'},
{width: '2%', content: 'docstatus'},
{width: '13%', content: 'name'},
{width: '18%', content: 'employee_name'},
{width: '24%', content: 'description+tags', css: {'color': '#aaa'}},
{width: '26%', content:'period', css: {'text-align': 'right', 'color':'#aaa'}},
{
width: '15%',
content: function(parent, data) {
$(parent).html(format_currency(data.net_pay,
erpnext.get_currency(data.company)));
},
css: {'text-align': 'right'},
},
]
});

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"modified": "2013-01-23 17:11:21",
"modified": "2013-01-29 16:27:52",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -42,7 +42,7 @@
"label": "Amount",
"oldfieldname": "d_modified_amt",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
"options": "Company:company:default_currency"
},
{
"doctype": "DocField",

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:16",
"docstatus": 0,
"modified": "2013-01-23 17:11:21",
"modified": "2013-01-29 16:27:52",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -44,7 +44,7 @@
"label": "Amount",
"oldfieldname": "modified_value",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
"options": "Company:company:default_currency"
},
{
"doctype": "DocField",