| 순번 |
프로젝트 코드 |
펀처 |
생년월일 |
근무일자 |
타수 |
단가 |
합계 |
비고 |
확인 |
<%
dim no : no = 0
query = ""
query = query &" select isnull(cast(BB.id as varchar),'') as id, isnull(cast(CC.id as varchar),'') as pay_id, AA.*, isnull(CC.s_pay_unit,'0') as s_pay_unit, isnull(CC.s_wan,'0') as s_wan, isnull(CC.s_sum, '0') as s_sum, "&VbCrlf
query = query &" isnull(BB.job_add_time_memo,'') as job_add_time_memo, isnull(CC.insert_user,'') as insert_user, isnull(CC.attribute01,'') as attribute01, isnull(BB.job_confirm_yn,'N') as job_confirm_yn, "&VbCrlf
query = query &" isnull(CC.attribute05,'') as attribute05, case when DD.d_order_cnt = '77' then '결재 완료' when DD.d_order_cnt is null then '' else '결재 중' end as d_order_cnt from "&VbCrlf
query = query &" ( "&VbCrlf
query = query &" select left(tProcode,11) as prj_code, a.tUserID, b.tuserpwd as n_birth, convert(char(10),tEndDate,23) as date, "&VbCrlf
query = query &" sum(cast(REPLACE(tPunchCount,'-','') as int)) as tPunchCount "&VbCrlf
query = query &" from punching.dbo.tb_PunchLogInfo a "&VbCrlf
query = query &" left join punching.dbo.tb_mgrusers b on a.tUserID=b.tuserid "&VbCrlf
query = query &" where a.tUserID in (select tuserid from punching.dbo.tb_mgrusers where tuseroption = '18') "&VbCrlf
query = query &" and left(a.tProcode,11) = '" & prj_code & "' and a.tPunchCount<>'0' "&VbCrlf
query = query &" group by left(tProcode,11), a.tUserID, b.tuserpwd, convert(char(10),tEndDate,23) "&VbCrlf
query = query &" ) as AA "&VbCrlf
query = query &" left join "&VbCrlf
query = query &" ( "&VbCrlf
query = query &" select id, p_child_sn, neakeun_name, left(neakeun_jumin,6) as neakeun_jumin, date, job_add_time_memo, job_confirm_yn from project2.dbo.neakeun_work "&VbCrlf
query = query &" where p_sebu='펀치' "&VbCrlf
query = query &" ) BB on AA.tUserID=BB.neakeun_name and AA.n_birth=BB.neakeun_jumin and AA.date=BB.date and AA.prj_code=BB.p_child_sn "&VbCrlf
query = query &" left join "&VbCrlf
query = query &" ( "&VbCrlf
query = query &" select id, p_sn, m_name, left(m_jumin,6) as m_jumin, s_pay_unit, s_wan, s_sum, insert_user, attribute01, attribute05 from project2.dbo.T_NEAKEUN_PAY "&VbCrlf
query = query &" where s_gubun='펀치' "&VbCrlf
query = query &" ) CC on AA.prj_code=CC.p_sn and AA.tUserID=CC.m_name and AA.n_birth=CC.m_jumin and BB.id=CC.attribute01 "&VbCrlf
query = query &" left join "&VbCrlf
query = query &" ( "&VbCrlf
query = query &" select d_no, d_order_cnt from project2.dbo.Document "&VbCrlf
query = query &" where d_delok='N' "&VbCrlf
query = query &" ) DD on CC.attribute05=DD.d_no "&VbCrlf
query = query &" order by AA.date "&VbCrlf
'Response.Write query
Rs.open query, adoconn, adopenstatic, adlockreadonly
Dim input_readonly
while not rs.eof
If rs("job_confirm_yn") = "Y" Then
input_readonly = "readonly='reaonldy'"
else
input_readonly = ""
End If
no = no + 1
%>
| <%=no %> |
<%=rs("prj_code") %> |
<%=rs("tUserID") %>" />" /> |
<%=rs("n_birth") %> |
<%=rs("date") %> |
<%=FormatNumber(rs("tPunchCount"),0) %> |
" class="p_unit text-right" tabindex="<%=no %>" <%=input_readonly %>/>원 |
<%=FormatNumber(rs("s_sum"),0) %>원 |
" class="p_etc" tabindex="1000+<%=no %>" <%=input_readonly %> style="width:100%;"/> |
<%If rs("job_confirm_yn") = "N" Then%>
<%Else %>
<%If rs("attribute05") = "" Then %>
<%Else %>
<%=rs("d_order_cnt") %>
<%End If %>
<%End If %>
|
<%
rs.movenext
wend
rs.Close
%>
|