@@ -58,8 +58,8 @@ class AppletAttendance(Controller):
|
||||
end_time_str = f"{int(check_out_end):02d}-{end_minute:02d}"
|
||||
is_early_card = attendance_id.is_early_card
|
||||
is_late_card = attendance_id.is_late_card
|
||||
check_in_status = '缺卡' if not check_in else ('迟到' if is_late_card else '')
|
||||
check_out_status = '缺卡' if not check_out else ('早退' if is_early_card else '')
|
||||
check_in_status = '' if not attendance_id.shift_name else ('缺卡' if not check_in else ('迟到' if is_late_card else ''))
|
||||
check_out_status = '' if not attendance_id.shift_name else ('缺卡' if not check_out else ('早退' if is_early_card else ''))
|
||||
state_result = ''
|
||||
if is_late_card:
|
||||
state_result = '迟到'
|
||||
@@ -69,8 +69,8 @@ class AppletAttendance(Controller):
|
||||
state_result = '缺卡'
|
||||
check_in_str = check_in.strftime('%H:%M:%S') if check_in else ' '
|
||||
check_out_str = check_out.strftime('%H:%M:%S') if check_out else ' '
|
||||
check_in_html = f'<p style="color:red">{check_in_str}</p>' if check_in_status in ['迟到', '早退', '缺卡'] else f'<p style="color:green">{check_in_str}</p>'
|
||||
check_out_html = f'<p style="color:red">{check_out_str}</p>' if check_out_status in ['迟到', '早退', '缺卡'] else f'<p style="color:green">{check_out_str}</p>'
|
||||
check_in_html = '' if not attendance_id.shift_name else (f'<p style="color:red">{check_in_str}</p>' if check_in_status in ['迟到', '早退', '缺卡']else f'<p style="color:green">{check_in_str}</p>' )
|
||||
check_out_html = '' if not attendance_id.shift_name else (f'<p style="color:red">{check_out_str}</p>' if check_out_status in ['迟到', '早退', '缺卡']else f'<p style="color:green">{check_out_str}</p>')
|
||||
self_address = self.get_address_from_coords(kw['att_latitude'], kw['att_longitude'])
|
||||
_logger.info(f"打卡经度{kw['att_longitude'] }打卡纬度{kw['att_latitude']}__________")
|
||||
_logger.info(f"人员{employee_id.name}地址{self_address['formatted_address']}__________")
|
||||
@@ -80,8 +80,8 @@ class AppletAttendance(Controller):
|
||||
default_state_result = "休息" if not attendance_id.shift_name else "超出范围"
|
||||
data = {
|
||||
'location': '',
|
||||
'user_id': user_id.id,
|
||||
'state': 'no', # Default to 'no'
|
||||
'user_id': str(f"{user_id.id}"),
|
||||
'state': 'no',
|
||||
'class': shift_class,
|
||||
'state_result': default_state_result,
|
||||
'check_in': check_in_html,
|
||||
|
||||
@@ -161,6 +161,10 @@ class InheritHrPayslip(models.Model):
|
||||
for rec in self:
|
||||
if rec.line_ids:
|
||||
for line in rec.line_ids:
|
||||
if line.name == '补年金差额':
|
||||
rec.add_year_float = line.total
|
||||
if line.name == '扣年金差额':
|
||||
rec.minus_year_float = line.total
|
||||
if line.name == '值班费':
|
||||
rec.duty = line.total
|
||||
if line.name == '综合补贴':
|
||||
|
||||
Reference in New Issue
Block a user