mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
fixed get_server_values to make them utf-8 friendly
This commit is contained in:
@@ -26,7 +26,7 @@ class DocType:
|
||||
emp_nm = sql("select employee_name from `tabEmployee` where name=%s", self.doc.employee)
|
||||
emp_nm= emp_nm and emp_nm[0][0] or ''
|
||||
self.doc.employee_name = emp_nm
|
||||
return cstr(emp_nm)
|
||||
return emp_nm
|
||||
|
||||
def fetch_kra(self):
|
||||
if not self.doc.kra_template:
|
||||
@@ -88,7 +88,7 @@ class DocType:
|
||||
if d.score:
|
||||
total = total + flt(d.score_earned)
|
||||
ret={'total_score':flt(total)}
|
||||
return cstr(ret)
|
||||
return ret
|
||||
|
||||
def declare_completed(self):
|
||||
ret={}
|
||||
|
||||
@@ -34,7 +34,7 @@ class DocType:
|
||||
set(self.doc, 'employee_name', emp_nm and emp_nm[0][0] or '')
|
||||
|
||||
ret = { 'employee_name' : emp_nm and emp_nm[0][0] or ''}
|
||||
return str(ret)
|
||||
return ret
|
||||
|
||||
#validation for duplicate record
|
||||
def validate_duplicate_record(self):
|
||||
|
||||
@@ -41,7 +41,7 @@ class DocType:
|
||||
if self.doc.date_of_birth:
|
||||
dt = getdate(self.doc.date_of_birth) + datetime.timedelta(21915)
|
||||
ret = {'date_of_retirement': dt.strftime('%Y-%m-%d')}
|
||||
return str(ret)
|
||||
return ret
|
||||
|
||||
# check if salary structure exists
|
||||
#========================================================================================================
|
||||
|
||||
@@ -66,7 +66,7 @@ class DocType:
|
||||
'carry_forwarded_leaves' : prev_bal,
|
||||
'total_leaves_allocated' : flt(prev_bal) + flt(self.doc.new_leaves_allocated)
|
||||
}
|
||||
return str(ret)
|
||||
return ret
|
||||
|
||||
|
||||
# ********************************************** validate *****************************************************
|
||||
|
||||
@@ -42,7 +42,7 @@ class DocType:
|
||||
'grade' : cstr(det[0][4]),
|
||||
'backup_employee': cstr(self.doc.employee)
|
||||
}
|
||||
return cstr(ret)
|
||||
return ret
|
||||
|
||||
|
||||
# Set Salary structure field values
|
||||
@@ -53,7 +53,7 @@ class DocType:
|
||||
'bank_ac_no' : basic_info and basic_info[0][1] or '',
|
||||
'esic_no' : basic_info and basic_info[0][2] or '',
|
||||
'pf_no' : basic_info and basic_info[0][3] or ''}
|
||||
return cstr(ret)
|
||||
return ret
|
||||
|
||||
# Make earning and deduction table
|
||||
#---------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user