83 lines
6.2 KiB
Plaintext
83 lines
6.2 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<OBJECT RUNAT=Server PROGID=ADODB.Recordset id=rsp></OBJECT>
|
|
<%
|
|
krc_no = request("krc_no")
|
|
work_month = request("work_month")
|
|
p_child_sn = request("p_child_sn")
|
|
sv = request("sv")
|
|
n_name = unescape(request("n_name"))
|
|
n_jumin = request("n_jumin")
|
|
s_gubun = unescape(request("s_gubun"))
|
|
|
|
Response.CharSet = "EUC-KR" '한글
|
|
Response.AddHeader "Pragma","no-cache"
|
|
Response.AddHeader "cache-control", "no-staff"
|
|
Response.Expires = -1
|
|
|
|
response.write "<table width='100%' cellpadding='0' cellspacing='0' border='0' style='border-collapse:collapse;'>"
|
|
response.write " <tr>"
|
|
response.write " <td width='10%' class='tit2' align='center'>날짜</td>"
|
|
response.write " <td width='6%' class='tit2' align='center'>요일</td>"
|
|
response.write " <td width='5%' class='tit2' align='center'>출근</td>"
|
|
response.write " <td width='5%' class='tit2' align='center'>퇴근</td>"
|
|
response.write " <td width='6%' class='tit2' align='center'>등급</td>"
|
|
response.write " <td width='7%' class='tit2' align='center'>단가</td>"
|
|
response.write " <td width='7%' class='tit2' align='center'>근무<br />시간</td>"
|
|
response.write " <td width='7%' class='tit2' align='center'>초과<br />근무</td>"
|
|
response.write " <td width='7%' class='tit2' align='center'>추가<br />시간</td>"
|
|
response.write " <td width='12%' class='tit2' align='center'>추가<br />사유</td>"
|
|
response.write " <td width='10%' class='tit2' align='center'>수당</td>"
|
|
response.write " <td width='9%' class='tit2' align='center'>추가<br />수당1</td>"
|
|
response.write " <td width='9%' class='tit2' align='center'>추가<br />수당2</td>"
|
|
response.write " </tr>"
|
|
|
|
|
|
query = " "
|
|
query = query & " select work_dt, yoil, in_time, out_time, a.m_name, a.m_jumin, s_gubun, "
|
|
query = query & " (select top 1 ca.name from T_MYUN_GRADE_HISTORY tg left outer join category ca on tg.m_grade = ca.code and ca.구분='grade' "
|
|
query = query & " where tg.m_name=nw.neakeun_name and left(tg.m_jumin,6)=left(nw.neakeun_jumin, 6) and m_grade_dt <= a.work_dt AND attribute01 = a.s_gubun order by m_grade_dt desc, insert_dt desc) as grade, "
|
|
query = query & " s_pay_unit, case when job_in_time = 0 then s_wan else job_in_time end as job_in_time, job_out_time, job_add_time, job_add_time_memo, s_sum, "
|
|
query = query & " isnull((select s_sum from t_neakeun_pay where attribute01 = a.attribute01 and s_gubun = '추가수당1'), 0) as add_1, "
|
|
query = query & " isnull((select s_sum from t_neakeun_pay where attribute01 = a.attribute01 and s_gubun = '추가수당2'), 0) as add_2 "
|
|
query = query & " from t_neakeun_pay a "
|
|
query = query & " left outer join neakeun_work nw on a.attribute01 = nw.id "
|
|
query = query & " where pay_type = 1 and isnull(a.attribute05,'') = '" & krc_no & "' "
|
|
if work_month = "2022-04" Then
|
|
Query = Query & " and ((work_dt between '" & work_month & "-01' and '" & work_month & "-25' AND NW.in_time + NW.out_time + NW.p_sebu_code <> '000000004') OR "
|
|
Query = Query & " (work_dt between '" & work_month & "-16' and cast(DATEADD(m,1,cast('" & work_month & "-05' as date)) as varchar) "
|
|
elseif work_month > "2022-04" Then
|
|
Query = Query & " and ((work_dt between cast(DATEADD(m,-1,cast('" & work_month & "-26' as date))as varchar) and '" & work_month & "-25' AND NW.in_time + NW.out_time + NW.p_sebu_code <> '000000004') OR "
|
|
Query = Query & " (work_dt between '" & work_month & "-06' and cast(DATEADD(m,1,cast('" & work_month & "-05' as date)) as varchar) "
|
|
else
|
|
Query = Query & " and ((LEFT(work_dt, 7) = '" & work_month & "' AND NW.in_time + NW.out_time + NW.p_sebu_code <> '000000004') OR "
|
|
Query = Query & " (work_dt between '" & work_month & "-16' and cast(DATEADD(m,1,cast('" & work_month & "-15' as date)) as varchar) "
|
|
end if
|
|
Query = Query & " AND NW.in_time + NW.out_time + NW.p_sebu_code = '000000004')) "
|
|
query = query & " and a.p_sn = '" & p_child_sn & "' and p_sv_no = '" & sv & "' "
|
|
query = query & " and a.m_name = '" & n_name & "' and left(a.m_jumin, 6) = '" & n_jumin & "' "
|
|
query = query & " and left(s_gubun, 2) <> '추가' and s_gubun = '" & s_gubun & "' "
|
|
query = query & " Order by work_dt "
|
|
|
|
rsp.Open query, adoConn, 1
|
|
|
|
do while not rsp.eof
|
|
response.write " <tr>"
|
|
response.write " <td class='tit7' align='center'><font class='tahoma'>" & rsp("work_dt") & "</font></td> "
|
|
response.write " <td class='tit7' align='center'><font class='tahoma'>" & rsp("yoil") & "</font></td> "
|
|
response.write " <td class='tit7' align='center'><font class='tahoma'>" & rsp("in_time") & "</font></td> "
|
|
response.write " <td class='tit7' align='center'><font class='tahoma'>" & rsp("out_time") & "</font></td> "
|
|
response.write " <td class='tit7' align='center'><font class='tahoma'>" & rsp("grade") & "</font></td> "
|
|
response.write " <td class='tit7' align='right'><font class='tahoma'>" & round(formatNumberDbl(rsp("s_pay_unit")), 2) & "</font></td> "
|
|
response.write " <td class='tit7' align='center'><font class='tahoma'>" & formatNumberDbl(rsp("job_in_time")) & "</font></td> "
|
|
response.write " <td class='tit7' align='center'><font class='tahoma'>" & rsp("job_out_time") & "</font></td> "
|
|
response.write " <td class='tit7' align='center'><font class='tahoma'>" & rsp("job_add_time") & "</font></td> "
|
|
response.write " <td class='tit7' align='left'><font class='tahoma'>" & rsp("job_add_time_memo") & "</font></td> "
|
|
response.write " <td class='tit7' align='right'><font class='tahoma'>" & FormatNumber(CDbl(rsp("s_sum")), 0) & "</font></td> "
|
|
response.write " <td class='tit7' align='right'><font class='tahoma'>" & FormatNumber(CDbl(rsp("add_1")), 0) & "</font></td> "
|
|
response.write " <td class='tit7' align='right'><font class='tahoma'>" & FormatNumber(CDbl(rsp("add_2")), 0) & "</font></td> "
|
|
response.write " </tr>"
|
|
rsp.movenext
|
|
loop
|
|
rsp.close
|
|
response.write "</table>"
|
|
%> |