mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 07:32:50 +00:00
restructured erpnext and deleted unwanted
This commit is contained in:
0
hr/search_criteria/pending_appraisals/__init__.py
Normal file
0
hr/search_criteria/pending_appraisals/__init__.py
Normal file
41
hr/search_criteria/pending_appraisals/pending_appraisals.js
Normal file
41
hr/search_criteria/pending_appraisals/pending_appraisals.js
Normal file
@@ -0,0 +1,41 @@
|
||||
report.customize_filters = function() {
|
||||
this.hide_all_filters();
|
||||
|
||||
this.add_filter({fieldname:'approver', label:'Approver', fieldtype:'Link', options:'Profile', ignore : 1, parent:'Appraisal'});
|
||||
this.filter_fields_dict['Appraisal'+FILTER_SEP +'Approver'].df.in_first_page = 1;
|
||||
|
||||
this.filter_fields_dict['Appraisal'+FILTER_SEP +'Employee'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Appraisal'+FILTER_SEP +'Employee Name'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Appraisal'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Appraisal'+FILTER_SEP +'From Start Date'].df.filter_hide = 0;
|
||||
//this.filter_fields_dict['Appraisal'+FILTER_SEP +'To Start Date'].df.filter_hide = 0;
|
||||
//this.filter_fields_dict['Appraisal'+FILTER_SEP +'From End Date'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Appraisal'+FILTER_SEP +'To End Date'].df.filter_hide = 0;
|
||||
}
|
||||
this.mytabs.items['Select Columns'].hide();
|
||||
|
||||
report.get_query = function(){
|
||||
//get filter values
|
||||
emp = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Employee'].get_value();
|
||||
emp_nm = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Employee Name'].get_value();
|
||||
frm_start_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'From Start Date'].get_value();
|
||||
//to_start_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'To Start Date'].get_value();
|
||||
//frm_end_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'From End Date'].get_value();
|
||||
to_end_date = this.filter_fields_dict['Appraisal'+FILTER_SEP+'To End Date'].get_value();
|
||||
fiscal_year = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Fiscal Year'].get_value();
|
||||
approver = this.filter_fields_dict['Appraisal'+FILTER_SEP+'Approver'].get_value();
|
||||
|
||||
var cond = '';
|
||||
if(emp) cond += ' AND `tabAppraisal`.employee = "'+emp+'"';
|
||||
if(emp_nm) cond += ' AND `tabAppraisal`.employee_name = "'+emp_nm+'"';
|
||||
if(frm_start_date) cond += ' AND `tabAppraisal`.start_date >= "'+frm_start_date+'"';
|
||||
//if(to_start_date) cond += ' AND `tabAppraisal`.start_date <= "'+to_start_date+'"';
|
||||
//if(frm_end_date) cond += ' AND `tabAppraisal`.end_date >= "'+frm_end_date+'"';
|
||||
if(to_end_date) cond += ' AND `tabAppraisal`.end_date <= "'+to_end_date+'"';
|
||||
if(fiscal_year !='') cond += ' AND `tabAppraisal`.fiscal_year = "'+fiscal_year+'"';
|
||||
if(approver) cond += ' AND `tabAppraisal`.kra_approver = "'+approver+'"';
|
||||
|
||||
//var q = 'SELECT DISTINCT `tabAppraisal`.name, `tabAppraisal`.status, `tabAppraisal`.employee, `tabAppraisal`.employee_name, `tabAppraisal`.start_date,`tabAppraisal`.end_date,`tabAppraisal`.kra_approver, `tabAppraisal`.total_score FROM `tabAppraisal` WHERE `tabAppraisal`.status= "Submitted" AND `tabAppraisal`.kra_approver = "'+ user+'"'+cond;
|
||||
var q = 'SELECT DISTINCT `tabAppraisal`.name, `tabAppraisal`.employee, `tabAppraisal`.employee_name, `tabAppraisal`.start_date,`tabAppraisal`.end_date,`tabAppraisal`.kra_approver, `tabAppraisal`.total_score FROM `tabAppraisal` WHERE `tabAppraisal`.status= "Submitted"'+cond;
|
||||
return q;
|
||||
}
|
||||
37
hr/search_criteria/pending_appraisals/pending_appraisals.txt
Normal file
37
hr/search_criteria/pending_appraisals/pending_appraisals.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': '',
|
||||
'add_tab': None,
|
||||
'columns': '',
|
||||
'creation': '2010-09-01 15:47:57',
|
||||
'criteria_name': 'Pending Appraisals',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': 0,
|
||||
'doc_type': 'Appraisal',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Appraisal\x01Submitted':1,'Appraisal\x01Status':'Submitted','Appraisal\x01Fiscal Year':'','Appraisal\x01Approver':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-09-01 14:19:02',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'pending_appraisals',
|
||||
'owner': 'ashwini@webnotestech.com',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': None,
|
||||
'server_script': None,
|
||||
'sort_by': '`tabAppraisal`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user