restructured erpnext and deleted unwanted

This commit is contained in:
nabinhait
2011-07-01 13:34:41 +05:30
parent c1c54c9400
commit ec097975d0
1280 changed files with 54494 additions and 88652 deletions

View 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;
}

View 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'
}
]