mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
restructured erpnext and deleted unwanted
This commit is contained in:
0
hr/search_criteria/__init__.py
Normal file
0
hr/search_criteria/__init__.py
Normal file
0
hr/search_criteria/employee_appraisals/__init__.py
Normal file
0
hr/search_criteria/employee_appraisals/__init__.py
Normal file
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Appraisal\x01ID,Appraisal\x01Status,Appraisal\x01Employee,Appraisal\x01Employee Name,Appraisal\x01Start Date,Appraisal\x01End Date,Appraisal\x01Approver,Appraisal\x01Total Score',
|
||||
'creation': '2010-09-01 15:47:57',
|
||||
'criteria_name': 'Employee Appraisals',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Appraisal',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Appraisal\x01Saved':1,'Appraisal\x01Submitted':1,'Appraisal\x01Status':'','Appraisal\x01Fiscal Year':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-09-01 14:18:42',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'employee_appraisals',
|
||||
'owner': 'ashwini@webnotestech.com',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': '',
|
||||
'server_script': None,
|
||||
'sort_by': '`tabAppraisal`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
0
hr/search_criteria/employee_details/__init__.py
Normal file
0
hr/search_criteria/employee_details/__init__.py
Normal file
37
hr/search_criteria/employee_details/employee_details.txt
Normal file
37
hr/search_criteria/employee_details/employee_details.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Employee\x01ID,Employee\x01Employee Name,Employee\x01Employee Code,Employee\x01Employee Number,Employee\x01Gender,Employee\x01Employment Type,Employee\x01Date of Joining,Employee\x01Scheduled Confirmation Date,Employee\x01Contract End Date,Employee\x01Status,Employee\x01Branch,Employee\x01Department,Employee\x01Designation,Employee\x01Grade,Employee\x01Company Email,Employee\x01Relieving Date',
|
||||
'creation': '2010-12-14 10:33:09',
|
||||
'criteria_name': 'Employee Details',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Employee',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Employee\x01Gender':'','Employee\x01Month of Birth':'','Employee\x01Status':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-04-01 14:27:15',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'employee_details',
|
||||
'owner': 'Administrator',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': '',
|
||||
'server_script': None,
|
||||
'sort_by': 'ID',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Employee Profile\x01Employee,Experience In Company Detail\x01Branch,Experience In Company Detail\x01Department,Experience In Company Detail\x01Designation,Experience In Company Detail\x01Grade,Experience In Company Detail\x01From Date,Experience In Company Detail\x01To Date',
|
||||
'creation': '2010-12-14 10:33:09',
|
||||
'criteria_name': 'Employee In Company Experience',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': 1,
|
||||
'doc_type': 'Experience In Company Detail',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': '{}',
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-04-01 14:27:15',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'employee_in_company_experience',
|
||||
'owner': 'Administrator',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': 'Employee Profile',
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': '',
|
||||
'server_script': '',
|
||||
'sort_by': 'ID',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
0
hr/search_criteria/employee_information/__init__.py
Normal file
0
hr/search_criteria/employee_information/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
for c in range(0,len(colnames)):
|
||||
l = (len(colnames[c])*9)
|
||||
if l < 150 : col_width = '150px'
|
||||
else: col_width = '%spx'%(l)
|
||||
|
||||
colwidths[c] = col_width
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Employee\x01ID,Employee\x01Employee Name,Employee\x01Employee Number,Employee\x01Date of Joining,Employee\x01Gender,Employee\x01Date of Birth,Employee\x01Employment Type,Employee\x01Scheduled Confirmation Date,Employee\x01Contract End Date,Employee\x01Status,Employee\x01Branch,Employee\x01Department,Employee\x01Designation,Employee\x01Grade,Employee\x01Reports to,Employee\x01Email (By company),Employee\x01Bank Name,Employee\x01Relieving Date',
|
||||
'creation': '2010-12-14 10:33:09',
|
||||
'criteria_name': 'Employee Information',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Employee',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Employee\x01Saved':1,'Employee\x01Submitted':1,'Employee\x01Gender':'','Employee\x01Month of Birth':'','Employee\x01Status':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-10-26 12:03:08',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'employee_information',
|
||||
'owner': 'harshada@webnotestech.com',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': '',
|
||||
'server_script': None,
|
||||
'sort_by': '`tabEmployee`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
0
hr/search_criteria/employees_birthday/__init__.py
Normal file
0
hr/search_criteria/employees_birthday/__init__.py
Normal file
37
hr/search_criteria/employees_birthday/employees_birthday.txt
Normal file
37
hr/search_criteria/employees_birthday/employees_birthday.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Employee\x01ID,Employee\x01Employee Name,Employee\x01Department,Employee\x01Gender,Employee\x01Date of Birth,Employee\x01Month of Birth',
|
||||
'creation': '2010-12-14 10:33:09',
|
||||
'criteria_name': "Employee's Birthday",
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Employee',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Employee\x01Saved':1,'Employee\x01Gender':'','Employee\x01Month of Birth':'May','Employee\x01Status':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-08-04 13:15:28',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'employees_birthday',
|
||||
'owner': 'Administrator',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': '',
|
||||
'server_script': None,
|
||||
'sort_by': '`tabEmployee`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
this.mytabs.items['Select Columns'].hide();
|
||||
|
||||
this.mytabs.tabs['More Filters'].hide();
|
||||
@@ -0,0 +1,20 @@
|
||||
leave_types = sql("select name from `tabLeave Type` where docstatus != 2 and name not in ('Compensatory Off','Leave Without Pay')")
|
||||
msgprint(leave_types)
|
||||
col=[]
|
||||
|
||||
for e in leave_types:
|
||||
l = (len(e)*9)
|
||||
if l < 150 : col_width = '150px'
|
||||
else: col_width = '%spx'%(l)
|
||||
|
||||
col.append([e,'Currency',col_width,''])
|
||||
|
||||
|
||||
col.append(['Total Balance','Currency','150px',''])
|
||||
|
||||
for c in col:
|
||||
colnames.append(c[0])
|
||||
coltypes.append(c[1])
|
||||
colwidths.append(c[2])
|
||||
coloptions.append(c[3])
|
||||
col_idx[c[0]] = len(colnames)
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Employee\x01ID',
|
||||
'creation': '2010-12-14 10:33:09',
|
||||
'criteria_name': 'Employeewise Balance Leave Report',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Employee',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Employee\x01Saved':1,'Employee\x01Submitted':1,'Employee\x01Gender':'','Employee\x01Month of Birth':'','Employee\x01Status':'Active'}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-12-01 10:39:56',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'employeewise_balance_leave_report',
|
||||
'owner': 'harshada@webnotestech.com',
|
||||
'page_len': 100,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': None,
|
||||
'server_script': None,
|
||||
'sort_by': '`tabEmployee`.`name`',
|
||||
'sort_order': 'ASC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Leave Transaction\x01ID,Leave Transaction\x01Fiscal Year,Leave Transaction\x01Employee,Leave Transaction\x01Leave Type,Leave Transaction\x01Previous Balance,Leave Transaction\x01Leave Transaction Type,Leave Transaction\x01Allocation Type,Leave Transaction\x01Deduction Type,Leave Transaction\x01Half Day,Leave Transaction\x01From Date,Leave Transaction\x01To Date,Leave Transaction\x01Encashment Date,Leave Transaction\x01Total Leave Days,Leave Transaction\x01Status',
|
||||
'creation': '2010-08-08 17:09:32',
|
||||
'criteria_name': 'Employeewise Leave Transaction Details',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Leave Transaction',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Leave Transaction\x01Saved':1,'Leave Transaction\x01Submitted':1}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-08-04 08:56:43',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'employeewise_leave_transaction_details',
|
||||
'owner': 'Administrator',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': '',
|
||||
'server_script': None,
|
||||
'sort_by': '`tabLeave Transaction`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
0
hr/search_criteria/expense_vouchers/__init__.py
Normal file
0
hr/search_criteria/expense_vouchers/__init__.py
Normal file
37
hr/search_criteria/expense_vouchers/expense_vouchers.txt
Normal file
37
hr/search_criteria/expense_vouchers/expense_vouchers.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Expense Voucher\x01ID,Expense Voucher\x01Approval Status,Expense Voucher\x01From Employee,Expense Voucher\x01Employee Name,Expense Voucher\x01Approver,Expense Voucher\x01Posting Date,Expense Voucher\x01Total Claimed Amount,Expense Voucher\x01Total Sanctioned Amount',
|
||||
'creation': '2010-09-03 16:45:06',
|
||||
'criteria_name': 'Expense Vouchers',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Expense Voucher',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Expense Voucher\x01Saved':1,'Expense Voucher\x01Submitted':1,'Expense Voucher\x01Approval Status':'','Expense Voucher\x01Fiscal Year':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-09-02 11:05:37',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'expense_vouchers',
|
||||
'owner': 'ashwini@webnotestech.com',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': '',
|
||||
'server_script': None,
|
||||
'sort_by': '`tabExpense Voucher`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,29 @@
|
||||
var get_month = function(){
|
||||
|
||||
var dict = {0:'Jan', 1:'Feb',2:'Mar',3:'Apr',4:'May',5:'June',6:'July',7:'Aug',8:'Sept',9:'Oct',10:'Nov',11:'Dec'}
|
||||
var d = new Date();
|
||||
return dict[d.getMonth()]
|
||||
|
||||
}
|
||||
|
||||
report.customize_filters = function() {
|
||||
this.hide_all_filters();
|
||||
this.add_filter({fieldname:'month', label:'Month', fieldtype:'Select', options:'Jan'+NEWLINE+'Feb'+NEWLINE+'Mar'+NEWLINE+'Apr'+NEWLINE+'May'+NEWLINE+'June'+NEWLINE+'July'+NEWLINE+'Aug'+NEWLINE+'Sept'+NEWLINE+'Oct'+NEWLINE+'Nov'+NEWLINE+'Dec',ignore : 1,parent:'Attendance', single_select:1});
|
||||
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Employee'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Month'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Company'].df.filter_hide = 0;
|
||||
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Employee'].df.in_first_page = 1;
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Month'].df.in_first_page = 1;
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Fiscal Year'].df.in_first_page = 1;
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Company'].df.in_first_page = 1;
|
||||
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Month'].df['report_default'] = get_month();
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
|
||||
this.filter_fields_dict['Attendance'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
|
||||
this.get_filter('Attendance', 'Fiscal Year').set_as_single();
|
||||
}
|
||||
this.mytabs.items['More Filters'].hide();
|
||||
this.mytabs.items['Select Columns'].hide();
|
||||
@@ -0,0 +1,76 @@
|
||||
#add column employee, employee name
|
||||
#--------------------------------------------------------------------------------------
|
||||
col =[['Employee','Link','155px','Employee'],['Employee Name','Data','150px','']]
|
||||
|
||||
for c in col:
|
||||
colnames.append(c[0])
|
||||
coltypes.append(c[1])
|
||||
colwidths.append(c[2])
|
||||
coloptions.append(c[3])
|
||||
|
||||
col_idx[c[0]] = len(colnames)-1
|
||||
|
||||
|
||||
#get feb months last day
|
||||
#--------------------------------------------------------------------------------------
|
||||
fy = filter_values.get('fiscal_year')
|
||||
month = filter_values.get('month')
|
||||
mdict = {'Jan':'01', 'Feb':'02','Mar':'03','Apr':'04','May':'05','June':'06','July':'07','Aug':'08','Sept':'09','Oct':'10','Nov':'11','Dec':'12'}
|
||||
|
||||
import webnotes.utils
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
ysd = sql("select year_start_date from `tabFiscal Year` where name = '%s' and docstatus !=2"%fy)[0][0]
|
||||
|
||||
last_date = webnotes.utils.get_last_day(ysd + relativedelta(months = (cint(ysd.strftime('%m'))>cint(mdict[month]) and (12-cint(ysd.strftime('%m'))+cint(mdict[month])) or (cint(mdict[month]) - cint(ysd.strftime('%m'))))))
|
||||
feb = last_date.strftime('%d')
|
||||
|
||||
|
||||
|
||||
#get last day and add columns
|
||||
#--------------------------------------------------------------------------------------
|
||||
dict = {'Jan': 31,'Feb':cint(feb), 'Mar':31,'Apr':30,'May':31,'June':30,'July':31,'Aug':31,'Sept':30,'Oct':31,'Nov':30,'Dec':31}
|
||||
|
||||
for i in range(0,dict[month]):
|
||||
colnames.append(i+1)
|
||||
coltypes.append('Data')
|
||||
colwidths.append('25px')
|
||||
|
||||
col_idx[c[0]] = len(colnames)-1
|
||||
|
||||
#add total present, absent days
|
||||
#--------------------------------------------------------------------------------------
|
||||
tot_col =[['Total Present Days','Data','120px'],['Total Absent Days','Data','120px']]
|
||||
|
||||
for c in tot_col:
|
||||
colnames.append(c[0])
|
||||
coltypes.append(c[1])
|
||||
colwidths.append(c[2])
|
||||
|
||||
col_idx[c[0]] = len(colnames)-1
|
||||
|
||||
#get data
|
||||
#--------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
year = last_date.strftime('%Y')
|
||||
out = []
|
||||
for r in res:
|
||||
p_cnt = a_cnt = 0
|
||||
|
||||
for i in range(0,dict[month]):
|
||||
new_date = str(year)+'-'+mdict[month]+'-'+((i>=9) and str(i+1) or ('0'+str(i+1)))
|
||||
|
||||
chk = sql("select status from `tabAttendance` where employee='%s' and att_date = '%s' and docstatus=1"%(r[0],new_date))
|
||||
chk = chk and chk[0][0][0] or '-'
|
||||
if chk=='P':
|
||||
p_cnt +=1
|
||||
elif chk=='A':
|
||||
a_cnt +=1
|
||||
r.append(chk)
|
||||
|
||||
r.append(p_cnt)
|
||||
r.append(a_cnt)
|
||||
|
||||
if p_cnt or a_cnt:
|
||||
out.append(r)
|
||||
@@ -0,0 +1 @@
|
||||
SELECT DISTINCT `tabAttendance`.employee, `tabAttendance`.employee_name FROM `tabAttendance` WHERE `tabAttendance`.fiscal_year like '%(fiscal_year)s%%' AND `tabAttendance`.`company` like '%(company)s%%' AND `tabAttendance`.`employee` like '%(employee)s%%'
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Attendance\x01Employee',
|
||||
'creation': '2010-12-14 10:33:09',
|
||||
'criteria_name': 'Monthly Attendance Details',
|
||||
'custom_query': None,
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Attendance',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Attendance\x01Status':'','Attendance\x01Fiscal Year':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-11-30 18:03:56',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'monthly_attendance_details',
|
||||
'owner': 'harshada@webnotestech.com',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': None,
|
||||
'server_script': None,
|
||||
'sort_by': '`tabAttendance`.`employee`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Salary Slip\x01ID,Salary Slip\x01Employee,Salary Slip\x01Employee Name,Salary Slip\x01Leave Without Pay,Salary Slip\x01Arrear Amount',
|
||||
'creation': '2010-12-14 10:33:09',
|
||||
'criteria_name': 'Monthly Salary Register',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Salary Slip',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Salary Slip\x01Month':'','Salary Slip\x01Year':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-04-05 14:43:08',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'monthly_salary_register',
|
||||
'owner': 'Administrator',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': '',
|
||||
'server_script': None,
|
||||
'sort_by': 'ID',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,50 @@
|
||||
report.customize_filters = function() {
|
||||
var d = new Date();
|
||||
|
||||
var month=["January","February","March","April","May","June","July","August","September","October","November","December"]
|
||||
|
||||
this.add_filter({fieldname:'month', label:'Month',fieldtype:'Select', options:"January"+NEWLINE+"February"+NEWLINE+"March"+NEWLINE+"April"+NEWLINE+"May"+NEWLINE+"June"+NEWLINE+"July"+NEWLINE+"August"+NEWLINE+"September"+NEWLINE+"October"+NEWLINE+"November"+NEWLINE+"December",report_default : month[d.getMonth()],ignore : 1, parent:'Employee'});
|
||||
|
||||
this.filter_fields_dict['Employee'+FILTER_SEP +'Month'].df.in_first_page = 1;
|
||||
this.filter_fields_dict['Employee'+FILTER_SEP +'Status'].df.in_first_page = 1;
|
||||
this.filter_fields_dict['Employee'+FILTER_SEP +'Status'].df.report_default = 'Active';
|
||||
|
||||
this.add_filter({fieldname:'year', label:'Year',fieldtype:'Select', options:"2000"+NEWLINE+"2001"+NEWLINE+"2002"+NEWLINE+"2003"+NEWLINE+"2004"+NEWLINE+"2005"+NEWLINE+"2006"+NEWLINE+"2007"+NEWLINE+"2008"+NEWLINE+"2009"+NEWLINE+"2010"+NEWLINE+"2011",report_default : d.getFullYear(),ignore : 1, parent:'Employee'});
|
||||
|
||||
this.filter_fields_dict['Employee'+FILTER_SEP +'Year'].df.in_first_page = 1;
|
||||
}
|
||||
|
||||
report.get_query = function() {
|
||||
|
||||
emp_month = this.filter_fields_dict['Employee'+FILTER_SEP+'Month'].get_value();
|
||||
emp_year = this.filter_fields_dict['Employee'+FILTER_SEP+'Year'].get_value();
|
||||
emp_status = this.filter_fields_dict['Employee'+FILTER_SEP+'Status'].get_value();
|
||||
|
||||
// month and year mandatory
|
||||
if ((emp_month == '') || (emp_year == '')) {
|
||||
alert("Please enter Month and Year");
|
||||
return;
|
||||
}
|
||||
|
||||
month={"January":"1", "February":"2", "March":"3", "April":"4","May":"5", "June":"6", "July":"7","August":"8", "September":"9", "October":"10", "November":"11", "December":"12"}
|
||||
|
||||
mnt = ''
|
||||
for(m=0; m<emp_month.length;m++){
|
||||
if(mnt== '') mnt = "("+month[emp_month[m]];
|
||||
else mnt +=", "+month[emp_month[m]];
|
||||
}
|
||||
mnt +=")"
|
||||
c1 = '(MONTH(t1.date_of_joining) in '+mnt+' AND YEAR(t1.date_of_joining) = "'+emp_year+'")';
|
||||
c2 = '(MONTH(t1.relieving_date) in '+mnt+' AND YEAR(t1.relieving_date) = "'+emp_year+'")';
|
||||
|
||||
if(emp_status == 'Active')
|
||||
cond = c1;
|
||||
else if (emp_status == 'Left')
|
||||
cond = c2;
|
||||
else
|
||||
cond = c1 + ' OR '+c2;
|
||||
|
||||
var q = 'SELECT t1.name AS "ID", t1.employee_name AS "Employee Name", t1.employee_number AS "Employee Number" FROM `tabEmployee` t1 WHERE '+cond;
|
||||
|
||||
return q;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
status = filter_values.get('status')
|
||||
month = filter_values.get('month')
|
||||
|
||||
|
||||
if status == 'Active' and not status == 'Left':
|
||||
col = [['Employee', 'Link', 'Employee'], ['Employee Name', 'Data', ''], ['Employee Number', 'Data', ''], ['Employment Type','Link','Employment Type'],['Scheduled Confirmation Date','Data',''],['Final Confirmation Date','Data',''],['Contract End Date','Data',''],['Branch','Link','Branch'],['Department','Link','Department'],['Designation','Link','Designation'],['Reports to','Link','Employee'],['Grade','Link','Grade']]
|
||||
|
||||
elif status == 'Left' and not status == 'Active':
|
||||
col = [['Employee', 'Link', 'Employee'], ['Employee Name', 'Data', ''], ['Employee Number', 'Data', ''], ['Resignation Letter Date','Data',''],['Relieving Date','Data',''],['Notice - Number of Days','Data',''],['Reason for Leaving','Data',''],['Leave Encashed?','Data',''],['Encashment Date','Data',''],['Reason for Resignation','Data','']]
|
||||
|
||||
else:
|
||||
col = [['Employee', 'Link', 'Employee'], ['Employee Name', 'Data', ''], ['Employee Number', 'Data', ''], ['Employment Type','Link','Employment Type'],['Scheduled Confirmation Date','Data',''],['Final Confirmation Date','Data',''],['Contract End Date','Data',''],['Branch','Link','Branch'],['Department','Link','Department'],['Designation','Link','Designation'],['Reports to','Link','Employee'],['Grade','Link','Grade'],['Resignation Letter Date','Data',''],['Relieving Date','Data',''],['Notice - Number of Days','Data',''],['Reason for Leaving','Data',''],['Leave Encashed?','Data',''],['Encashment Date','Data',''],['Reason for Resignation','Data','']]
|
||||
|
||||
for c in col:
|
||||
colnames.append(c[0])
|
||||
coltypes.append(c[1])
|
||||
colwidths.append('150px')
|
||||
coloptions.append(c[2])
|
||||
|
||||
col_idx[c[0]] = len(colnames)-1
|
||||
|
||||
|
||||
for c in range(0,len(colnames)):
|
||||
l = (len(colnames[c])*9)
|
||||
if l < 150 : col_width = '150px'
|
||||
else: col_width = '%spx'%(l)
|
||||
|
||||
colwidths[c] = col_width
|
||||
|
||||
for r in res:
|
||||
|
||||
if status == 'Active':
|
||||
ret = sql("select employment_type,scheduled_confirmation_date,final_confirmation_date,contract_end_date,branch,department,designation,reports_to,grade from `tabEmployee` where name = %s",r[0])
|
||||
|
||||
elif status == 'Left':
|
||||
ret = sql("select resignation_letter_date,relieving_date,notice_number_of_days,reason_for_leaving,leave_encashed,encashment_date,reason_for_resignation from `tabEmployee` where name =%s",r[0])
|
||||
|
||||
else:
|
||||
ret = sql("select employment_type,scheduled_confirmation_date,final_confirmation_date,contract_end_date,branch,department,designation,reports_to,grade,resignation_letter_date,relieving_date,notice_number_of_days,reason_for_leaving,leave_encashed,encashment_date,reason_for_resignation from `tabEmployee` where name = %s",r[0])
|
||||
|
||||
ret = ret and ret[0] or []
|
||||
for t in ret:
|
||||
r.append(cstr(t))
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Employee\x01ID',
|
||||
'creation': '2010-12-14 10:33:09',
|
||||
'criteria_name': 'New or left employees for a month',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Employee',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Employee\x01Saved':1,'Employee\x01Submitted':1,'Employee\x01Gender':'','Employee\x01Month of Birth':'','Employee\x01Status':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-12-01 09:54:34',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'new_or_left_employees_for_a_month',
|
||||
'owner': 'harshada@webnotestech.com',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': None,
|
||||
'server_script': None,
|
||||
'sort_by': '`tabEmployee`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
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'
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,37 @@
|
||||
report.customize_filters = function() {
|
||||
this.hide_all_filters();
|
||||
|
||||
this.add_filter({fieldname:'approver', label:'Approver', fieldtype:'Link', options:'Profile', ignore : 1, parent:'Expense Voucher'});
|
||||
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Approver'].df.in_first_page = 1;
|
||||
|
||||
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'From Employee'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Employee Name'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Fiscal Year'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'From Posting Date'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'To Posting Date'].df.filter_hide = 0;
|
||||
this.filter_fields_dict['Expense Voucher'+FILTER_SEP +'Company'].df.filter_hide = 0;
|
||||
}
|
||||
this.mytabs.items['Select Columns'].hide();
|
||||
|
||||
report.get_query = function(){
|
||||
//get filter values
|
||||
emp = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'From Employee'].get_value();
|
||||
emp_nm = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Employee Name'].get_value();
|
||||
frm_start_date = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'From Posting Date'].get_value();
|
||||
to_end_date = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'To Posting Date'].get_value();
|
||||
fiscal_year = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Fiscal Year'].get_value();
|
||||
approver = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Approver'].get_value();
|
||||
company = this.filter_fields_dict['Expense Voucher'+FILTER_SEP+'Company'].get_value();
|
||||
|
||||
var cond = '';
|
||||
if(emp) cond += ' AND `tabExpense Voucher`.employee = "'+emp+'"';
|
||||
if(emp_nm) cond += ' AND `tabExpense Voucher`.employee_name = "'+emp_nm+'"';
|
||||
if(frm_start_date) cond += ' AND `tabExpense Voucher`.posting_date >= "'+frm_start_date+'"';
|
||||
if(to_end_date) cond += ' AND `tabExpense Voucher`.posting_date <= "'+to_end_date+'"';
|
||||
if(fiscal_year !='') cond += ' AND `tabExpense Voucher`.fiscal_year = "'+fiscal_year+'"';
|
||||
if(approver) cond += ' AND `tabExpense Voucher`.exp_approver = "'+approver+'"';
|
||||
if(company) cond += ' AND `tabExpense Voucher`.company = "'+company+'"';
|
||||
|
||||
var q = 'SELECT DISTINCT `tabExpense Voucher`.name, `tabExpense Voucher`.employee, `tabExpense Voucher`.employee_name, `tabExpense Voucher`.posting_date,`tabExpense Voucher`.exp_approver, `tabExpense Voucher`.total_claimed_amount, `tabExpense Voucher`.total_sanctioned_amount FROM `tabExpense Voucher` WHERE `tabExpense Voucher`.approval_status= "Submitted"'+cond;
|
||||
return q;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': '',
|
||||
'creation': '2010-09-03 16:45:06',
|
||||
'criteria_name': 'Pending Expense Vouchers',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Expense Voucher',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Expense Voucher\x01Approval Status':'','Expense Voucher\x01Fiscal Year':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-09-02 11:04:41',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'pending_expense_vouchers',
|
||||
'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': '',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
0
hr/search_criteria/salary_register/__init__.py
Normal file
0
hr/search_criteria/salary_register/__init__.py
Normal file
9
hr/search_criteria/salary_register/salary_register.js
Normal file
9
hr/search_criteria/salary_register/salary_register.js
Normal file
@@ -0,0 +1,9 @@
|
||||
report.customize_filters = function() {
|
||||
fld_lst = ['ID','Employee']
|
||||
|
||||
for(var i = 0; i<fld_lst.length; i++){
|
||||
this.filter_fields_dict['Salary Slip'+FILTER_SEP +fld_lst[i]].df.in_first_page = 1;
|
||||
}
|
||||
|
||||
}
|
||||
this.mytabs.items['Select Columns'].hide();
|
||||
62
hr/search_criteria/salary_register/salary_register.py
Normal file
62
hr/search_criteria/salary_register/salary_register.py
Normal file
@@ -0,0 +1,62 @@
|
||||
sal_slips_ids = ''
|
||||
for r in res:
|
||||
if not sal_slips_ids == '': sal_slips_ids +=","
|
||||
sal_slips_ids+="'%s'"%r[col_idx['ID']]
|
||||
|
||||
earn_heads =[i[0] for i in sql("select distinct e_type from `tabSS Earning Detail` where parent in (%s)"%sal_slips_ids)]
|
||||
ded_heads =[i[0] for i in sql("select distinct d_type from `tabSS Deduction Detail` where parent in (%s)"%sal_slips_ids)]
|
||||
|
||||
col=[]
|
||||
|
||||
for e in earn_heads:
|
||||
l = (len(e)*9)
|
||||
if l < 150 :
|
||||
col_width = '150px'
|
||||
else:
|
||||
col_width = '%spx'%(l)
|
||||
col.append([e,'Currency',col_width,''])
|
||||
|
||||
col.append(['Arrear Amount','Currency','150px',''])
|
||||
col.append(['Encashment Amount','Currency','170px',''])
|
||||
col.append(['Gross Pay','Currency','150px',''])
|
||||
|
||||
for d in ded_heads:
|
||||
l = (len(d)*9)
|
||||
if l < 150 : col_width = '150px'
|
||||
else: col_width = '%spx'%(l)
|
||||
col.append([d,'Currency',col_width,''])
|
||||
|
||||
col.append(['Total Deduction','Currency','150px',''])
|
||||
col.append(['Net Pay','Currency','150px',''])
|
||||
|
||||
for c in col:
|
||||
colnames.append(c[0])
|
||||
coltypes.append(c[1])
|
||||
colwidths.append(c[2])
|
||||
coloptions.append(c[3])
|
||||
col_idx[c[0]] = len(colnames)
|
||||
|
||||
grand_tot = 0
|
||||
for r in res:
|
||||
|
||||
for i in range(6,len(colnames)):
|
||||
if colnames[i] not in ('Arrear Amount','Encashment Amount','Net Pay','Gross Pay','Total Deduction'):
|
||||
amt = sql("select e_modified_amount from `tabSS Earning Detail` where e_type = '%s' and parent = '%s'"%(colnames[i],r[0]))
|
||||
if not amt:
|
||||
amt = sql("select d_modified_amount from `tabSS Deduction Detail` where d_type = '%s' and parent = '%s'"%(colnames[i],r[0]))
|
||||
amt = amt and amt[0][0] or 0
|
||||
r.append(flt(amt))
|
||||
|
||||
else:
|
||||
fld_nm = cstr(colnames[i]).lower().replace(' ','_')
|
||||
errprint(fld_nm)
|
||||
tot = sql("select %s from `tabSalary Slip` where name ='%s'"%(fld_nm,r[0]))
|
||||
tot = tot and flt(tot[0][0]) or 0
|
||||
if colnames[i] == 'Net Pay':
|
||||
grand_tot += tot
|
||||
r.append(tot)
|
||||
|
||||
gt_row = ['' for i in range(len(colnames))]
|
||||
gt_row[col_idx['Employee Name']] = '<b>Grand Totals</b>'
|
||||
gt_row[col_idx['Net Pay']-1] = fmt_money(grand_tot)
|
||||
res.append(gt_row)
|
||||
37
hr/search_criteria/salary_register/salary_register.txt
Normal file
37
hr/search_criteria/salary_register/salary_register.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Salary Slip\x01ID,Salary Slip\x01Employee,Salary Slip\x01Employee Name,Salary Slip\x01Year,Salary Slip\x01Month,Salary Slip\x01Total days in month,Salary Slip\x01Payment days',
|
||||
'creation': '2010-12-29 12:30:57',
|
||||
'criteria_name': 'Salary Register',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Salary Slip',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Salary Slip\x01Submitted':1,'Salary Slip\x01Month':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-12-29 12:11:18',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'salary_register',
|
||||
'owner': 'harshada@webnotestech.com',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': None,
|
||||
'server_script': None,
|
||||
'sort_by': '`tabSalary Slip`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
0
hr/search_criteria/salary_slips/__init__.py
Normal file
0
hr/search_criteria/salary_slips/__init__.py
Normal file
37
hr/search_criteria/salary_slips/salary_slips.txt
Normal file
37
hr/search_criteria/salary_slips/salary_slips.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Salary Slip\x01ID,Salary Slip\x01Fiscal Year,Salary Slip\x01Month,Salary Slip\x01Employee,Salary Slip\x01Employee Name,Salary Slip\x01Department,Salary Slip\x01Designation,Salary Slip\x01Branch,Salary Slip\x01Grade,Salary Slip\x01PF No.,Salary Slip\x01ESIC No.,Salary Slip\x01Leave Without Pay,Salary Slip\x01Bank Name,Salary Slip\x01Bank Account No.,Salary Slip\x01Payment days,Salary Slip\x01Arrear Amount,Salary Slip\x01Encashment Amount,Salary Slip\x01Gross Pay,Salary Slip\x01Total Deduction,Salary Slip\x01Net Pay',
|
||||
'creation': '2010-12-14 10:33:09',
|
||||
'criteria_name': 'Salary Slips',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Salary Slip',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Salary Slip\x01Saved':1,'Salary Slip\x01Submitted':1}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-08-04 13:07:29',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'salary_slips',
|
||||
'owner': 'Administrator',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': '',
|
||||
'server_script': '',
|
||||
'sort_by': '`tabSalary Slip`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
'add_col': None,
|
||||
'add_cond': None,
|
||||
'add_tab': None,
|
||||
'columns': 'Salary Structure\x01ID,Salary Structure\x01Employee,Salary Structure\x01From Date,Salary Structure\x01To Date,Salary Structure\x01Fiscal Year,Salary Structure\x01Branch,Salary Structure\x01Designation,Salary Structure\x01Department,Salary Structure\x01Grade,Salary Structure\x01Is Active,Salary Structure\x01Total Earning,Salary Structure\x01Total Deduction,Salary Structure\x01CTC,Salary Structure\x01Total',
|
||||
'creation': '2010-12-14 17:56:47',
|
||||
'criteria_name': 'Salary Structure Details',
|
||||
'custom_query': '',
|
||||
'description': None,
|
||||
'dis_filters': None,
|
||||
'disabled': None,
|
||||
'doc_type': 'Salary Structure',
|
||||
'docstatus': 0,
|
||||
'doctype': 'Search Criteria',
|
||||
'filters': "{'Salary Structure\x01Branch':'','Salary Structure\x01Designation':'','Salary Structure\x01Department':'','Salary Structure\x01Grade':'','Salary Structure\x01Is Active':''}",
|
||||
'graph_series': None,
|
||||
'graph_values': None,
|
||||
'group_by': None,
|
||||
'idx': None,
|
||||
'modified': '2010-08-04 09:19:01',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Payroll',
|
||||
'name': 'salary_structure_details',
|
||||
'owner': 'Administrator',
|
||||
'page_len': 50,
|
||||
'parent': None,
|
||||
'parent_doc_type': None,
|
||||
'parentfield': None,
|
||||
'parenttype': None,
|
||||
'report_script': '',
|
||||
'server_script': '',
|
||||
'sort_by': '`tabSalary Structure`.`name`',
|
||||
'sort_order': 'DESC',
|
||||
'standard': 'Yes'
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user