[search criteria] [cleanup] removed search criteria folders and files

This commit is contained in:
Anand Doshi
2013-06-11 15:04:37 +05:30
parent 5c069050d5
commit 618edee8b7
250 changed files with 0 additions and 8147 deletions

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,26 +0,0 @@
[
{
"owner": "ashwini@webnotestech.com",
"docstatus": 0,
"creation": "2012-04-03 12:49:51",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:51"
},
{
"module": "HR",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Appraisal\u0001Saved':1,'Appraisal\u0001Submitted':1,'Appraisal\u0001Status':'','Appraisal\u0001Fiscal Year':''}",
"doctype": "Search Criteria",
"doc_type": "Appraisal",
"name": "__common__",
"sort_by": "`tabAppraisal`.`name`",
"page_len": 50,
"criteria_name": "Employee Appraisals",
"columns": "Appraisal\u0001ID,Appraisal\u0001Status,Appraisal\u0001Employee,Appraisal\u0001Employee Name,Appraisal\u0001Start Date,Appraisal\u0001End Date,Appraisal\u0001Approver,Appraisal\u0001Total Score"
},
{
"name": "employee_appraisals",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,23 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
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

View File

@@ -1,26 +0,0 @@
[
{
"owner": "harshada@webnotestech.com",
"docstatus": 0,
"creation": "2012-04-03 12:49:51",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:51"
},
{
"module": "HR",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Employee\u0001Saved':1,'Employee\u0001Submitted':1,'Employee\u0001Gender':'','Employee\u0001Month of Birth':'','Employee\u0001Status':''}",
"doctype": "Search Criteria",
"doc_type": "Employee",
"name": "__common__",
"sort_by": "`tabEmployee`.`name`",
"page_len": 50,
"criteria_name": "Employee Information",
"columns": "Employee\u0001ID,Employee\u0001Employee Name,Employee\u0001Employee Number,Employee\u0001Date of Joining,Employee\u0001Gender,Employee\u0001Date of Birth,Employee\u0001Employment Type,Employee\u0001Scheduled Confirmation Date,Employee\u0001Contract End Date,Employee\u0001Status,Employee\u0001Branch,Employee\u0001Department,Employee\u0001Designation,Employee\u0001Grade,Employee\u0001Reports to,Employee\u0001Email (By company),Employee\u0001Bank Name,Employee\u0001Relieving Date"
},
{
"name": "employee_information",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,26 +0,0 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-03 12:49:51",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:51"
},
{
"module": "HR",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Employee\u0001Saved':1,'Employee\u0001Gender':'','Employee\u0001Month of Birth':'May','Employee\u0001Status':''}",
"doctype": "Search Criteria",
"doc_type": "Employee",
"name": "__common__",
"sort_by": "`tabEmployee`.`name`",
"page_len": 50,
"criteria_name": "Employee's Birthday",
"columns": "Employee\u0001ID,Employee\u0001Employee Name,Employee\u0001Department,Employee\u0001Gender,Employee\u0001Date of Birth,Employee\u0001Month of Birth"
},
{
"name": "employees_birthday",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,26 +0,0 @@
[
{
"owner": "ashwini@webnotestech.com",
"docstatus": 0,
"creation": "2012-03-30 13:33:32",
"modified_by": "Administrator",
"modified": "2012-03-30 13:33:32"
},
{
"module": "HR",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Expense Claim\u0001Saved':1,'Expense Claim\u0001Submitted':1,'Expense Claim\u0001Approval Status':'','Expense Claim\u0001Fiscal Year':''}",
"doctype": "Search Criteria",
"doc_type": "Expense Claim",
"name": "__common__",
"sort_by": "`tabExpense Claim`.`name`",
"page_len": 50,
"criteria_name": "Expense Claims",
"columns": "Expense Claim\u0001ID,Expense Claim\u0001Approval Status,Expense Claim\u0001From Employee,Expense Claim\u0001Employee Name,Expense Claim\u0001Approver,Expense Claim\u0001Posting Date,Expense Claim\u0001Total Claimed Amount,Expense Claim\u0001Total Sanctioned Amount"
},
{
"name": "expense_claims",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,45 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
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();

View File

@@ -1,93 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#add column employee, employee name
#--------------------------------------------------------------------------------------
from __future__ import unicode_literals
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)

View File

@@ -1 +0,0 @@
SELECT DISTINCT `tabAttendance`.employee, `tabEmployee`.employee_name FROM `tabAttendance`, `tabEmployee` WHERE `tabEmployee`.name = `tabAttendance`.employee and `tabAttendance`.fiscal_year like '%(fiscal_year)s%%' AND `tabAttendance`.company like '%(company)s%%' AND `tabAttendance`.employee like '%(employee)s%%'

View File

@@ -1,26 +0,0 @@
[
{
"owner": "harshada@webnotestech.com",
"docstatus": 0,
"creation": "2012-04-03 12:49:51",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:51"
},
{
"module": "HR",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Attendance\u0001Status':'','Attendance\u0001Fiscal Year':''}",
"doctype": "Search Criteria",
"doc_type": "Attendance",
"name": "__common__",
"sort_by": "`tabAttendance`.`employee`",
"page_len": 50,
"criteria_name": "Monthly Attendance Details",
"columns": "Attendance\u0001Employee"
},
{
"name": "monthly_attendance_details",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,99 +0,0 @@
from __future__ import unicode_literals
colwidths[col_idx['Employee Name']]="120px"
colwidths[col_idx['Leave Without Pay']] = '120px'
sum_net = total_earning = total_deduction = total_lwp = total_arr = 0
total = ['Total Net Pay','','']
earn_type_lst = sql("select name from `tabEarning Type`")
ded_type_lst = sql("select name from `tabDeduction Type`")
li=[]
for lst in earn_type_lst:
li.append(lst[0])
li.append('Total Earning')
for lst in ded_type_lst:
li.append(lst[0])
li.append('Total Deduction')
li.append('Net Pay')
for d in li:
colnames.append(d)
colwidths.append("150px")
coltypes.append("Currency")
coloptions.append("")
col_idx[d] = len(colnames)-1
for r in res:
r.append("0")
for r in res:
total_lwp += flt(r[col_idx['Leave Without Pay']])
total_arr += flt(r[col_idx['Arrear Amount']])
for d1 in li:
d2 = '%s'%d1
earn_ret=webnotes.conn.convert_to_lists(sql("select e_type,e_amount from `tabSalary Slip Earning` where parent = '%s'"%r[col_idx['ID']]))
ded_ret=webnotes.conn.convert_to_lists(sql("select d_type,d_amount from `tabSalary Slip Deduction` where parent = '%s'"%r[col_idx['ID']]))
for e in earn_ret:
e0 = '%s'%e[0]
r[col_idx[e0]]=flt(e[1]) or 0.00
for d in ded_ret:
d0 = '%s'%d[0]
r[col_idx[d0]]=flt(d[1]) or 0.00
tot_earn_ded_net_ret = sql("select gross_pay, total_deduction,net_pay from `tabSalary Slip` where name = '%s'"%r[col_idx['ID']])
if d2 == 'Total Earning':
r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][0]) or 0
total_earning += flt(tot_earn_ded_net_ret[0][0]) or 0
elif d2 == 'Total Deduction':
r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][1]) or 0
total_deduction += flt(tot_earn_ded_net_ret[0][1]) or 0
elif d2 == 'Net Pay':
r[col_idx[d2]] = flt(tot_earn_ded_net_ret[0][2]) or 0
sum_net += flt(tot_earn_ded_net_ret[0][2]) or 0
total.append(total_lwp)
total.append(total_arr)
for lst in earn_type_lst:
total_ear = 0
for r in res:
lst0 = '%s'%lst[0]
total_ear += flt(r[col_idx[lst0]])
total.append(total_ear)
total.append(total_earning)
for lst in ded_type_lst:
total_ded = 0
for r in res:
lst0 = '%s'%lst[0]
total_ded += flt(r[col_idx[lst0]])
total.append(total_ded)
total.append(total_deduction)
total.append(sum_net)
res.append(total)

View File

@@ -1,26 +0,0 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-30 14:50:44",
"modified_by": "Administrator",
"modified": "2012-04-05 17:23:13"
},
{
"module": "HR",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{\"Salary Slip\\u0001Submitted\":1,\"Salary Slip\\u0001Company\":[\"\"],\"Salary Slip\\u0001Month\":[\"\"]}",
"doctype": "Search Criteria",
"doc_type": "Salary Slip",
"name": "__common__",
"sort_by": "`tabSalary Slip`.`name`",
"page_len": 50,
"criteria_name": "Monthly Salary Register",
"columns": "Salary Slip\u0001ID,Salary Slip\u0001Employee,Salary Slip\u0001Employee Name,Salary Slip\u0001Leave Without Pay,Salary Slip\u0001Arrear Amount"
},
{
"name": "monthly_salary_register",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,66 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
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;
}

View File

@@ -1,60 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
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))

View File

@@ -1,26 +0,0 @@
[
{
"owner": "harshada@webnotestech.com",
"docstatus": 0,
"creation": "2012-04-03 12:49:51",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:51"
},
{
"module": "HR",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Employee\u0001Saved':1,'Employee\u0001Submitted':1,'Employee\u0001Gender':'','Employee\u0001Month of Birth':'','Employee\u0001Status':''}",
"doctype": "Search Criteria",
"doc_type": "Employee",
"name": "__common__",
"sort_by": "`tabEmployee`.`name`",
"page_len": 50,
"criteria_name": "New or left employees for a month",
"columns": "Employee\u0001ID"
},
{
"name": "new_or_left_employees_for_a_month",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,25 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
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();

View File

@@ -1,77 +0,0 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
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, ded_heads = [], []
if res:
earn_heads =[i[0] for i in sql("select distinct e_type from `tabSalary Slip Earning` where parent in (%s)"%sal_slips_ids)]
ded_heads =[i[0] for i in sql("select distinct d_type from `tabSalary Slip Deduction` where parent in (%s)"%sal_slips_ids)]
col=[]
for e in earn_heads:
l = (len(cstr(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(cstr(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 `tabSalary Slip Earning` where e_type = '%s' and parent = '%s'"%(colnames[i],r[0]))
if not amt:
amt = sql("select d_modified_amount from `tabSalary Slip Deduction` 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(' ','_')
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] = grand_tot
res.append(gt_row)

View File

@@ -1,26 +0,0 @@
[
{
"owner": "harshada@webnotestech.com",
"docstatus": 0,
"creation": "2012-04-03 12:49:52",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:52"
},
{
"module": "HR",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Salary Slip\u0001Submitted':1,'Salary Slip\u0001Month':''}",
"doctype": "Search Criteria",
"doc_type": "Salary Slip",
"name": "__common__",
"sort_by": "`tabSalary Slip`.`name`",
"page_len": 50,
"criteria_name": "Salary Register",
"columns": "Salary Slip\u0001ID,Salary Slip\u0001Employee,Salary Slip\u0001Employee Name,Salary Slip\u0001Year,Salary Slip\u0001Month,Salary Slip\u0001Total days in month,Salary Slip\u0001Payment days"
},
{
"name": "salary_register",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,26 +0,0 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-03 12:49:52",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:52"
},
{
"module": "HR",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Salary Slip\u0001Saved':1,'Salary Slip\u0001Submitted':1}",
"doctype": "Search Criteria",
"doc_type": "Salary Slip",
"name": "__common__",
"sort_by": "`tabSalary Slip`.`name`",
"page_len": 50,
"criteria_name": "Salary Slips",
"columns": "Salary Slip\u0001ID,Salary Slip\u0001Fiscal Year,Salary Slip\u0001Month,Salary Slip\u0001Employee,Salary Slip\u0001Employee Name,Salary Slip\u0001Department,Salary Slip\u0001Designation,Salary Slip\u0001Branch,Salary Slip\u0001Grade,Salary Slip\u0001PF No.,Salary Slip\u0001ESIC No.,Salary Slip\u0001Leave Without Pay,Salary Slip\u0001Bank Name,Salary Slip\u0001Bank Account No.,Salary Slip\u0001Payment days,Salary Slip\u0001Arrear Amount,Salary Slip\u0001Encashment Amount,Salary Slip\u0001Gross Pay,Salary Slip\u0001Total Deduction,Salary Slip\u0001Net Pay"
},
{
"name": "salary_slips",
"doctype": "Search Criteria"
}
]

View File

@@ -1 +0,0 @@
from __future__ import unicode_literals

View File

@@ -1,26 +0,0 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-04-03 12:49:52",
"modified_by": "Administrator",
"modified": "2012-04-03 12:49:52"
},
{
"module": "HR",
"standard": "Yes",
"sort_order": "DESC",
"filters": "{'Salary Structure\u0001Branch':'','Salary Structure\u0001Designation':'','Salary Structure\u0001Department':'','Salary Structure\u0001Grade':'','Salary Structure\u0001Is Active':''}",
"doctype": "Search Criteria",
"doc_type": "Salary Structure",
"name": "__common__",
"sort_by": "`tabSalary Structure`.`name`",
"page_len": 50,
"criteria_name": "Salary Structure Details",
"columns": "Salary Structure\u0001ID,Salary Structure\u0001Employee,Salary Structure\u0001From Date,Salary Structure\u0001To Date,Salary Structure\u0001Fiscal Year,Salary Structure\u0001Branch,Salary Structure\u0001Designation,Salary Structure\u0001Department,Salary Structure\u0001Grade,Salary Structure\u0001Is Active,Salary Structure\u0001Total Earning,Salary Structure\u0001Total Deduction,Salary Structure\u0001CTC,Salary Structure\u0001Total"
},
{
"name": "salary_structure_details",
"doctype": "Search Criteria"
}
]