최초커밋

This commit is contained in:
2025-09-29 17:55:08 +09:00
parent 90af30c0d0
commit e39813395a
3334 changed files with 338522 additions and 0 deletions

533
approval/doc_myun2_pay.asp Normal file
View File

@@ -0,0 +1,533 @@
<!-- #include virtual = "include/header.asp" -->
<!-- #include virtual = "include/left.asp" -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<style>
button.ui-datepicker-current {
display: none;
}
</style>
<!-- Content Header (Page header) -->
<div class="content-header">
<h1><3E><><EFBFBD><EFBFBD> <20>ۼ<EFBFBD> : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></h1>
</div>
<!-- /.content-header -->
<!-- Main content -->
<div class="content-body">
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<%
web_position = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <20><><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD>"
dim title
dim Query
dim tmpstr
dim tmpstr2
dim i
dim max_cnt '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>̺<EFBFBD><CCBA><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
dim Max_Width
dim txt_date '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ۼ<EFBFBD><DBBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
dim db_table_name
dim Currdate
Currdate = year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2)
db_table_name = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Max_Width =750
title=request("title")
tmp_title = ""
tmp_query = ""
tmp_title = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>"
tmp_query = " and target16 is not null "
txt_date = request("txt_date")
tmp_button = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
tmp_btn_name = "approval/btn_approval_cancel"
web_position = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <20><><EFBFBD>๮<EFBFBD><E0B9AE>"
x = "1"
%>
<script language=javascript>
function view_del(z,x,y)
{
if (confirm("<%=tmp_button%> <20>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?"))
{
document.frm_select.action = "view_del4_ok.asp?d_no="+z+"&x="+x+"&y="+y;
document.frm_select.submit();
}
}
function change_month(title)
{
var url;
var sel_month;
var neakeun_myun;
sel_month = document.frm_select.sel_month.value;
neakeun_myun = document.frm_select.neakeun_myun[0].checked;
if (neakeun_myun) {
url = "doc_myun_pay.asp?title=" + title;
} else {
url = "doc_myun2_pay.asp?title=" + title;
}
url = url + "&sel_month=" + sel_month;
document.frm_select.action = url;
document.frm_select.submit();
}
function change_title(pay_type, startDT, endDT, printType, d_no, sv) {
var url = "doc_myun_pay_print2.asp"
var param = "?pay_type=" + pay_type;
param = param + "&startDT=" + startDT;
param = param + "&endDT=" + endDT;
param = param + "&print_type=" + printType;
param = param + "&d_no=" + d_no;
param = param + "&sv=" + sv;
var user_NotSeting_cnt = document.frm_confirm.user_NotSeting_cnt.value;
var approval_progress_flag = true;
if (approval_progress_flag == true) {
if (d_no != "") {
url = "../ess/doc_myun_pay_print2.asp?d_no=" + d_no + "&view_chk=1&x=1";
window.open(url, "", "left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=850, height=800 ,scrollbars=yes ,resizable=yes");
} else {
window.open(url + param, "", "left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=850, height=800 ,scrollbars=yes ,resizable=yes");
}
}
}
function change_title2(pay_type, p_sn, printType, d_no, sv) {
var url = "doc_myun_pay_print2.asp"
var param = "?pay_type=" + pay_type;
param = param + "&p_sn=" + p_sn;
param = param + "&print_type=" + printType;
param = param + "&d_no=" + d_no;
param = param + "&sv=" + sv;
if (d_no != "") {
url = "../ess/doc_myun_pay_print2.asp?d_no=" + d_no + "&view_chk=1&x=1";
window.open(url, "", "left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=850, height=800 ,scrollbars=yes ,resizable=yes");
} else {
window.open(url + param, "", "left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=850, height=800 ,scrollbars=yes ,resizable=yes");
}
}
function nm_chg(val) {
if (val == "1") {
document.getElementById("sel_month").style.visibility = "visible";
document.getElementById("sel_month_str").style.visibility = "visible";
} else {
document.getElementById("sel_month").style.visibility = "hidden";
document.getElementById("sel_month_str").style.visibility = "hidden";
}
}
</script>
<td width="100%" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<!-- Ȯ<><C8AE> -->
</tr>
<tr>
<td colspan="2" style="padding:20;">
<form name='frm_select' method='post' style="TEXT-ALIGN: left" >
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="brown">
</td>
</tr>
<tr>
<td style="padding:10 0 0 0;">
<table width="100%" height="37" cellpadding="0" cellspacing="1" border="0" bgcolor="#c0c0c0">
<tr>
<td bgcolor="#DFDFDF" style="padding:0 0 0 20"><span id="sel_month_str" style="visibility:hidden;"><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></span>&nbsp;
<input type="text" name='sel_month' id="sel_month" readonly style="visibility:hidden;width:120px;text-align:center;" value="<%=sel_month%>" style="CURSOR:pointer;">
<input type = "radio" name="neakeun_myun" value="1" onclick="nm_chg('1')" /><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<input type = "radio" name="neakeun_myun" value="2" checked onclick="nm_chg('2')"/><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<img src="/images/common/btn_smallsrch.gif" align="absmiddle" onClick="change_month('<%=title%>');" style="CURSOR:pointer;">
<img src="/images/approval/btn_doclist.gif" align="absmiddle" onClick="history.back(-1);" style="CURSOR:pointer;">
<%=now() %>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding:10 0 0 0">
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
<tr>
<td align="center" ><3E><><EFBFBD><EFBFBD></td>
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ</td>
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
<td align="center" ><3E><><EFBFBD>籸<EFBFBD><E7B1B8></td>
<td align="center" ><3E><><EFBFBD><EFBFBD></td>
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
</tr>
<%
set adors2 = server.CreateObject("ADODB.RECORDSET")
max_cnt = 0
i = 0
Dim total_pay
total_pay = 0
mainQuery = " select d_no, p_sn, '2' as pay_type, SUM(pay) as pay, sv "
mainQuery = mainQuery & " from ( "
mainQuery = mainQuery & " select a.attribute05 as d_no, a.p_sn"
mainQuery = mainQuery & " , s_gubun "
mainQuery = mainQuery & " , isnull(SUM(s_sum), 0) as pay "
mainQuery = mainQuery & " , b.p_sv_1 as sv "
mainQuery = mainQuery & " from T_MYUN_PAY as A with(nolock) left outer join (SELECT * FROM V_PROJECT_METHOD with(nolock) WHERE p_field_complete is null) as B on a.p_sn = B.p_child_sn "
mainQuery = mainQuery & " where confirm_yn = 'Y' "
mainQuery = mainQuery & " and A.s_gubun in ('FF','CATI','ETC') "
If Session("Depart_Code") = 12 And Session("teamplace") < 2 Then
mainQuery = mainQuery & " and b.p_sv_1 = '" & Session("User_Number") & "' "
else
mainQuery = mainQuery & " and b.p_child_sn is not null "
End If
mainQuery = mainQuery & " group by a.p_sn, a.attribute05, s_gubun, p_sv_1 "
mainQuery = mainQuery & " ) as T "
mainQuery = mainQuery & " group by d_no, p_sn, sv "
mainQuery = mainQuery & " order by d_no, p_sn "
'--hwkim ''''' response.write mainQuery
adors.open mainQuery, adoconn, adopenstatic, adlockreadonly
If adors.recordCount > 0 Then
For z = 1 To adors.recordCount
'Response.Write "z : " & z &"<BR>"
max_cnt = max_cnt + 1
approval_flag = 1
If Trim(adoRs("d_no")) <> "" Then
approval_flag = 0
End if
%>
<tr>
<%
pay_apply_username = ""
query = "select p_name from person with(nolock) where p_no = '" & adoRs("sv") & "' "
adors2.open query, adoconn, adopenstatic, adlockreadonly
If adors2.recordCount > 0 Then
pay_apply_username = adors2("p_name")
End If
adors2.close
Dim document_no, document_status
document_no = ""
document_status = ""
document_no = Trim(adoRs("d_no"))
query = "SELECT * "
query = query & " FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as a with(nolock) "
query = query & " INNER JOIN Document as b with(nolock) on a.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = b.d_no "
query = query & " WHERE a.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ='" & document_no & "' "
query = query & " AND b.d_delok = 'N' "
rsc.Open query, adoConn, 1
if rsc.RecordCount > 0 Then
If rsc("d_order_cnt") = "77" Then
document_status = "<22><><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD>"
ElseIf rsc("d_order_cnt") = "99" Then
document_status = "<22>ݷ<EFBFBD>"
Else
document_status = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
End If
Else
document_no = ""
approval_flag = 1
End If
rsc.close
'//-- 20210705 hwkim
Dim project_name_list : project_name_list = ""
if adoRs("p_sn") = "99999" then
tmp_value = tmp_value & "<22>Ϲݾ<CFB9><DDBE><EFBFBD>"
Else
if len(adoRs("p_sn") ) < 5 then
'///=========================
'///=========================
'2013.1.2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD> : <20>ӽ<EFBFBD><D3BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>ػӸ<D8BB> <20>ƴ϶<C6B4> <20><><EFBFBD><EFBFBD> <20>Ϳ<EFBFBD><CDBF><EFBFBD><EFBFBD><EFBFBD> ã<><C3A3><EFBFBD><EFBFBD> <20><>
' <20>ӽ÷<D3BD> <20>ؾ<EFBFBD><D8BE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ƾ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20><>
query = "select * from project2_pre with(nolock) where p_sn_tmp = '" & adoRs("p_sn") & "'" & _
" and (substring(write_date, 1, 4) = '" & left(date(), 4) & "' " & _
" OR substring(write_date, 1, 4) = '" & left(date(), 4) - 1 & "') "
'Response.Write "query : " & query & "<br>"
rsc.Open query,adoconn,1
project_name_list = " ["& adoRs("p_sn") &"] &nbsp;"& rsc("p_subject_tmp")
rsc.Close
elseif len(adoRs("p_sn") ) > 9 Then
query = "select * from t_project_method with(nolock) where p_child_sn = '" & adoRs("p_sn") & "'"
'Response.Write "query : " & query & "<br>"
rsc.Open query,adoconn,1
project_name_list = " ["& adoRs("p_sn") &"] &nbsp;"& rsc("p_subject")
rsc.Close
Else
'query = "select p_subject from V_PROJECT where p_sn = '" & rsc("p_sn") & "'"
query = "select p_subject from V_PROJECT with(nolock) where p_sn = '" & adoRs("p_sn") & "'"
'Response.Write "query : " & query & "<br>"
rsc.Open query, adoConn, 1
If rsc.RecordCount > 0 Then
project_name_list = " ["& adoRs("p_sn") &"] &nbsp;"& rsc("p_subject") & ", "
End if
rsc.Close
end if
end if
%>
<td align="center">
<input type="radio" class="none" name='opt_print' value='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ' onclick="change_title2('<%=adoRs("pay_type")%>','<%=adoRs("p_sn")%>','<%=approval_flag%>', '<%=document_no%>','<%=adoRs("sv")%>');">
</td>
<td align="left"><%=document_no%> &nbsp; &nbsp; <%=project_name_list %></td>
<td align="center"><%=pay_apply_username%></td>
<td align="center"><% If adoRs("pay_type") = 1 then %> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <% Else %> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <% End if %></td>
<td align="center"><%=FormatNumber(CDbl(adoRs("pay")), 0)%></td>
<td align="center">
<% If document_status = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" Then %> <img src="/images/<%=tmp_btn_name%>.gif" align="absmiddle" onClick="view_del('<%=document_no%>','<%=x%>', '<%=adoRs("p_sn")%>')" style="CURSOR:pointer;">
<% Else %> <%=document_status%> <% End If %> </td>
<!-- <td align="center" class="tahoma_blue"><%="<22>μ⿩<CEBC><E2BFA9>"%></td> -->
<%
total_pay = total_pay + CDbl(adoRs("pay"))
%>
</tr>
<%
adors.moveNext
next
End if
adoRs.close
max_cnt = max_cnt + 1
%>
<tr>
<td align="center" colspan="4"><3E>հ<EFBFBD></td>
<td align="center"><%=FormatNumber(total_pay, 0)%></td>
<td></td>
</tr>
<tr>
<td colspan="9" bgcolor="#d5d5d5" height="1"></td>
</tr>
</table>
</td>
</tr>
</table>
<input type=hidden name=txt_krc_no size=50 value=''>
<input type=hidden name=txt_max_cnt size=50 value='<%=max_cnt%>'>
<input type=hidden name=txt_title size=50 value='<%=title%>'>
<input type=hidden name=txt_curr_date size=50 value='<%=date()%>'>
</form>
<br/><br/><br/><br/>
<form name='frm_confirm' method='post' style="TEXT-ALIGN: left" >
<table width="100%" cellpadding="2" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td class="brown">
<font class="k_darkorange">
<09><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> & <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ȳ <20>Դϴ<D4B4>.<br>
</font>
<img src="/images/common/blank.gif" width="18" height="1" align="absmiddle">
<09><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>͸<EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ե<EFBFBD><D4B5><EFBFBD> <20>ʽ<EFBFBD><CABD>ϴ<EFBFBD>.<br>
</td>
</tr>
</table>
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
<tr>
<td align="center" ><3E><>ȣ</td>
<td align="center" ><3E><><EFBFBD>籸<EFBFBD><E7B1B8></td>
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڵ<EFBFBD></td>
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
</tr>
<%
query = " SELECT 2 as pay_type, 'cati' as gubun, T.p_child_sn, T.prj_code, case when isnull(p_name,'') = '' then '<27><><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>' else p_name end as p_name FROM "
query = query & " ( "
query = query & " SELECT s.prj_code, P.prj_name, p.intranet_project as p_child_sn, s_client_jumin, s_client as s_client_no, s_client_name, s_date,"
query = query & " c.intranet_pay, C.qc_ok "
'query = query & " FROM new_cati.dbo.Sheet1 s "
query = query & " from ( "
query = query & " select prj_code, s_client, s_tcnt, s_client_jumin, s_client_name, s_date fROM new_cati.dbo.Sheet1 with(nolock) "
query = query & " where s_client_name not in ('Cati_Test', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') "
query = query & " and s_date > '2021-01-01' "
query = query & " ) s "
'query = query & " Left Outer Join new_cati.dbo.T_Inspection_Cati c with(nolock) "
query = query & " Left Outer Join ( SELECT prj_code, tel_client_no, intranet_pay, qc_ok, tel_date, tel_cnt,tel_del_yn FROM new_cati.dbo.T_Inspection_Cati with(nolock) WHERE tel_date > ( getdate() - 365) ) C "
query = query & " ON s.prj_code = c.prj_code AND s.s_client = c.tel_client_no AND s.s_tcnt = c.tel_cnt "
'query = query & " LEFT OUTER JOIN new_cati.dbo.project P with(nolock) "
query = query & " LEFT OUTER JOIN ( SELECT prj_code, prj_name, intranet_project, prj_s_date FROM new_cati.dbo.project with(nolock) WHERE prj_s_date > CONVERT(VARCHAR(10), getdate()-365, 112) ) P "
query = query & " ON S.prj_code = P.prj_code "
query = query & " WHERE c.tel_del_yn = 'N' "
'query = query & " and s.s_client_name not in ('Cati_Test', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') "
'query = query & " AND s.prj_code not in (SELECT prj_code FROM new_cati.dbo.project WHERE intranet_project in (SELECT p_child_sn FROM T_PROJECT_METHOD WHERE p_rsch_dept = '91')) "
query = query & " GROUP BY s.prj_code, P.prj_name, p.intranet_project, s_client_jumin, s_client, s_client_name, s_date, c.intranet_pay, C.qc_ok "
query = query & " ) T "
'query = query & " left outer join T_MYUN_PAY TMP with(nolock) "
query = query & " left outer join ( SELECT id, confirm_yn FROM T_MYUN_PAY with(nolock) WHERE insert_dt > ( getdate() - 365) ) TMP "
query = query & " ON T.intranet_pay = cast(TMP.id as varchar) "
'query = query & " left outer join (SELECT * FROM T_PROJECT_METHOD with(nolock) WHERE p_field_complete is null) tpm "
query = query & " left outer join ( SELECT p_child_sn, p_sv_1, p_field_complete FROM T_PROJECT_METHOD with(nolock) WHERE CONVERT(VARCHAR(10), p_input_dt , 120) > CONVERT(VARCHAR(10), getdate()-365, 120) and p_field_complete is null ) tpm "
query = query & " on T.p_child_sn = tpm.p_child_sn "
query = query & " left outer join person p with(nolock) "
query = query & " on tpm.p_sv_1 = p.p_no "
query = query & " where isnull(TMP.confirm_yn, 'N') = 'N' "
query = query & " and isnull(T.p_child_sn,'') <> '' "
query = query & " and left(T.p_child_sn, 2) > '20' "
query = query & " group by T.p_child_sn, T.prj_code, p_name "
'--hwkim ''''' response.Write query & "<BR><BR><BR>"
query = query & " union all "
query = query & " SELECT 2 as pay_type, 'ff' as gubun, T.p_child_sn, T.prj_code, case when isnull(p_name,'') = '' then '<27><><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>' else p_name end as p_name "
query = query & " FROM ( "
query = query & " SELECT (case when (select count(a.p_child_sn) from t_project_method a with(nolock) inner join t_project_fcs b on a.p_sn = b.p_sn and a.p_method_cd = b.p_method_cd where b.p_child_sn = RE.p_sn) = 1 then "
query = query & " (select a.p_child_sn from t_project_method a with(nolock) inner join t_project_fcs b with(nolock) on a.p_sn = b.p_sn and a.p_method_cd = b.p_method_cd where b.p_child_sn = RE.p_sn) else RE.p_sn end) as p_child_sn, RE.p_sn as prj_code, "
query = query & " TPM.p_subject, p_name, isnull(cnt,0) - isnull(s_wan, 0) as cha "
query = query & " FROM "
query = query & " ( "
query = query & " SELECT R.p_sn, COUNT(*) as cnt FROM Res R with(nolock) LEFT OUTER JOIN T_INSPECTION_RES TIR with(nolock) ON R.r_sn = TIR.r_sn "
query = query & " WHERE TIR.pass_stat <> 'ERROR' AND DelGubun='N' AND r_error is null AND s_error is null AND m_error is null GROUP BY R.p_sn "
query = query & " ) RE "
query = query & " LEFT OUTER JOIN "
query = query & " ( "
query = query & " SELECT isnull(prj_code, p_sn) as prj_code, sum(s_wan) as s_wan FROM T_MYUN_PAY with(nolock) WHERE confirm_yn ='Y' AND s_gubun = 'FF' GROUP BY isnull(prj_code, p_sn) "
query = query & " ) TMP "
query = query & " ON RE.p_sn = TMP.prj_code "
query = query & " LEFT OUTER JOIN "
query = query & " ( "
query = query & " select tpm.p_subject, isnull(tpf.p_child_sn, tpm.p_child_sn) as p_child_sn, isnull(tpf.p_sv_1, tpm.p_sv_1) as p_sv_1 "
query = query & " from (SELECT * FROM T_PROJECT_METHOD with(nolock) WHERE p_field_complete is null) tpm inner join T_PROJECT_FCS tpf with(nolock) on tpm.p_sn = tpf.p_sn and tpm.p_method_cd = tpf.p_method_cd union all "
query = query & " select p_subject, p_child_sn, p_sv_1 from T_PROJECT_METHOD with(nolock) where p_field_complete is null "
query = query & " ) TPM "
query = query & " ON RE.p_sn = TPM.p_child_sn "
query = query & " left outer join person p with(nolock) "
query = query & " ON TPM.p_sv_1 = p.p_no "
query = query & " WHERE p_subject is not null "
query = query & " ) T "
query = query & " WHERE cha <> '0' "
query = query & " GROUP BY T.p_child_sn, T.prj_code, p_name "
query = query & " union all "
query = query & " SELECT 2 as pay_type, 'etc' as gubun, TMP.p_sn as p_child_sn, '' as prj_code, case when isnull(p_name,'') = '' then '<27><><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>' else p_name end as p_name FROM "
query = query & " T_MYUN_PAY TMP with(nolock) "
query = query & " left outer join (SELECT p_child_sn, p_sv_1 FROM T_PROJECT_METHOD with(nolock) WHERE p_field_complete is null) tpm on TMP.p_sn = tpm.p_child_sn "
query = query & " left outer join person p with(nolock) on tpm.p_sv_1 = p.p_no "
query = query & " where isnull(TMP.confirm_yn, 'N') = 'N' and isnull(TMP.p_sn,'') <> '' and left(TMP.p_sn, 2) > '15' "
query = query & " and s_gubun = 'ETC' "
query = query & " group by TMP.p_sn, p_name "
'--hwkim ''''' response.Write query & "<BR>"
adoRs.open query, adoconn, adopenstatic, adlockreadonly
Dim project_apply_username
Dim user_NotSeting_cnt
user_NotSeting_cnt = 0
'Response.Write "query : " & query &"<BR>"
If adors.recordCount > 0 Then
For i = 1 To adors.recordCount
project_apply_username = adoRs("p_name")
Dim view_flag
view_flag = True
If Session("Depart_Code") = 12 And Session("teamplace") < 2 Then
If project_apply_username <> "<22><><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>" And project_apply_username <> session("loginuser") Then
view_flag = false
End If
End If
If view_flag = True Then
%>
<tr>
<td align="center"><%=i%></td>
<td align="center"><% If adoRs("pay_type") = 1 then %> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <% Else %> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <% End if %></td>
<td align="center"><%=adoRs("p_child_sn")%><% if adoRs("gubun") = "cati" or adoRs("gubun") = "ff" then response.Write "(" & adoRs("prj_code") & ")" end if %></td>
<td align="center"><%=project_apply_username%></td>
<input type="hidden" name="pay_type" value='<%=adoRs("pay_type")%>'>
</tr>
<%
End if
adors.moveNext
next
End if
adoRs.close
%>
<input type="hidden" name="user_NotSeting_cnt" value='<%=user_NotSeting_cnt%>'>
<tr>
<td colspan="11" bgcolor="#d5d5d5" height="1"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</div>
</div>
</div>
</div>
</div>
<!-- /.content -->
<!-- REQUIRED SCRIPTS -->
<script>
$(function(){
$("#sel_month").datepicker({
dateFormat: 'mm-yy',
changeMonth: true,
changeYear: true,
showButtonPanel: true,
onClose: function(dateText, inst) {
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).val($.datepicker.formatDate('yy-mm', new Date(year, month, 1)));
}
});
$("#sel_month").focus(function () {
$(".ui-datepicker-calendar").hide();
$("#ui-datepicker-div").position({
my: "center top",
at: "center bottom",
of: $(this)
});
});
$("#sel_month").on('click', function () {
var selDate = new Date($("#sel_month").val());
$("#ui-datepicker-div .ui-datepicker-year option[value='" + selDate.getFullYear() + "']").prop("selected", true);
$("#ui-datepicker-div .ui-datepicker-month option[value='" + selDate.getMonth() + "']").prop("selected", true);
});
});
</script>
</div>
<!-- /.content-wrapper -->
<!-- #include virtual = "include/footer.asp" -->