최초커밋

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

View File

@@ -0,0 +1,293 @@
<!-- #include virtual = "lib/config.asp" -->
<%
dim Query
dim i,j
dim user_name(4) '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0:<3A><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>, 1:<3A≯<EFBFBD>,2:<3A><><EFBFBD><EFBFBD>,3:<3A><>ȭ<EFBFBD><C8AD>ȣ, 4:<3A>μ<EFBFBD><CEBC>ڵ<EFBFBD>(<28><>)
dim Curr_date '<27><><EFBFBD>ó<EFBFBD>¥
dim Company(6)
dim Gap()
dim Max_length '<27>Է°<D4B7><C2B0><EFBFBD> <20>ټ<EFBFBD><D9BC><EFBFBD><EFBFBD><EFBFBD>
dim print_type '1:<3A><><EFBFBD><EFBFBD>, 2:<3A><>¥<EFBFBD><C2A5><EFBFBD><EFBFBD>Ʈ
dim depart_cost_type
dim depart_gubun
dim y_m
dim cost_type(2) ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
cost_type(1) = "<22><><EFBFBD>ι<EFBFBD><CEB9><EFBFBD>ī<EFBFBD><C4AB>"
cost_type(2) = "<22><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>ī<EFBFBD><C4AB>"
print_type = request("print_type")
depart_cost_type = request("depart_div")
depart_gubun = "<22><>"
if depart_cost_type = "2" then
depart_gubun = "<22><>"
end if
y_m = request("y_m")
if y_m = "" then
y_m = LEFT(date, 7)
end if
Curr_date = year(date) & "<22><> " & zeroformat(month(date),2) & "<22><> " & zeroformat(day(date),2) & "<22><>"
Query = ""
Query = Query & " SELECT VGC.cost_date, VGC.p_no, VGC.txt_pjt, ISNULL(TPM.p_subject, '<27>Ϲݾ<CFB9><DDBE><EFBFBD>') AS p_subject, VGC.txt_hangmok, VGC.contents, VGC.cost, M.target97, M.target99 "
Query = Query & " FROM V_GROUP_COST_NEW VGC LEFT JOIN T_PROJECT_METHOD TPM ON VGC.txt_pjt = TPM.p_child_sn "
Query = Query & " LEFT JOIN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> M ON VGC.d_no = M.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ "
Query = Query & " WHERE VGC.p_no = '" & session("User_Number") & "' "
Query = Query & " AND CONVERT(VARCHAR(7), VGC.cost_date) = '" & y_m & "' "
Query = Query & " ORDER BY VGC.cost_date "
'response.Write query
rsc.Open query, adoConn, 1
tmp_0 = split(rsc("target97"), "^^")
user_name(0) = rsc("p_no") '<27><><EFBFBD><EFBFBD>
user_name(1) = tmp_0(0) '<27≯<EFBFBD>
user_name(2) = tmp_0(1) '<27><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>
user_name(3) = tmp_0(2) '<27><><EFBFBD><EFBFBD> <20><>ȭ
user_name(4) = tmp_0(3) '<27>μ<EFBFBD><CEBC>ڵ<EFBFBD>
tmp_7 = split(rsc("target99"), "^^")
if trim(tmp_7(0)) <> "<22><><EFBFBD><EFBFBD>" and trim(tmp_7(0)) <> "" then
tmp_t1 = split(tmp_7(0), "<BR>")
tmp_txt1 = "<img src='/images/sign/" & tmp_t1(0) & "_" & tmp_t1(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt1 = trim(tmp_7(0))
end if
if trim(tmp_7(1)) <> "<22><><EFBFBD><EFBFBD>" and trim(tmp_7(1)) <> "" then
tmp_t2 = split(tmp_7(1), "<BR>")
tmp_txt2 = "<img src='/images/sign/" & tmp_t2(0) & "_" & tmp_t2(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt2 = trim(tmp_7(1))
end if
if trim(tmp_7(2)) <> "<22><><EFBFBD><EFBFBD>" and trim(tmp_7(2)) <> "" then
tmp_t3 = split(tmp_7(2), "<BR>")
tmp_txt3 = "<img src='/images/sign/" & tmp_t3(0) & "_" & tmp_t3(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt3 = trim(tmp_7(2))
end if
if trim(tmp_7(3)) <> "<22><><EFBFBD><EFBFBD>" and trim(tmp_7(3)) <> "" then
tmp_t4 = split(tmp_7(3), "<BR>")
tmp_txt4 = "<img src='/images/sign/" & tmp_t4(0) & "_" & tmp_t4(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt4 = trim(tmp_7(3))
end if
if trim(tmp_7(4)) <> "<22><><EFBFBD><EFBFBD>" and trim(tmp_7(4)) <> "" then
tmp_t5 = split(tmp_7(4), "<BR>")
tmp_txt5 = "<img src='/images/sign/" & tmp_t5(0) & "_" & tmp_t5(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt5 = trim(tmp_7(4))
end if
%>
<html>
<head>
<title><%=GNB_TITLE%></title>
<link rel="stylesheet" type="text/css" href="/css/basic.css">
</head>
<script language=javascript>
function win_close()
{
window.close();
}
function win_print()
{
var url = "approval_depart_all_print.asp";
url = url + "?print_type=2";
document.depart_cost.action = url;
document.depart_cost.submit();
}
function print_ie()
{
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1){ // Chrome Browser Detected?
window.PPClose = false; // Clear Close Flag
window.onbeforeunload = function(){ // Before Window Close Event
if(window.PPClose === false){ // Close not OK?
return 'Leaving this page will block the parent window!\nPlease select "Stay on this Page option" and use the\nCancel button instead to close the Print Preview Window.\n';
}
}
window.print(); // Print preview
window.PPClose = true; // Set Close Flag to OK.
}else{
window.print();
window.close();
}
}
</script>
<body topmargin="10" leftmargin="10" <%if cint(print_type) = 2 then%> onLoad="print_ie();" <% end if %>>
<form method='post' name='depart_cost'>
<input type="hidden" name="y_m" value="<%=y_m %>" />
<input type="hidden" name="depart_div" value="<%=request("depart_div") %>" />
<%if cint(print_type) <> 2 then%>
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td>
<img src="/images/common/btn_print2.jpg" border="0" onClick="win_print()" style="CURSOR:pointer;">
<img src="/images/common/btn_cancel.jpg" border="0" onClick="win_close();" style="CURSOR:pointer;">
</td>
</tr>
</table>
<%end if%>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" style="padding:20;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="/images/approval/docbg_top.jpg"></td>
</tr>
<tr>
<td width="710" align="center" style="padding:10;border-left:1px solid #dedede;border-right:1px solid #dedede;">
<table width="95%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" style="padding:0 0 10 0">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td width="255">
<%
'if depart_cost_type = "1" then
' tmp_tit = "<22>׷<EFBFBD>Ȱ<EFBFBD><C8B0><EFBFBD><EFBFBD>"
'elseif depart_cost_type = "2" then
' tmp_tit = "<22>׷<EFBFBD><D7B7><EFBFBD>Ȱ<EFBFBD><C8B0><EFBFBD><EFBFBD>"
'end if
tmp_tit = "<22>׷<EFBFBD><D7B7><EFBFBD><EEBFB5>"
%>
<span style="color:#636B7E;font-family:batang;font-weight:bold;font-size:40px;letter-spacing:-6;line-height:30px;"><%=tmp_tit%></span></td>
<td>
<div style="width:100%;">
<table width="100%" align="right" cellpadding="0" cellspacing="1" border="1" style="border-collapse:collapse;" bgcolor="#d8d8d8">
<tr>
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)</td>
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)</td>
</tr>
<tr>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><CEBC><EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><>ǥ<EFBFBD>̻<EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><CEBC><EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><>ǥ<EFBFBD>̻<EFBFBD></td>
</tr>
<tr height=40>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt1%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt2%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt3%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt4%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt5%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;<3B><>&nbsp;&nbsp;&nbsp;<3B><>&nbsp;<3B><></b></td>
<td width="80%" class="tahoma"><%=Curr_date%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<3B><></b></td>
<td width="80%"><%=user_name(1)%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<3B><></b></td>
<td width="80%"><%=user_name(4)%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<3B><></b></td>
<td width="80%"><%=user_name(2)%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td colspan="2" align="center" style="padding:10 0 0 0">
<table width="100%" cellpadding="3" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td width="10%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD></td>
<td width="50%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ(<28><><EFBFBD><EFBFBD>)<29><>/<2F><><EFBFBD><EFBFBD></td>
<td width="10%" class="tit2" align="center"><3E>׸<EFBFBD></td>
<td width="20%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD></td>
<td width="10%" class="tit2" align="center"><3E>ݾ<EFBFBD></td>
</tr>
<%
Dim d_date, d_project, d_hangmok, d_contents, d_cost, d_cost_kind
Dim sum_cost
sum_cost=0
Do while Not rsc.Eof
d_date = rsc("cost_date")
d_project = "[" & rsc("txt_pjt") & "] " & rsc("p_subject")
d_hangmok = rsc("txt_hangmok")
d_contents = rsc("contents")
d_cost = rsc("cost")
sum_cost = sum_cost + cdbl(d_cost)
' split(rsc("contents"), "^^") --> 2017-02-14^^<5E>Ϲݾ<CFB9><DDBE><EFBFBD> - <20><>Ÿ^^1^^5000^^99999^^<5E><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>ī<EFBFBD><C4AB>
%>
<tr>
<td class="tit7" align="center"><font class="tahoma"><%=d_date%></font></td>
<td class="tit7"><font class="tahoma"><%=d_project%></font></td>
<td class="tit7" align="center"><font class="tahoma"><%=d_hangmok%></font></td>
<td class="tit7"><font class="tahoma"><%=d_contents%></font></td>
<td class="tit7" align="right"><font class="tahoma"><3E><><%=formatnumber(d_cost,0)%>&nbsp;</font></td>
</tr>
<%
rsc.MoveNext
Loop
%>
<tr>
<td colspan="4" class="tit2" align="center"><3E>հ<EFBFBD></td>
<td class="tit2" align="right"><font class="tahoma"><3E><><%=formatnumber(sum_cost,0)%>&nbsp;</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" style="padding:20 0 0 0" align="right">
<pre><font class="tahoma"> <09><> <20><> <20><> <20><> : <20><> <20><> <20><></font></pre>
<pre><font class="tahoma"> <09><> <20><> <20><> : (<28><>)</font></pre>
</td>
</tr>
<tr>
<td colspan="2" align="center" style="padding:15 0 5 0"><!-- #include virtual= "approval/inc_logo.asp" --></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="/images/approval/docbg_btm.jpg"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
<%
rsc.Close
%>

View File

@@ -0,0 +1,283 @@
<!-- #include virtual = "lib/config.asp" -->
<%
'Response.write session("User_Number")
dim Query
dim i,j
dim user_name(4) '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0:<3A><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>, 1:<3A≯<EFBFBD>,2:<3A><><EFBFBD><EFBFBD>,3:<3A><>ȭ<EFBFBD><C8AD>ȣ, 4:<3A>μ<EFBFBD><CEBC>ڵ<EFBFBD>(<28><>)
dim Curr_date '<27><><EFBFBD>ó<EFBFBD>¥
dim Company(6)
dim Gap()
dim print_type '1:<3A><><EFBFBD><EFBFBD>, 2:<3A><>¥<EFBFBD><C2A5><EFBFBD><EFBFBD>Ʈ
dim y_m
print_type = request("print_type")
y_m = request("y_m")
if y_m = "" then
y_m = LEFT(date, 7)
end if
Curr_date = year(date) & "<22><> " & zeroformat(month(date),2) & "<22><> " & zeroformat(day(date),2) & "<22><>"
Query = ""
Query = Query & " SELECT <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, CONVERT(VARCHAR(10), target3) as d_date, V.p_subject, M.p_sn, "
Query = Query & " convert(varchar(300), target2) as content, convert(varchar(20), target4) as cost, "
Query = Query & " convert(varchar(50), target9) as cli_company, convert(varchar(30), target7) as cli_nm, "
Query = Query & " convert(varchar(30), target15) as money_type, convert(varchar(1000), target99) as target99 "
Query = Query & " FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> M LEFT JOIN V_PROJECT_METHOD V ON M.p_sn = V.p_child_sn OR M.p_sn = V.p_sn "
Query = Query & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD>񺸰<EFBFBD><F1BAB8B0><EFBFBD>' AND del_yes_no='no' "
Query = Query & " AND login_p_no='" & session("User_Number") & "' AND CONVERT(VARCHAR(7), target3) = '" & y_m & "' "
Query = Query & " ORDER BY CONVERT(VARCHAR(10), target3) "
'response.Write query
rsc.Open query, adoConn, 1
if print_type = "2" then
query = " update <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> set print_chk = 'Yes', print_cnt = print_cnt + 1 "
query = query & " where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ in ("
query = query & " select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ from <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
query = query & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='<27><><EFBFBD><EFBFBD><EFBFBD>񺸰<EFBFBD><F1BAB8B0><EFBFBD>' AND del_yes_no='no' "
query = query & " AND login_p_no='" & session("User_Number") & "' "
query = query & " AND CONVERT(VARCHAR(7), target3) = '" & y_m & "' "
query = query & " ) "
adoConn.Execute query
end if
user_name(0) = session("User_Number")
Query = "SELECT p_name, p_team_name, p_rank_name, p_tel3 FROM project2.dbo.V_Person WHERE p_no = '" & user_name(0) & "'"
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
user_name(1) = adoRs("p_name") '<27≯<EFBFBD>
user_name(2) = adoRs("p_rank_name") '<27><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>
user_name(3) = adoRs("p_tel3") '<27><><EFBFBD><EFBFBD> <20><>ȭ
user_name(4) = adoRs("p_team_name") '<27>μ<EFBFBD><CEBC>ڵ<EFBFBD>
adoRs.close
tmp_7 = split(rsc("target99"), "^^")
if trim(tmp_7(0)) <> "<22><><EFBFBD><EFBFBD>" and trim(tmp_7(0)) <> "" then
tmp_t1 = split(tmp_7(0), "<BR>")
tmp_txt1 = "<img src='/images/sign/" & tmp_t1(0) & "_" & tmp_t1(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt1 = trim(tmp_7(0))
end if
if trim(tmp_7(1)) <> "<22><><EFBFBD><EFBFBD>" and trim(tmp_7(1)) <> "" then
tmp_t2 = split(tmp_7(1), "<BR>")
tmp_txt2 = "<img src='/images/sign/" & tmp_t2(0) & "_" & tmp_t2(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt2 = trim(tmp_7(1))
end if
if trim(tmp_7(2)) <> "<22><><EFBFBD><EFBFBD>" and trim(tmp_7(2)) <> "" then
tmp_t3 = split(tmp_7(2), "<BR>")
tmp_txt3 = "<img src='/images/sign/" & tmp_t3(0) & "_" & tmp_t3(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt3 = trim(tmp_7(2))
end if
if trim(tmp_7(3)) <> "<22><><EFBFBD><EFBFBD>" and trim(tmp_7(3)) <> "" then
tmp_t4 = split(tmp_7(3), "<BR>")
tmp_txt4 = "<img src='/images/sign/" & tmp_t4(0) & "_" & tmp_t4(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt4 = trim(tmp_7(3))
end if
if trim(tmp_7(4)) <> "<22><><EFBFBD><EFBFBD>" and trim(tmp_7(4)) <> "" then
tmp_t5 = split(tmp_7(4), "<BR>")
tmp_txt5 = "<img src='/images/sign/" & tmp_t5(0) & "_" & tmp_t5(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt5 = trim(tmp_7(4))
end if
%>
<html>
<head>
<title><%=GNB_TITLE%></title>
<link rel="stylesheet" type="text/css" href="/css/basic.css">
</head>
<script language=javascript>
function win_close()
{
window.close();
}
function win_print()
{
var url = "approval_entertainment_all_print.asp";
url = url + "?print_type=2";
document.enter_cost.action = url;
document.enter_cost.submit();
}
function print_ie()
{
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1){ // Chrome Browser Detected?
window.PPClose = false; // Clear Close Flag
window.onbeforeunload = function(){ // Before Window Close Event
if(window.PPClose === false){ // Close not OK?
return 'Leaving this page will block the parent window!\nPlease select "Stay on this Page option" and use the\nCancel button instead to close the Print Preview Window.\n';
}
}
window.print(); // Print preview
window.PPClose = true; // Set Close Flag to OK.
}else{
window.print();
window.close();
}
}
</script>
<body topmargin="10" leftmargin="10" <%if cint(print_type) = 2 then%> onLoad="print_ie();" <% end if %>>
<form method='post' name='enter_cost'>
<input type="hidden" name="y_m" value="<%=y_m %>" />
<%if cint(print_type) <> 2 then%>
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td>
<img src="/images/common/btn_print2.jpg" border="0" onClick="win_print()" style="CURSOR:pointer;">
<img src="/images/common/btn_cancel.jpg" border="0" onClick="win_close();" style="CURSOR:pointer;">
</td>
</tr>
</table>
<%end if%>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" style="padding:20;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="/images/approval/docbg_top.jpg"></td>
</tr>
<tr>
<td width="710" align="center" style="padding:10;border-left:1px solid #dedede;border-right:1px solid #dedede;">
<table width="95%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" style="padding:0 0 10 0">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td width="255">
<span style="color:#636B7E;font-family:batang;font-weight:bold;font-size:40px;letter-spacing:-6;line-height:30px;"><3E><><EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD></span></td>
<td>
<div style="width:100%;">
<table width="100%" align="right" cellpadding="0" cellspacing="1" border="1" style="border-collapse:collapse;" bgcolor="#d8d8d8">
<tr>
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)</td>
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)</td>
</tr>
<tr>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><CEBC><EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><>ǥ<EFBFBD>̻<EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><CEBC><EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><>ǥ<EFBFBD>̻<EFBFBD></td>
</tr>
<tr height=40>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt1%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt2%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt3%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt4%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt5%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;<3B><>&nbsp;&nbsp;&nbsp;<3B><>&nbsp;<3B><></b></td>
<td width="80%" class="tahoma"><%=Curr_date%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<3B><></b></td>
<td width="80%"><%=user_name(1)%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<3B><></b></td>
<td width="80%"><%=user_name(4)%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<3B><></b></td>
<td width="80%"><%=user_name(2)%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td colspan="2" align="center" style="padding:10 0 0 0">
<table width="100%" cellpadding="3" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td width="10%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
<td width="25%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td>
<td width="10%" class="tit2" align="center"><3E>ݾ<EFBFBD></td>
<td width="40%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
<td width="15%" class="tit2" align="center">ȸ<><C8B8><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)</td>
</tr>
<%
Dim sum_cost
sum_cost=0
Do while Not rsc.Eof
sum_cost = sum_cost + cdbl(rsc("cost"))
%>
<tr>
<td class="tit7" align="center"><font class="tahoma"><%=rsc("d_date")%></font></td>
<td class="tit7" style="word-break:keep-all;"><font class="tahoma">(<%=rsc("p_sn")%>)<%=iif(rsc("p_sn") = "99999", "<22><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", rsc("p_subject"))%></font></td>
<td class="tit7" align="right"><font class="tahoma"><3E><><%=formatnumber(rsc("cost"),0)%>&nbsp;</font></td>
<td class="tit7" style="word-break:keep-all;"><font class="tahoma"><%=rsc("content")%></font></td>
<td class="tit7" style="word-break:keep-all;"><font class="tahoma"><%=rsc("cli_company")%><% if rsc("cli_nm") <> "" then %>(<%=rsc("cli_nm")%>)<% end if %></font></td>
</tr>
<%
rsc.MoveNext
Loop
%>
<tr>
<td class="tit2" align="center" colspan="2"><3E>հ<EFBFBD></td>
<td class="tit2" align="right"><font class="tahoma"><3E><><%=formatnumber(sum_cost,0)%>&nbsp;</font></td>
<td class="tit2" colspan="2"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" style="padding:20 0 0 0" align="right">
<pre><font class="tahoma"> <09><> <20><> <20><> <20><> : <20><> <20><> <20><></font></pre>
<pre><font class="tahoma"> <09><> <20><> <20><> : (<28><>)</font></pre>
</td>
</tr>
<tr>
<td colspan="2" align="center" style="padding:15 0 5 0"><!-- #include virtual= "approval/inc_logo.asp" --></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="/images/approval/docbg_btm.jpg"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
<%
rsc.Close
%>

140
business/busi_approval.asp Normal file
View File

@@ -0,0 +1,140 @@
<!-- #include virtual = "lib/config.asp" -->
<!-- #include virtual = "lib/json2.asp" -->
<%
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
dim info : set info = JSON.parse(request("data"))
dim query, krc_no, tmpstr, tmp
dim Company(6)
dim user_name(4)
dim target97, target98, target99, target100
dim executeCount : executeCount = 0
dim title : title = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
''ȸ<><C8B8> ȸ<><C8B8><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5>Ϲ<EFBFBD>ȣ, <20><>ǥ<EFBFBD>ڸ<EFBFBD>, <20>ּ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
query = "select * from company"
adoRs.open query, adoconn,adopenstatic, adlockreadonly
Company(1) = adors("com_name")
Company(2) = adors("<22><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5>Ϲ<EFBFBD>ȣ")
Company(3) = adors("<22><>ǥ<EFBFBD>ڸ<EFBFBD>")
Company(4) = adors("<22>ּ<EFBFBD>")
Company(5) = adors("<22><><EFBFBD>ε<EFBFBD><CEB5>Ϲ<EFBFBD>ȣ")
Company(6) = adors("ȸ<><C8B8><EFBFBD><EFBFBD>ǥ<EFBFBD><C7A5>ȭ<EFBFBD><C8AD>ȣ")
adoRs.close
''<27>α<EFBFBD><CEB1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
user_name(0) = Session("User_Number")
query = "SELECT p_name, p_team_name, p_rank_name, p_tel3 FROM project2.dbo.V_Person WHERE p_no = '" & user_name(0) & "'"
adoRs.open query, adoconn,adopenstatic, adlockreadonly
user_name(1) = adoRs("p_name") '<27≯<EFBFBD>
user_name(2) = adoRs("p_rank_name") '<27><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>
user_name(3) = adoRs("p_tel3") '<27><><EFBFBD><EFBFBD> <20><>ȭ
user_name(4) = adoRs("p_team_name") '<27>μ<EFBFBD><CEBC>ڵ<EFBFBD>
adoRs.close
query = " select d_no as krc_no from document "
query = query & " where d_name = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' "
query = query & " and substring(d_no, 5, 4) = '" & year(date) & "' "
query = query & " order by d_no "
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
if adoRs.recordcount <= 0 then
krc_no = 0
else
adoRs.movelast
tmpstr = split(trim(adoRs("krc_no")),"-")
krc_no = tmpstr(3)
end if
adoRs.close
krc_no = int(krc_no) + 1
tmpstr = "KRC-" & year(date) & "-"
tmpstr = tmpstr & "B-"
krc_no = tmpstr & ZeroFormat(krc_no,5)
target97 = user_name(1) & "^^" & user_name(2) & "^^" & user_name(3) & "^^" & user_name(4)
target98 = Company(1) & "^^" & Company(2) & "^^" & Company(3) & "^^" & Company(4) & "^^" & Company(5) & "^^" & Company(6)
tmp_txt = Session("loginuser") & "<BR>" & replace(date(), "-","") & "<BR>" & Session("User_Number")
if my_pos = 6 then '<27><><EFBFBD><EFBFBD>
tmp_txt1 = "<22><><EFBFBD><EFBFBD>" : tmp_txt2 = "<22><><EFBFBD><EFBFBD>" : tmp_txt3 = "<22><><EFBFBD><EFBFBD>" : tmp_txt4 = "<22><><EFBFBD><EFBFBD>" : tmp_txt5 = tmp_txt
tmp_txt6 = "/" : tmp_txt7 = "/" : tmp_txt8 = "/" : tmp_txt9 = "/" : tmp_txt10 = month(now()) & " / " & day(now())
elseif my_pos = 5 then '<27>ӿ<EFBFBD>
tmp_txt1 = "<22><><EFBFBD><EFBFBD>" : tmp_txt2 = "<22><><EFBFBD><EFBFBD>" : tmp_txt3 = "<22><><EFBFBD><EFBFBD>" : tmp_txt4 = tmp_txt : tmp_txt5 = " "
tmp_txt6 = "/" : tmp_txt7 = "/" : tmp_txt8 = "/" : tmp_txt9 = month(now()) & " / " & day(now()) : tmp_txt10 = "/"
elseif my_pos = 3 or my_pos = 4 then '<27>μ<EFBFBD><CEBC><EFBFBD>
tmp_txt1 = "<22><><EFBFBD><EFBFBD>" : tmp_txt2 = "<22><><EFBFBD><EFBFBD>" : tmp_txt3 = tmp_txt : tmp_txt4 = " " : tmp_txt5 = " "
tmp_txt6 = "/" : tmp_txt7 = "/" : tmp_txt8 = month(now()) & " / " & day(now()) : tmp_txt9 = "/" : tmp_txt10 = "/"
elseif my_pos = 2 then '<27><><EFBFBD><EFBFBD>
tmp_txt1 = tmp_txt : tmp_txt2 = "<22><><EFBFBD><EFBFBD>" : tmp_txt3 = " " : tmp_txt4 = " " : tmp_txt5 = " "
tmp_txt6 = month(now()) & " / " & day(now()) : tmp_txt7 = "/" : tmp_txt8 = "/" : tmp_txt9 = "/" : tmp_txt10 = "/"
elseif my_pos = 1 then '<27><> <20><><EFBFBD><EFBFBD>
tmp_txt1 = tmp_txt : tmp_txt2 = " " : tmp_txt3 = " " : tmp_txt4 = " " : tmp_txt5 = " "
tmp_txt6 = month(now()) & " / " & day(now()) : tmp_txt7 = "/" : tmp_txt8 = "/" : tmp_txt9 = "/" : tmp_txt10 = "/"
else '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
tmp_txt1 = tmp_txt : tmp_txt2 = "<22><><EFBFBD><EFBFBD>" : tmp_txt3 = " " : tmp_txt4 = " " : tmp_txt5 = " "
tmp_txt6 = month(now()) & " / " & day(now()) : tmp_txt7 = "/" : tmp_txt8 = "/" : tmp_txt9 = "/" : tmp_txt10 = "/"
end if
%>
<!-- #include file = "../approval/inc_payapproval.asp" -->
<!-- #include file = "../approval/inc_payapproval_line.asp" -->
<!-- #include file = "../approval/inc_preapproval.asp" -->
<%
target99 = tmp_txt1 & "^^" & tmp_txt2 & "^^" & tmp_txt3 & "^^" & tmp_txt4 & "^^" & tmp_txt5
target100 = tmp_txt6 & "^^" & tmp_txt7 & "^^" & tmp_txt8 & "^^" & tmp_txt9 & "^^" & tmp_txt10
'Document table<6C><65> <20><><EFBFBD><EFBFBD>
query = "INSERT INTO Document "
query = query & " (d_no, d_name, d_write_name, d_write_date, d_flag, d_type, "
query = query & " d_order_cnt, d_orders,"
query = query & " d_order1, d_order2, d_order3, d_order4, d_order5, "
query = query & " d_order6, d_order7, d_order8, d_order9, d_order10, "
query = query & " d_view, d_delok) "
query = query & "VALUES "
query = query & " ('" & krc_no & "', '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '" & Session("loginuser") & "', '" & date() & "', '14', '" & d_type & "', "
query = query & " '" & d_order_cnt & "', '" & d_orders & "', "
query = query & " '" & d_order1 & "', '" & d_order2 & "', '" & d_order3 & "', '" & d_order4 & "', '" & d_order5 & "', "
query = query & " '" & d_order6 & "', '" & Session("User_Number") & "', '" & d_orders & "', '" & date() & "', '" & d_order10 & "', "
query = query & " 'N', 'N') "
adoconn.execute query
'====================================================================
'//========================
'<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD>
query = "insert into <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, "
query = query & " target3, target4, target97, target98, target99, target100, "
query = query & " <20>߱<EFBFBD><DFB1><EFBFBD>, <20>߱޽ð<DEBD>, login_p_no, login_<6E≯<EFBFBD>,login_ip, part) values ( "
query = query & "'" & krc_no & "', "
query = query & "'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', "
query = query & "'" & info.j_date_1 & "', "
query = query & "'" & info.j_date_2 & "', "
query = query & "'" & target97 & "', "
query = query & "'" & target98 & "', "
query = query & "'" & target99 & "', "
query = query & "'" & target100 & "', "
query = query & "'" & year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2) & "', "
query = query & "'" & time() & "', "
query = query & "'" & user_name(0) & "', "
query = query & "'" & user_name(1) & "', "
query = query & "'" & Session("USERIP") & "',"
query = query & "'" & part & "') "
adoconn.execute query
query = " UPDATE Job_List SET j_approval = '" & krc_no & "' "
query = query & " WHERE j_date BETWEEN '" & info.j_date_1 & "' AND '" & info.j_date_2 & "' "
query = query & " AND p_no = '" & Session("User_Number") & "' AND j_flag = '1' "
adoconn.execute query, executeCount
Response.Clear
if executeCount > 0 then
Response.Write "1"
else
Response.Write "0"
end if
%>

View File

@@ -0,0 +1,117 @@
<!-- #include virtual = "lib/config.asp" -->
<!-- #include virtual = "lib/json2.asp" -->
<%
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
dim info : set info = JSON.parse(request("data"))
dim query, d_no, tmpstr, tmp, tmp2, tmp_i
dim d_order_cnt, d_orders, target99, target100
dim executeCount : executeCount = 0
d_no = info.d_no
query = "SELECT * "
query = query & "FROM Document as a "
query = query & " INNER JOIN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as b on a.d_no = b.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ "
query = query & "WHERE a.d_no='" & d_no & "' "
adors.Open query, adoConn, 1
if adors.RecordCount > 0 then
'----------------------------------------------------
tmp = split(adors("target99"), "^^")
for i = 0 to ubound(tmp)
if trim(tmp(i)) = "" then
tmp(i) = Session("loginuser") & "<BR>" & replace(date(), "-", "") & "<BR>" & Session("User_Number")
tmp_i = i
exit for
end if
next
'----------------------------------------------------
'target100<30><30> <20><>¥ <20><><EFBFBD><EFBFBD>
tmp2 = split(adors("target100"), "^^")
tmp2(tmp_i) = month(now()) & " / " & day(now())
'----------------------------------------------------
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD> <20><><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0><EFBFBD><EFBFBD> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>
tmp_i = tmp_i + 1
for i = int(adors("d_order_cnt")) + 1 to ubound(tmp) + 1
if adors("d_order" & i) = "<22><><EFBFBD><EFBFBD>" or adors("d_order" & i) = "NO" then
tmp_order_value = "<22><><EFBFBD><EFBFBD>"
if adors("d_order" & i) = "<22><><EFBFBD><EFBFBD>" then
tmp_1 = "1"
else
tmp_1 = "0"
end if
if tmp_1 = "1" then
tmp(tmp_i) = tmp_order_value
tmp_i = tmp_i + 1
end if
else
d_order_cnt = i
d_orders = adors("d_order" & i)
exit for
end if
next
'<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD>
if i > ubound(tmp) + 1 then
d_order_cnt = "77"
d_orders = adors("login_p_no")
end if
target99 = ""
for i = 0 to ubound(tmp)
if i <> 0 then
target99 = target99 & "^^"
end if
target99 = target99 & tmp(i)
next
target100 = ""
for i = 0 to ubound(tmp2)
if i <> 0 then
target100 = target100 & "^^"
end if
target100 = target100 & tmp2(i)
next
query = " UPDATE Document "
query = query & " SET "
query = query & " d_order_cnt = '" & d_order_cnt & "', "
query = query & " d_orders = '" & d_orders & "' "
query = query & " WHERE d_no = '" & d_no & "' "
query = query & " OR d_no IN ( "
query = query & " SELECT DISTINCT d_no "
query = query & " FROM V_GROUP_COST_NEW "
query = query & " WHERE cost_date BETWEEN '" & adors("target3") & "' AND '" & adors("target4") & "' "
query = query & " AND p_no = '" & adors("login_p_no") & "' "
query = query & " ); "
query = query & " UPDATE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
query = query & " SET "
query = query & " target99 = '" & target99 & "', "
query = query & " target100 = '" & target100 & "' "
query = query & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = '" & d_no & "' "
query = query & " OR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ IN ( "
query = query & " SELECT DISTINCT d_no "
query = query & " FROM V_GROUP_COST_NEW "
query = query & " WHERE cost_date BETWEEN '" & adors("target3") & "' AND '" & adors("target4") & "' "
query = query & " AND p_no = '" & adors("login_p_no") & "' "
query = query & " ) "
adoconn.execute query, executeCount
End if
Response.Clear
if executeCount > 0 then
Response.Write "1"
else
Response.Write "0"
end if
adors.Close
%>

34
business/busi_cancel.asp Normal file
View File

@@ -0,0 +1,34 @@
<!-- #include virtual = "lib/config.asp" -->
<!-- #include virtual = "lib/json2.asp" -->
<%
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
dim info : set info = JSON.parse(request("data"))
dim query, krc_no
dim executeCount : executeCount = 0
query = " UPDATE Document SET d_delok = 'Y' WHERE d_no = '" & info.d_no & "' "
adoconn.execute query
query = " UPDATE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SET del_yes_no = 'yes' WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = '" & info.d_no & "' "
adoconn.execute query
query = " UPDATE Job_List SET j_approval = '' "
query = query & " WHERE j_date BETWEEN '" & info.j_date_1 & "' AND '" & info.j_date_2 & "' "
query = query & " AND p_no = '" & Session("User_Number") & "' AND j_flag = '1' "
query = query & " AND MONTH(j_date) = '" & info.conmonth & "' " '//-- hwkim 20220610
adoconn.execute query, executeCount
if executeCount > 0 then
Response.Write "1"
else
Response.Write "0"
end if
%>

43
business/busi_delete.asp Normal file
View File

@@ -0,0 +1,43 @@
<!-- #include virtual = "lib/config.asp" -->
<!-- #include virtual = "lib/json2.asp" -->
<%
Response.CharSet = "EUC-KR"
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
dim info : set info = JSON.parse(request("data"))
dim query
dim executeCount : executeCount = 0
query = " UPDATE Job_List SET j_flag = '0' "
query = query & " WHERE p_no = '" & Session("User_Number") & "' "
if info.prj_code <> "" Then
query = query & " AND j_p_sn = '" & info.prj_code & "' "
End if
if info.j_date_2 = "" Then
query = query & " AND j_date = '" & info.j_date_1 & "' "
Else
query = query & " AND j_date BETWEEN '" & info.j_date_1 & "' AND '" & info.j_date_2 & "' "
End if
query = query & " AND MONTH(j_date) = '" & info.conmonth & "' " '//-- hwkim 20220610
'response.write query
'response.end
if info.prj_code <> "" Or info.j_date_1 <> "" Then
adoConn.Execute query
executeCount = 1
Else
executeCount = 0
End if
if executeCount > 0 then
Response.Write "1"
else
Response.Write "0"
end if
%>

1203
business/busi_list.asp Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,30 @@
<!-- #include virtual = "lib/config.asp" -->
<%
command = request("command")
p_child_sn = request("p_child_sn")
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
query = " "
if command = "remove" Then
query = query & " DELETE FROM job_projectlist "
query = query & " WHERE p_user = '" & Session("user_number") & "' AND p_child_sn = '" & p_child_sn & "' "
End if
if command = "add" Then
query = query & " INSERT INTO job_projectlist "
query = query & " SELECT p_sn, p_subject, '" & Session("user_number") & "' AS p_user, 'manual' AS p_chk, 0 AS p_pre_sn, p_intention, p_child_sn "
query = query & " FROM V_PROJECT_METHOD "
query = query & " WHERE p_child_sn = '" & p_child_sn & "' "
End if
adoConn.Execute query, resCnt
if resCnt > 0 Then
response.Write "1"
else
response.Write "0"
end if
%>

31
business/busi_save.asp Normal file
View File

@@ -0,0 +1,31 @@
<!-- #include virtual = "lib/config.asp" -->
<!-- #include virtual = "lib/json2.asp" -->
<%
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
dim info : set info = JSON.parse(request("data"))
dim query
dim executeCount : executeCount = 0
query = " INSERT INTO Job_List(p_no, j_date, j_p_sn, j_contents, j_time, j_ip) VALUES "
for i = 0 To info.length - 1
query = query & " (" & Session("User_Number") & ", '" & info.get(i).j_date & "', '" & info.get(i).j_prj & "', " & info.get(i).j_contents & ", " & info.get(i).j_time & ", '" & Request.ServerVariables("REMOTE_ADDR") & "'),"
next
query = mid(query, 1, len(query)-1)
if info.length > 0 then
adoConn.Execute query, executeCount
End if
if executeCount = info.length then
Response.Write "1"
else
Response.Write "0"
end if
%>

2177
business/busi_write.asp Normal file

File diff suppressed because it is too large Load Diff

56
business/cost_delete.asp Normal file
View File

@@ -0,0 +1,56 @@
<!-- #include virtual = "lib/config.asp" -->
<!-- #include virtual = "lib/json2.asp" -->
<%
Response.CharSet = "EUC-KR"
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
dim info : set info = JSON.parse(request("data"))
dim query
dim executeCount : executeCount = 0
query = " UPDATE cost_account SET flag = '0' "
query = query & " WHERE user_code = " & Session("User_Number") & " "
if info.prj_code <> "" Then
query = query & " AND p_sn = '" & info.prj_code & "' "
End if
if info.j_date_2 = "" Then
query = query & " AND job_date = '" & info.j_date_1 & "' "
Else
query = query & " AND job_date BETWEEN '" & info.j_date_1 & "' AND '" & info.j_date_2 & "' "
End if
query = query & " AND MONTH(job_date) = '" & info.conmonth & "' " '//-- hwkim 20220610
'response.write query
if info.prj_code <> "" Or info.j_date_1 <> "" Then
adoConn.Execute query
executeCount = 1
Else
executeCount = 0
End if
if executeCount > 0 then
foodQuery = foodQuery & " UPDATE Login "
foodQuery = foodQuery & " SET lunch_p_no = CASE WHEN lunch_p_no = '" & Session("User_Number") & "' THEN NULL "
foodQuery = foodQuery & " ELSE lunch_p_no END, "
foodQuery = foodQuery & " dinner_p_no = CASE WHEN dinner_p_no = '" & Session("User_Number") & "' THEN NULL "
foodQuery = foodQuery & " ELSE dinner_p_no END "
foodQuery = foodQuery & " WHERE (lunch_p_no = '" & Session("User_Number") & "' OR dinner_p_no = '" & Session("User_Number") & "') "
if info.j_date_2 = "" Then
foodQuery = foodQuery & " AND date + ' ' + time BETWEEN '" & info.j_date_1 & "' + ' ' + ' 0600' "
foodQuery = foodQuery & " AND CONVERT(varchar(10), DateAdd(DAY, 1, CONVERT(datetime, '" & info.j_date_1 & "', 120)), 120) + ' ' + '0559'; "
Else
foodQuery = foodQuery & " AND date + ' ' + time BETWEEN '" & info.j_date_1 & "' + ' ' + ' 0600' "
foodQuery = foodQuery & " AND CONVERT(varchar(10), DateAdd(DAY, 1, CONVERT(datetime, '" & info.j_date_2 & "', 120)), 120) + ' ' + '0559'; "
End if
adoConn.Execute foodQuery
Response.Write "1"
else
Response.Write "0"
end if
%>

345
business/cost_list.asp Normal file
View File

@@ -0,0 +1,345 @@
<!-- #include virtual = "include/header.asp" -->
<!-- #include virtual = "include/left.asp" -->
<%
dim Query
yyyy = request("yyyy")
mm = request("mm")
if yyyy = "" then
yyyy = year(cdate(now))
end if
if mm = "" then
mm = Right("0" & TransFormat(month(cdate(now))), 2)
end if
%>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<h1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><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">
<table width="800" id='mainTb'>
<tr>
<td valign="top"><div class="menuTitle"><%=yyyy & "<22><> " & mm &"<22><>"%> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></div></td>
</tr>
<tr>
<td style="padding:0 0 5 0;">
<span class='discript'><%=session("loginuser")%><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڷḦ <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> ȭ<><C8AD> <20>Դϴ<D4B4>.</span>
</td>
</tr>
<tr>
<td class="settingForm">
<select name='biz_date' id="biz_date" onchange="biz_date_change(this.value);">
<% For i = 0 To -7 Step -1 %>
<option value="<%=LEFT(DateAdd("m", i, date), 7) %>" <%If yyyy & "-" & mm = LEFT(DateAdd("m", i, date), 7) Then %> selected <%End If %>><%=LEFT(DateAdd("m", i, date), 7) %></option>
<% Next %>
</select>
</td>
</tr>
<tr>
<td class='contents_body'>
<%
query = ""
query = query & " SELECT rnum, min(job_date) AS min_date, max(job_date) AS max_date, sum(cost_money) AS cost_money, count(*) AS cnt "
query = query & " FROM "
query = query & " ( "
query = query & " SELECT CEILING(ROW_NUMBER() OVER(ORDER BY job_date, p_sn, job_code, cost_code, cost_money) / 12.0) AS rnum, "
query = query & " job_date, ISNULL(cost_money, 0) AS cost_money "
query = query & " FROM V_BUSI_COST "
query = query & " WHERE p_no = '" & session("User_Number") & "' AND job_date LIKE '" & yyyy & "-" & mm & "%' "
query = query & " "
query = query & " ) T "
query = query & " GROUP BY rnum "
adoRs.open query, adoconn, adOpenStatic, adLockReadOnly
if adoRs.RecordCount > 0 Then
%>
<div class='listTitle'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></div>
<table id='costList_tb'>
<tr>
<td width="30%" ><3E>Ⱓ</td>
<td width="25%" ><3E>ݾ<EFBFBD></td>
<td width="25%" ><3E>Ǽ<EFBFBD></td>
<td width="20%" ><3E><><EFBFBD><EFBFBD></td>
</tr>
<%
Dim sum_money, sum_count
sum_money = 0
sum_count = 0
Do while Not adoRs.Eof
%>
<tr>
<td><%=adoRs("min_date")%> ~ <%=adoRs("max_date")%></td>
<td><%=formatnumber(adoRs("cost_money"), 0)%><3E><></td>
<td><%=adoRs("cnt")%></td>
<td><input type="button" class="detail_btn" value='<27>󼼺<EFBFBD><F3BCBCBA><EFBFBD>' data-daterange="<%=adoRs("min_date")%>,<%=adoRs("max_date")%>" data-rnum="<%=adoRs("rnum")%>" /></td>
</tr>
<%
sum_money = sum_money + adoRs("cost_money")
sum_count = sum_count + adoRs("cnt")
adors.moveNext
Loop
%>
<%if sum_count > 0 then%>
<tr>
<td><3E>հ<EFBFBD></td>
<td><%=formatnumber(sum_money, 0)%><3E><></td>
<td><%=sum_count%></td>
<td></td>
</tr>
<%end if%>
</table>
<%
End if
adoRs.close
query = ""
query = query & " SELECT gubun, sum(cost) as sum_cost, count(*) as cnt, "
query = query & " min(cost_date) as min_date, max(cost_date) as max_date, min(d_order_cnt) as min_order_cnt "
query = query & " FROM V_GROUP_COST GC LEFT JOIN Document D ON GC.d_no = D.d_no "
query = query & " WHERE cost_date LIKE '" & yyyy & "-" & mm & "%' "
query = query & " AND p_no = '" & session("user_number") & "' "
query = query & " GROUP BY gubun "
'response.Write query
adoRs.open query, adoconn, adOpenStatic, adLockReadOnly
Dim tmp_cost_sum
tmp_cost_sum = 0
if adoRs.recordCount > 0 Then
%>
<div class='listTitle'><3E>׷<EFBFBD><D7B7><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD></div>
<table id="groupList_tb">
<tr>
<td width="30%" ><3E>Ⱓ</td>
<td width="25%" ><3E>ݾ<EFBFBD></td>
<td width="25%" ><3E>Ǽ<EFBFBD></td>
<td width="20%" ><3E><><EFBFBD><EFBFBD></td>
</tr>
<%
Do while Not adoRs.Eof
%>
<tr>
<td><%= adors("min_date")%> ~ <%= adors("max_date")%></td>
<td><%= formatNumber(adors("sum_cost"), 0)%><3E><></td>
<td><%= adors("cnt")%></td>
<td>
<input type='button' onclick="detail_cost_all('<%=iif(adors("gubun") = "<22>׷<EFBFBD>Ȱ<EFBFBD><C8B0><EFBFBD><EFBFBD>", "1", "2")%>');" value="<22>׷<EFBFBD><D7B7><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD>" />
</td>
</tr>
<%
adoRs.MoveNext
Loop
%>
</table>
<%
end if
adoRs.Close
query = ""
query = query & " SELECT convert(varchar(10), target3) as doc_date, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, '<27><><EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD>' as d_name, "
query = query & " convert(money, convert(varchar(30), target4)) as cost_money, login_p_no FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
query = query & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '<27><><EFBFBD><EFBFBD><EFBFBD>񺸰<EFBFBD><F1BAB8B0><EFBFBD>' AND del_yes_no='no' "
query = query & " AND convert(varchar(10), target3) like '" & yyyy & "-" & mm & "%' "
query = query & " AND login_p_no = '" & session("user_number") & "' "
'response.Write query
adoRs.open query, adoconn, adOpenStatic, adLockReadOnly
tmp_cost_sum = 0
if adoRs.recordCount > 0 Then
%>
<div class='listTitle'><3E><><EFBFBD><EFBFBD><EFBFBD>ú<EFBFBD> <20><><EFBFBD><EFBFBD></div>
<table id='marketingList_tb'>
<tr>
<td width="30%" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
<td width="25%" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ</td>
<td width="25%" ><3E><><EFBFBD><EFBFBD></td>
<td width="20%" ><3E><><EFBFBD><EFBFBD></td>
</tr>
<tr>
<td colspan="4"><input type='button' onclick="opnMarketing_all();" value="<%=yyyy %><3E><> <%=mid(adoRs("doc_date"), 6,2) %><3E><> <%=adoRs("d_name") %> <20>ϰ<EFBFBD><CFB0><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD>¿<EFBFBD>)" /></td>
</tr>
<%
Do while Not adoRs.Eof
%>
<tr>
<td><%=adoRs("d_name") %></td>
<td><input type='button' onclick="opnMarketing('<%=adoRs("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ") %>');" value="<%=adoRs("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ") %>" /></td>
<td><%=adoRs("doc_date") %></td>
<td><%=formatnumber(cDbl(adoRs("cost_money")),0) %><3E><></td>
</tr>
<%
tmp_cost_sum = tmp_cost_sum + cDbl(adoRs("cost_money"))
adoRs.MoveNext
Loop
%>
<tr>
<td colspan="3"><3E><> <20><></td>
<td><%=formatnumber(tmp_cost_sum, 0) %><3E><></td>
</tr>
</table>
<%
end if
adoRs.close
%>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- /.content -->
<!-- REQUIRED SCRIPTS -->
<style>
#mainTb * {
font-family: 'Noto Sans CJK KR', sans-serif;
font-size: 13px;
letter-spacing: 0px;
}
#mainTb{
border-collapse: collapse;
}
.discript{
color: #a70000;
font-weight: bold;
font-size: 12px !important;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}
.listTitle{
margin-top: 20px;
margin-bottom: 15px;
font-size: 17px !important;
font-weight: bold;
text-align: center;
}
#costList_tb{
border-collapse: collapse;
width:100%;
}
#costList_tb > tbody > tr > td{
border: 1px solid #cccccc;
padding: 3px 5px;
text-align: center;
}
#costList_tb > tbody > tr > td > input[type=button]{
padding: 1px 25px;
cursor:pointer;
}
#costList_tb > tbody > tr:first-child > td{
font-weight:bold;
background-color: #eaeaea;
}
#costList_tb > tbody > tr:last-child > td{
font-weight:bold;
}
#groupList_tb{
border-collapse: collapse;
width:100%;
}
#groupList_tb > tbody > tr > td{
border: 1px solid #cccccc;
padding: 3px 5px;
text-align: center;
}
#groupList_tb > tbody > tr > td > input[type=button]{
padding: 1px 25px;
cursor:pointer;
}
#groupList_tb > tbody > tr:first-child > td{
font-weight:bold;
background-color: #eaeaea;
}
#marketingList_tb{
border-collapse: collapse;
width:100%;
}
#marketingList_tb > tbody > tr > td{
border: 1px solid #cccccc;
padding: 3px 5px;
text-align: center;
}
#marketingList_tb > tbody > tr > td > input[type=button]{
padding: 1px 25px;
cursor:pointer;
}
#marketingList_tb > tbody > tr:first-child > td{
font-weight:bold;
background-color: #eaeaea;
}
#marketingList_tb > tbody > tr:last-child > td{
font-weight:bold;
}
.settingForm{
background-color: #eaeaea;
padding: 10px 10px;
}
.menuTitle{
font-weight: bold;
font-size: 20px !important;
height: 35px;
}
#biz_date{
margin-right: 10px;
padding: 2px;
}
</style>
<script>
var y_m = "<%=yyyy & "-" & mm%>";
function detail_cost(d_no) {
var url;
url = "/ess/doc_entertainment_print.asp?d_no=" + d_no + "&view_chk=1&x=1";
window.open(url, '', 'left=0,top=0,width=800,height=900,scrollbars=yes,resizable=yes');
}
function biz_date_change(sel_date) {
var arr_date = sel_date.split("-"); // arr_date[0] <- <20><> , arr_date[1] <- <20><>
location.href = "./cost_list.asp?yyyy="+arr_date[0]+"&mm="+arr_date[1];
}
function detail_cost_all(div) {
var url = "/business/approval_depart_all_print.asp?print_type=1&depart_div=" + div + "&y_m=" + y_m ;
window.open(url, '', 'left=0,top=0,width=800,height=900,scrollbars=yes,resizable=yes');
}
function opnMarketing(d_no){
url = "/ess/doc_entertainment_print.asp?d_no=" + d_no + "&view_chk=1&x=2";
window.open(url, '', 'left=0,top=0,width=800,height=900,scrollbars=yes,resizable=yes');
}
function opnMarketing_all(){
var url = "/business/approval_entertainment_all_print.asp?print_type=1&y_m=" + y_m ;
window.open(url, '', 'left=0,top=0,width=800,height=900,scrollbars=yes,resizable=yes');
}
$(function(){
if($(".listTitle").length == 0){
$("#biz_date").after("<span class='discript' style='margin-left:15px;'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>׸<EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</span>");
}
$(".detail_btn").on("click", function(){
var url;
url = "cost_print.asp?print_type=1";
//url = url + "&sel_kikan=" + $(this).data("daterange");
url = url + "&rnum=" + $(this).data("rnum");
url = url + "&ym=" + y_m;
window.open(url,"","left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=850, height=800 ,scrollbars=yes ,resizable=yes");
});
})
</script>
</div>
<!-- /.content-wrapper -->
<!-- #include virtual = "include/footer.asp" -->

39
business/cost_mod.asp Normal file
View File

@@ -0,0 +1,39 @@
<!-- #include virtual = "lib/config.asp" -->
<%
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
dim cost_id : cost_id = request("cost_id")
dim cost_money : cost_money = request("cost_money")
dim query
dim executeCount : executeCount = 0
query = ""
query = query & " UPDATE Cost_Account SET "
query = query & " cost_money = '" & cost_money & "', "
query = query & " flag = case when '" & cost_money & "' = '0' and flag is not null then '0' else flag end "
query = query & " WHERE id = '" & cost_id & "' "
adoConn.Execute query, executeCount
if executeCount = 1 and cost_money = "0" then
query = ""
query = query & " UPDATE L "
query = query & " SET L.lunch_p_no = CASE B.cost_code WHEN 9 THEN NULL ELSE L.lunch_p_no END, "
query = query & " L.dinner_p_no = CASE B.cost_code WHEN 9 THEN L.dinner_p_no ELSE NULL END "
query = query & " FROM V_BUSI_COST B LEFT JOIN LOGIN L "
query = query & " ON B.job_date = CASE WHEN time < '0600' THEN DATEADD(Day, -1, L.date) ELSE L.date END "
query = query & " AND B.p_no = CASE B.cost_code WHEN 9 THEN L.lunch_p_no ELSE L.dinner_p_no END "
query = query & " WHERE B.id='" & cost_id & "' "
adoConn.Execute query
end if
if executeCount = 1 then
Response.Write "1"
else
Response.Write "0"
end if
%>

416
business/cost_print.asp Normal file
View File

@@ -0,0 +1,416 @@
<!-- #include virtual = "lib/config.asp" -->
<%
dim tmpstr, xadmin
dim Query
dim i,j
dim user_name(4) '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0:<3A><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>, 1:<3A≯<EFBFBD>,2:<3A><><EFBFBD><EFBFBD>,3:<3A><>ȭ<EFBFBD><C8AD>ȣ, 4:<3A>μ<EFBFBD><CEBC>ڵ<EFBFBD>(<28><>)
dim target_name '<27>߱޴<DFB1><DEB4><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD>
dim Curr_date '<27><><EFBFBD>ó<EFBFBD>¥
dim Gap()
dim krc_no
dim Max_length '<27>Է°<D4B7><C2B0><EFBFBD> <20>ټ<EFBFBD><D9BC><EFBFBD><EFBFBD><EFBFBD>
dim print_type '1:<3A><><EFBFBD><EFBFBD>, 2:<3A><>¥<EFBFBD><C2A5><EFBFBD><EFBFBD>Ʈ
if fnc_user_level("0","<22>ϷṮ<CFB7><E1B9AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",Request.ServerVariables("REMOTE_ADDR"))="1" then
xadmin="1" '-- <20><><EFBFBD><EFBFBD>
end if
print_type = request("print_type")
view_chk= 1
rnum = request("rnum")
y_m = request("ym")
Curr_date = year(date) & "<22><> " & zeroformat(month(date),2) & "<22><> " & zeroformat(day(date),2) & "<22><>"
Dim apply_count
Dim not_approval_cnt
Dim username
not_approval_cnt = 0
p_no = request("p_no")
if p_no = "" then
p_no = Session("User_Number")
end if
Query = "SELECT p_no, p_name, p_team_name, p_rank_name, p_tel3 FROM project2.dbo.V_Person WHERE p_no = '" & p_no & "'"
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
if adoRs.recordcount > 0 then
user_name(0) = adoRs("p_no")
user_name(1) = adoRs("p_name") '<27≯<EFBFBD>
user_name(2) = adoRs("p_rank_name") '<27><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>
user_name(3) = adoRs("p_tel3") '<27><><EFBFBD><EFBFBD> <20><>ȭ
user_name(4) = adoRs("p_team_name") '<27>μ<EFBFBD><CEBC>ڵ<EFBFBD>
end if
adoRs.close
query = ""
query = query & " SELECT T.ID, P.p_name, job_date, ISNULL(VPM.p_subject, '<27>Ϲ<EFBFBD>/<2F><><EFBFBD><EFBFBD>') AS p_subject, "
query = query & " T.p_sn, job_code, CASE WHEN job_code = 5 THEN ISNULL(MAX(JL.j_contents_nm), '<27><20><> <20><><EFBFBD><EFBFBD>') ELSE JC.j_name END AS j_name, "
query = query & " T.cost_code, CC.cost_name, cost_money, cost_member, cost_remark, d_order_cnt, "
query = query & " T.p_no as d_order7, d_order8, d_order9, d_order10, ISNULL(PE.p_name, '') as d_order8_name "
query = query & " FROM "
query = query & " ( "
query = query & " SELECT CEILING(ROW_NUMBER() OVER(ORDER BY job_date, p_sn, job_code, cost_code, cost_money) / 12.0) AS rnum, "
query = query & " * "
query = query & " FROM V_BUSI_COST "
query = query & " WHERE p_no = '" & p_no & "' AND job_date LIKE '" & y_m & "%' "
query = query & " ) T LEFT JOIN V_PROJECT_METHOD VPM ON T.p_sn = VPM.p_child_sn "
query = query & " LEFT JOIN Job_Code JC ON T.job_code = JC.j_code "
query = query & " LEFT JOIN V_Job_List JL ON T.job_date = JL.j_date AND T.p_no = JL.p_no "
query = query & " AND T.p_sn = JL.j_p_sn AND T.job_code = '5' "
query = query & " LEFT JOIN cost_category CC ON T.cost_code = CC.cost_code "
query = query & " LEFT JOIN V_Person P ON T.p_no = P.p_no "
query = query & " LEFT JOIN V_Person PE ON T.d_order8 = PE.p_no "
query = query & " WHERE rnum = '" & rnum & "' "
query = query & " GROUP BY T.ID, P.p_name, job_date, ISNULL(VPM.p_subject, '<27>Ϲ<EFBFBD>/<2F><><EFBFBD><EFBFBD>'), T.p_sn, job_code, JC.j_name, "
query = query & " T.cost_code, CC.cost_name, cost_money, cost_member, cost_remark, d_order_cnt, "
query = query & " T.p_no, d_order8, d_order9, d_order10, ISNULL(PE.p_name, '') "
query = query & " ORDER BY job_date, T.p_sn "
'Response.write query
rsc.Open query, adoConn, 1
if rsc.RecordCount > 0 Then
temp_order_user = rsc("p_name") & "<BR>" & rsc("d_order9") & "<BR>" & rsc("d_order7") & "^^" & rsc("d_order8_name") & "<BR>" & rsc("d_order10") & "<BR>" & rsc("d_order8")
temp_order_date = Mid(rsc("d_order9"), 6, 2) & "/" & right(rsc("d_order9"), 2) & "^^" & rsc("d_order10")
tmp_7 = split(temp_order_user, "^^")
tmp_8 = split(temp_order_date, "^^")
if instr(1,tmp_7(0), "<22>ݷ<EFBFBD>") then
tmp_txt1 = tmp_7(0)
elseif instr(1,tmp_7(0), "<BR>") then
tmp_t1 = split(tmp_7(0), "<BR>")
tmp_txt1 = "<img src='/images/sign/" & tmp_t1(0) & "_" & tmp_t1(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt1 = tmp_7(0)
end if
if instr(1,tmp_7(1), "<22>ݷ<EFBFBD>") then
tmp_txt2 = tmp_7(1)
elseif instr(1,tmp_7(1), "<BR>") then
tmp_t2 = split(tmp_7(1), "<BR>")
if tmp_t2(0) = "" Then
tmp_txt2 = ""
Else
tmp_txt2 = "<img src='/images/sign/" & tmp_t2(0) & "_" & tmp_t2(2) & ".jpg' border=0 width=40 height=40>"
End if
else
tmp_txt2 = tmp_7(1)
end if
tmp_txt6 = split(tmp_7(0), "<BR>")(0)
tmp_txt7 = split(tmp_7(1), "<BR>")(0)
End if
%>
<html>
<head>
<title><%=GNB_TITLE%></title>
<link rel="stylesheet" type="text/css" href="/css/basic.css">
<style>
.input_cost_money{
width: 100%;
padding: 1px 3px;
text-align: right;
background: transparent;
border: none;
cursor: pointer;
}
.input_cost_money:focus{
background-color: #000;
color: #fff;
}
.saveCost{
position: absolute;
background-color: #3e3e3e;
padding: 2px 8px;
border: 1px #b3b3b3 solid;
margin-left: 69px;
margin-top: -17px;
color: #fff;
cursor: pointer;
display: none;
}
.input_cost_money:focus + .saveCost{
display:block;
}
.saveCost:hover{
display:block;
}
<%
if xadmin="0" Then %>
.input_cost_money{
cursor:default;
}
<% End if %>
</style>
<script src="/js/jquery.min.js"></script>
<script src="/js/jquery-ajax-call.js"></script>
<script src="/js/jquery.form.min.js"></script>
</head>
<script>
function win_close(){
window.close();
}
function win_print(){
var not_approval_cnt = document.ess.not_approval_cnt.value;
$("#print_area").css("display", "none");
if(+not_approval_cnt > 0 && "<%=session("depart_code")%>" != "18"){
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD><CFB7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>մϴ<D5B4>.");
}else{
window.print();
window.close();
}
}
var tmp_cost = "";
$(document).ready(function () {
var clicky;
$(document).mousedown(function(e) {
clicky = $(e.target);
});
$(document).mouseup(function(e) {
clicky = null;
});
if ($("input[name=print_type]").val() != "1" && "<%=session("depart_code")%>" != "18") {
$("#print").hide();
$("#popup_background").css("display", "block");
}
$(".input_cost_money").on("focus", function(){
if("<%=xadmin%>" == "0"){
$(this).blur();
}else{
tmp_cost = $(this).val();
}
});
$(".input_cost_money").on("blur", function(){
if(tmp_cost != "" && tmp_cost != $(this).val() && $(clicky).hasClass("saveCost") != true){
$(this).val(tmp_cost);
}
});
$(".saveCost").on("click", function(){
var cost_id = $(this).attr("id").split("_")[1];
if(!confirm("<22><><EFBFBD><EFBFBD><EFBFBD>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")){
$("#cost_"+cost_id).val(tmp_cost);
tmp_cost = "";
return false;
}
var cost_money = $("#cost_"+cost_id).val().replace(/,/g,'');
var param = {
"cost_id" : cost_id,
"cost_money" : cost_money
};
$.ajax({
url: "./cost_mod.asp",
data: param,
method: "POST",
success: function(res){
if(res == "1") {
$.each($(".input_cost_money"), function(idx, obj){
$(obj).val(commify($(obj).val().replace(/,/g,'')));
});
var sum_cost = $.map($(".input_cost_money"), function(obj){
return $(obj).val().replace(/,/g,'');
}).reduce(function(total, val){ return +total + +val; });
$("#sum_cost").html(commify(sum_cost));
tmp_cost = "";
alert("<22><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
if(cost_money == "0"){
location.href = location.href;
}
}else{
alert("<22><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߻<EFBFBD><DFBB>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<><6E><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
}
}
});
});
});
</script>
<body topmargin="10" leftmargin="10">
<div style="filter: alpha(opacity=5);position:absolute; display:none; left:50px; top:70px; z-index:499;width:80%;height:80%;background-color: rgb(255,255,255); opacity:0.05; font-size:35px; font-family:malgun gothic; font-weight:bold; line-height:50px;" id="popup_background">
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
&nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> &nbsp; <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><br />
</div>
<form method='post' name='ess'>
<table id="print_area" border=0 cellspacing=0 cellpadding=0>
<tr>
<td>
<img id="print" src="/images/common/btn_print2.jpg" border="0" onClick="win_print()" style="CURSOR:pointer;">
<img src="/images/common/btn_cancel.jpg" border="0" onClick="win_close();" style="CURSOR:pointer;">
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" style="padding:20;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img width = "100%" src="/images/approval/docbg_top.jpg"></td>
</tr>
<tr>
<td width="750" align="center" style="padding:10;border-left:1px solid #dedede;border-right:1px solid #dedede;">
<table width="95%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td colspan="2" style="padding:0 0 10 0">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td width="260"><img src="/images/approval/doc_stit26.jpg"></td>
<td>
<table width="100%" cellpadding="0" cellspacing="1" border="1" style="border-collapse:collapse;" bgcolor="#d8d8d8">
<tr>
<td colspan="2" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)</td>
<td colspan="3" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)</td>
</tr>
<tr>
<td width="10%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
<td width="10%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
<td width="10%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
<td width="10%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
<td width="10%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><>ǥ<EFBFBD>̻<EFBFBD></td>
</tr>
<tr height=40>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt1%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt2%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
</tr>
<tr height=20>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt6%></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt7%></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1">
</td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;<3B><>&nbsp;<3B><>&nbsp;<3B><></b></td>
<td width="80%" class="tahoma"><%=Curr_date%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<3B><></b></td>
<td width="80%"><%=user_name(1)%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<3B><></b></td>
<td width="80%"><%=user_name(4)%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td width="20%" style="padding:7 0 7 20"><b><3E><>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<3B><></b></td>
<td width="80%"><%=user_name(2)%></td>
</tr>
<tr>
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
</tr>
<tr>
<td colspan="2" align="center" style="padding:10 0 0 0" >
<table width="100%" cellpadding="3" cellspacing="0" border="0" style="border-collapse:collapse;" >
<tr>
<td width="7%" class="tit2" align="center"><3E><>¥</td>
<td width="16%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td>
<td width="28%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
<td width="15%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD>׸<EFBFBD></td>
<td width="10%" class="tit2" align="center"><3E>ݾ<EFBFBD></td>
<td width="22%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)</td>
</tr>
<%
sum_cost = 0
do while not rsc.eof
%>
<tr>
<td class="tit7" align="center"><font class="tahoma"><%=right(rsc("job_date"), 5)%></font></td>
<td class="tit7"><font class="tahoma"><%=rsc("p_subject")%>&nbsp(<%=rsc("p_sn")%>)</font></td>
<td class="tit7"><font class="tahoma"><%=rsc("j_name")%></font></td>
<td class="tit7"><font class="tahoma"><%=rsc("cost_name")%></font></td>
<td class="tit7" align="right"><input type='text' class='input_cost_money' id='cost_<%=rsc("id")%>' value='<%=formatnumber(rsc("cost_money"),0)%>' /><div class='saveCost' id='saveCost_<%=rsc("id")%>'><3E><> <20><></div>
<% If rsc("d_order_cnt") = 77 Then %>
<span style="color:red; display:none;"><3E><><EFBFBD><EFBFBD></span>
<% Else %>
<br><span style="color:red;"><3E>̽<EFBFBD><CCBD><EFBFBD></span>
<% not_approval_cnt = 1 %>
<% End If %>
</td>
<td class="tit7"><font class="tahoma"><%=rsc("cost_remark")%><% If rsc("cost_remark") <> "" Then %><br><% End if %><% if rsc("cost_member") <> "" then %>(<%=rsc("cost_member")%>)<% End If %></font></td>
</tr>
<%
sum_cost = sum_cost + rsc("cost_money")
rsc.movenext
loop
%>
<tr>
<td colspan="4" class="tit2"></td>
<td class="tit2" align="right" id='sum_cost' style='font-family:tahoma; padding:2px 5px;letter-spacing:0px'><%=formatnumber(sum_cost,0)%></td>
<td class="tit2"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" style="padding:20 0 0 0" align="right">
<pre><font class="tahoma"> <09><> <20><> <20><> <20><> : <20><> <20><> <20><></font></pre>
<pre><font class="tahoma"> <09><> <20><> <20><> : (<28><>)</font></pre>
</td>
</tr>
<tr>
<td colspan="2" align="center" style="padding:15 0 5 0"><!-- #include virtual= "approval/inc_logo.asp" --></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img width = "100%" src="/images/approval/docbg_btm.jpg"></td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="print_type" value="<%=print_type %>" />
<input type="hidden" name="not_approval_cnt" value="<%=not_approval_cnt %>" />
</form>
</body>
</html>
<%
rsc.Close
%>

49
business/cost_save.asp Normal file
View File

@@ -0,0 +1,49 @@
<!-- #include virtual = "lib/config.asp" -->
<!-- #include virtual = "lib/json2.asp" -->
<%
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
dim info : set info = JSON.parse(unescape(request("data")))
dim query, foodQuery
dim executeCount : executeCount = 0
foodQuery = ""
query = " INSERT INTO cost_account(job_date, p_sn, p_subject, job_code, job_name, "
query = query & " cost_code, cost_name, cost_money, cost_member, cost_member_code, user_code, user_name, user_ip, w_date, cost_remark) VALUES "
for i = 0 To info.length - 1
query = query & " ('" & info.get(i).job_date & "', '" & info.get(i).p_sn & "', '', " & info.get(i).job_code & ", '', "
query = query & " '" & info.get(i).cost_code & "', '', " & info.get(i).cost_money & ", '" & info.get(i).cost_member & "', '" & info.get(i).cost_member_code & "', "
query = query & " '" & Session("User_Number") & "', '', '" & Request.ServerVariables("REMOTE_ADDR") & "', getdate(), '" & info.get(i).cost_remark & "'),"
if info.get(i).cost_member_code <> "" Then
foodQuery = foodQuery & " UPDATE Login "
foodQuery = foodQuery & " SET lunch_p_no = CASE WHEN " & info.get(i).cost_code & " = '9' THEN '" & Session("User_Number") & "' "
foodQuery = foodQuery & " ELSE lunch_p_no END, "
foodQuery = foodQuery & " dinner_p_no = CASE WHEN '" & info.get(i).cost_code & "' IN ('10', '21') THEN '" & Session("User_Number") & "' "
foodQuery = foodQuery & " ELSE dinner_p_no END "
foodQuery = foodQuery & " WHERE p_no IN (" & info.get(i).cost_member_code & ") "
foodQuery = foodQuery & " AND date + ' ' + time BETWEEN '" & info.get(i).job_date & "' + ' ' + ' 0600' "
foodQuery = foodQuery & " AND CONVERT(varchar(10), DateAdd(DAY, 1, CONVERT(datetime, '" & info.get(i).job_date & "', 120)), 120) + ' ' + '0559'; "
End if
next
query = mid(query, 1, len(query)-1)
adoConn.Execute query, executeCount
if executeCount = info.length then
if foodQuery <> "" Then
adoConn.Execute foodQuery
End if
Response.Write "1"
else
Response.Write "0"
end if
%>

31
business/gf_delete.asp Normal file
View File

@@ -0,0 +1,31 @@
<!-- #include virtual = "lib/config.asp" -->
<!-- #include virtual = "lib/json2.asp" -->
<%
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
dim info : set info = JSON.parse(request("data"))
dim query
dim executeCount : executeCount = 0
query = " UPDATE [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] SET " & info.col_nm & " = NULL "
query = query & " WHERE [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ] = '" & info.d_no & "' "
if info.col_nm <> "" And info.d_no <> "" Then
adoConn.Execute query
executeCount = 1
Else
executeCount = 0
End if
if executeCount > 0 then
Response.Write "1"
else
Response.Write "0"
end if
%>

269
business/job_cost_total.asp Normal file
View File

@@ -0,0 +1,269 @@
<!-- #include virtual = "include/header.asp" -->
<%
dim command
command = Request("command")
if command <> "excel" then
%>
<!-- #include virtual = "include/left.asp" -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<h1><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><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">
<%
end if
job_month = Request("job_month")
search_kind = Request("search_kind")
if command = "excel" Then
Response.CacheControl = "public"
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition","attachment;filename=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_" & job_month & "_" & search_kind & ".xls"
end if
%>
<script>
function search(command) {
var url = "";
var job_month = document.job_cost_total.job_month.value;
var search_kind = "";
if (document.job_cost_total.search_kind[0].checked == true) {
search_kind = "project";
} else {
search_kind = "personal";
}
if (job_month == "") {
alert("<22><>¥<EFBFBD><C2A5> <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>.");
} else {
url = "job_cost_total.asp?command=" + command + "&job_month=" + job_month + "&search_kind=" + search_kind;
document.job_cost_total.action = url;
document.job_cost_total.submit();
}
}
window.onload = function () {
if ("<%= search_kind%>" != "personal") {
document.getElementById("i_project").checked = true;
} else {
document.getElementById("i_personal").checked = true;
}
}
</script>
<form name="job_cost_total" method="post" >
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<%if command <> "excel" then%>
<tr>
<td style="padding:10 0 0 0;">
<table style='width:1000px' class="table table-sm table-sm2 table-bordered table-head tr-colors" >
<tr>
<td align="center" ><3E><> <20><></td>
<td align="left" >
<select name="job_month" style="width:100px;">
<option value=""> <20><> <20><> </option>
<%
For i=0 To 24
%>
<option value="<%=LEFT(DateAdd("m", i*(-1), date), 7) %>" <%if job_month = LEFT(DateAdd("m", i*(-1), date), 7) then %> selected <% end if %>><%=LEFT(DateAdd("m", i*(-1), date), 7) %></option>
<%
Next
%>
</select>
</td>
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
<td align="center" >
<input type="radio" name="search_kind" id="i_project" value="project"/> <label for="i_project" class='mb-0 mr-2'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></label>
<input type="radio" name="search_kind" id="i_personal" value="personal" /> <label for="i_personal" class='mb-0'><3E><><EFBFBD>κ<EFBFBD></label>
</td>
<td align="right">
<button type="button" class='btn btn-sm btn-primary' onclick='search("view");'><3E><>ȸ</button>
<button type="button" class='btn btn-sm btn-success' onclick='search("excel");'>Excel</button>
</td>
</tr>
</table>
</td>
</tr>
<% end if %>
<% if command <> "" then %>
<tr>
<td style="padding:10 0 0 0;">
<table style='width:1000px' class="table table-sm table-sm2 table-bordered table-head tr-colors">
<%
If search_kind = "project" Then
query = ""
query = query & " SELECT job_date, p_sn, p_subject, cost_name, sum(cost_money) AS cost_money "
query = query & " FROM "
query = query & " ( "
query = query & " SELECT P.p_team_name, P.p_name, T.p_no, LEFT(job_date, 7) AS job_date, "
query = query & " ISNULL(VPM.p_subject, ( "
query = query & " CASE P.p_depart_now "
query = query & " WHEN 'E' THEN p_name + ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' "
query = query & " WHEN 'R' THEN P.p_team_name + ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' "
query = query & " WHEN 'F' THEN P.p_team_name + ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' "
query = query & " ELSE '<27>Ϲ<EFBFBD>/<2F><><EFBFBD><EFBFBD>' END)) AS p_subject, "
query = query & " CASE T.p_sn "
query = query & " WHEN '99999' THEN "
query = query & " CASE P.p_depart_now "
query = query & " WHEN 'R' THEN '99990' + CONVERT(varchar, P.p_depart) "
query = query & " WHEN 'F' THEN '99990' + CONVERT(varchar, P.p_depart) "
query = query & " WHEN 'E' THEN p_name "
query = query & " ELSE '99999' END "
query = query & " ELSE T.p_sn END AS p_sn, "
query = query & " T.cost_code, CC.cost_name, cost_money "
query = query & " FROM V_BUSI_COST T LEFT JOIN V_PROJECT_METHOD VPM ON T.p_sn = VPM.p_child_sn "
query = query & " LEFT JOIN cost_category CC ON T.cost_code = CC.cost_code "
query = query & " LEFT JOIN ( "
query = query & " SELECT P.p_no, P.p_name, P.p_depart_now, before_info AS p_depart, D.T_Name AS p_team_name, "
query = query & " ISNULL((SELECT TOP 1 change_date FROM Person_Log WHERE p_no = P.p_no AND info_name = 'depart' AND change_date < PL.change_date ORDER BY change_date DESC), krc_in_date) AS log_st, CONVERT(varchar(10), DATEADD(DAY, -1, change_date), 120) AS log_en "
query = query & " FROM v_Person P "
query = query & " LEFT JOIN Person_Log PL ON P.p_no = PL.p_no AND PL.info_name = 'depart' AND PL.after_info <> '' "
query = query & " LEFT JOIN v_Department D ON PL.before_info = D.before_t_cd1 "
query = query & " WHERE before_info IS NOT NULL "
query = query & " UNION ALL "
query = query & " SELECT p_no, p_name, p_depart_now, p_depart, p_team_name, "
query = query & " ISNULL((SELECT TOP 1 change_date FROM Person_Log WHERE p_no = P.p_no AND info_name = 'depart' ORDER BY change_date DESC), krc_in_date) AS log_st, '2099-12-31' AS log_en "
query = query & " FROM v_Person P "
query = query & " ) P ON T.p_no = P.p_no AND T.job_date BETWEEN P.log_st AND P.log_en "
query = query & " WHERE job_date LIKE '" & job_month & "%' "
query = query & " ) T "
query = query & " GROUP BY job_date, p_sn, p_subject, cost_name "
'Response.write query
Adors.open query, adoconn, adopenstatic, adlockreadonly
if Adors.RecordCount > 0 Then
sum_money = 0
%>
<tr height=30>
<td align="center" style="width:7%;"><3E><><EFBFBD><EFBFBD></td>
<td align="center" style="width:13%;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڵ<EFBFBD></td>
<td align="center" style="width:50%;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE></td>
<td align="center" style="width:23%"><3E><><EFBFBD><EFBFBD><EFBFBD>׸<EFBFBD></td>
<td align="center" style="width:7%"><3E>ݾ<EFBFBD></td>
</tr>
<%
For i=1 to Adors.recordcount
%>
<tr height=30>
<td align="center" ><%=Adors("job_date") %></td>
<td align="center" ><%=Adors("p_sn") %></td>
<td align="center" ><%=Adors("p_subject")%></td>
<td align="center" ><%=Adors("cost_name") %></td>
<td align="center" ><%=Formatnumber(Adors("cost_money"), 0) %></td>
</tr>
<%
sum_money = sum_money + CDbl(Adors("cost_money"))
adors.movenext
next
AdoRs.close
%>
<tr height=30>
<td align="center" colspan="4"> <20><> <20><> </td>
<td align="center" ><%= Formatnumber(sum_money, 0) %></td>
</tr>
<%
End if
End if
If search_kind = "personal" Then
query = ""
query = query & " SELECT job_date, p_team_name, p_no, p_name, sum(cost_money) AS cost_money "
query = query & " FROM "
query = query & " ( "
query = query & " SELECT P.p_team_name, P.p_name, T.p_no, LEFT(job_date, 7) AS job_date, "
query = query & " ISNULL(VPM.p_subject, ( "
query = query & " CASE P.p_depart_now "
query = query & " WHEN 'E' THEN p_name + ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' "
query = query & " WHEN 'R' THEN P.p_team_name + ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' "
query = query & " WHEN 'F' THEN P.p_team_name + ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' "
query = query & " ELSE '<27>Ϲ<EFBFBD>/<2F><><EFBFBD><EFBFBD>' END)) AS p_subject, "
query = query & " CASE T.p_sn "
query = query & " WHEN '99999' THEN "
query = query & " CASE P.p_depart_now "
query = query & " WHEN 'R' THEN '99990' + CONVERT(varchar, P.p_depart) "
query = query & " WHEN 'F' THEN '99990' + CONVERT(varchar, P.p_depart) "
query = query & " ELSE '99999' END "
query = query & " ELSE T.p_sn END AS p_sn, "
query = query & " T.cost_code, CC.cost_name, cost_money "
query = query & " FROM V_BUSI_COST T LEFT JOIN V_PROJECT_METHOD VPM ON T.p_sn = VPM.p_child_sn "
query = query & " LEFT JOIN cost_category CC ON T.cost_code = CC.cost_code "
query = query & " LEFT JOIN ( "
query = query & " SELECT P.p_no, P.p_name, P.p_depart_now, before_info AS p_depart, D.T_Name AS p_team_name, "
query = query & " ISNULL((SELECT TOP 1 change_date FROM Person_Log WHERE p_no = P.p_no AND info_name = 'depart' AND change_date < PL.change_date ORDER BY change_date DESC), krc_in_date) AS log_st, CONVERT(varchar(10), DATEADD(DAY, -1, change_date), 120) AS log_en "
query = query & " FROM v_Person P "
query = query & " LEFT JOIN Person_Log PL ON P.p_no = PL.p_no AND PL.info_name = 'depart' AND PL.after_info <> '' "
query = query & " LEFT JOIN v_Department D ON PL.before_info = D.before_t_cd1 "
query = query & " WHERE before_info IS NOT NULL "
query = query & " UNION ALL "
query = query & " SELECT p_no, p_name, p_depart_now, p_depart, p_team_name, "
query = query & " ISNULL((SELECT TOP 1 change_date FROM Person_Log WHERE p_no = P.p_no AND info_name = 'depart' ORDER BY change_date DESC), krc_in_date) AS log_st, '2099-12-31' AS log_en "
query = query & " FROM v_Person P "
query = query & " ) P ON T.p_no = P.p_no AND T.job_date BETWEEN P.log_st AND P.log_en "
query = query & " WHERE job_date LIKE '" & job_month & "%' "
query = query & " ) T "
query = query & " GROUP BY job_date, p_team_name, p_no, p_name "
'Response.write query
Adors.open query, adoconn, adopenstatic, adlockreadonly
if Adors.RecordCount > 0 Then
sum_money = 0
%>
<tr height=30>
<td align="center" style="width:15%;"><3E><><EFBFBD><EFBFBD></td>
<td align="center" style="width:25%;"><3E>μ<EFBFBD><CEBC><EFBFBD></td>
<td align="center" style="width:20%;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ</td>
<td align="center" style="width:20%;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
<td align="center" style="width:20%;"><3E>ݾ<EFBFBD></td>
</tr>
<%
For i=1 to Adors.recordcount
%>
<tr height=30 >
<td align="center" ><%=Adors("job_date") %></td>
<td align="center" ><%=Adors("p_team_name") %></td>
<td align="center" ><%=Adors("p_no") %></td>
<td align="center" ><%=Adors("p_name") %></td>
<td align="center" ><%=Formatnumber(Adors("cost_money"), 0) %></td>
</tr>
<%
sum_money = sum_money + CDbl(Adors("cost_money"))
adors.movenext
next
AdoRs.close
%>
<tr height=30>
<td align="center" colspan="4"> <20><> <20><> </td>
<td align="center" ><%= Formatnumber(sum_money, 0) %></td>
</tr>
<%
End if
End if
%>
</table>
</td>
</tr>
<% end if %>
</table>
</form>
<% if command <> "excel" then%>
</div>
</div>
</div>
</div>
</div>
<!-- /.content -->
<!-- REQUIRED SCRIPTS -->
<script>
</script>
</div>
<!-- /.content-wrapper -->
<!-- #include virtual = "include/footer.asp" -->
<% end if %>

View File

@@ -0,0 +1,191 @@
<!-- #include virtual = "include/header.asp" -->
<%
dim command
command = Request("command")
if command <> "excel" then
%>
<!-- #include virtual = "include/left.asp" -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<h1><3E>׷<EFBFBD><D7B7><EFBFBD><EEBFB5> <20>׷캰 <20><><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">
<%
end if
job_month = Request("job_month")
search_depart = Request("search_depart")
if command = "excel" Then
Response.CacheControl = "public"
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition","attachment;filename=<3D>׷<EFBFBD><D7B7><EFBFBD><EEBFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_" & job_month & ".xls"
end if
%>
<script>
function search(command) {
var url = "";
var job_month = document.job_cost_total.job_month.value;
var search_depart = "";
if($("select[name='search_depart']").length > 0){
search_depart = $("select[name='search_depart'] :selected").val();
}
if (job_month == "") {
alert("<22><>¥<EFBFBD><C2A5> <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>.");
} else {
url = "job_cost_total_group.asp?command=" + command + "&job_month=" + job_month + "&search_depart=" + search_depart;
document.job_cost_total.action = url;
document.job_cost_total.submit();
}
}
</script>
<form name="job_cost_total" method="post" >
<table width="100%" cellpadding="0" cellspacing="0" border="0">
</tr>
<%if command <> "excel" then%>
<tr>
<td style="padding:10 0 0 0;">
<table style='width:1000px' class="table table-sm table-sm2 table-bordered table-head tr-colors" >
<tr>
<td align="left" >
<select name="job_month" style="width:100px;letter-spacing:0px;">
<option value=""><3E><> <20><><EFBFBD><EFBFBD></option>
<%
For i=0 To 24
if LEFT(DateAdd("m", i*(-1), date), 7) > "2021-03" Then
%>
<option value="<%=LEFT(DateAdd("m", i*(-1), date), 7) %>" <%if job_month = LEFT(DateAdd("m", i*(-1), date), 7) then %> selected <% end if %>><%=LEFT(DateAdd("m", i*(-1), date), 7) %></option>
<%
End If
Next
%>
</select>
<%
if Session("depart_code") = "18" or session("teamplace") = "6" Then
%>
<select name="search_depart" style="width:120px;">
<option value=""><3E>μ<EFBFBD> <20><><EFBFBD><EFBFBD>(<28><>ü)</option>
<%
query = " SELECT depart, depart_cd FROM V_GROUP_COST_NEW with(nolock) where 1 = 1 AND left(cost_date,7) > '2021-04' group by depart, depart_cd order by depart asc "
'Response.write query
Adors.open query, adoconn, adopenstatic, adlockreadonly
if Adors.RecordCount > 0 Then
For i=1 to Adors.recordcount
%><option value="<%=Adors("depart") %>" <%if(Adors("depart") = search_depart)then%>selected<%end if%>><%=Adors("depart") %></option>
<%
adors.movenext
next
AdoRs.close
end if %>
</select>
<%
End If
%>
</td>
<td align="right">
<button type="button" class='btn btn-sm btn-primary' onclick='search("view");'><3E><>ȸ</button>
<button type="button" class='btn btn-sm btn-success' onclick='search("excel");'>Excel</button>
</td>
</tr>
</table>
</td>
</tr>
<% end if %>
<% if command <> "" then %>
<tr>
<td style="padding:0 0 0 0;">
<table style='width:1000px' class="table table-sm table-sm2 table-bordered table-head tr-colors" >
<%
query = ""
query = query & " SELECT depart , sum(cost) as cost, count(1) as cnt "
query = query & " FROM V_GROUP_COST_NEW with(nolock) "
query = query & " where 1 = 1 "
query = query & " AND left(cost_date,7) = '" & job_month & "' "
if( search_depart <> "" )then
query = query & " and depart = '" & search_depart & "' "
end if
if session("depart_code") <> "18" and session("teamplace") <> "6" Then
query = query & " and ((depart_cd = '" & Session("depart_code") & "' "
query = query & " and depart_cd <> '0') OR "
query = query & " depart = '" & Session("loginuser") & "') "
End If
query = query & " group by depart "
query = query & " order by depart asc "
Adors.open query, adoconn, adopenstatic, adlockreadonly
if Adors.RecordCount > 0 Then
sum_money = 0
%>
<tr height=30>
<td align="center" style="width:10%;"><3E>μ<EFBFBD></td>
<td align="center" style="width:10%;"><3E>ݾ<EFBFBD></td>
</tr>
<%
For i=1 to Adors.recordcount
IF list_bgcolor="#FFFFFF" Then
list_bgcolor="floralwhite"
Else
list_bgcolor="#FFFFFF"
End IF
%>
<tr height=30 style="background-color:<%=list_bgcolor%>;" >
<td align="center" ><%=Adors("depart") %></td>
<td align="center" ><%=Formatnumber(Adors("cost"), 0) %></td>
</tr>
<%
sum_money = sum_money + CDbl(Adors("cost"))
adors.movenext
next
AdoRs.close
%>
<tr height=30>
<td align="center" > <20><> <20><> </td>
<td align="center" ><%= Formatnumber(sum_money, 0) %></td>
</tr>
<%
Else
%>
<tr height=30>
<td align="center" style="width:10%;"><3E>μ<EFBFBD></td>
<td align="center" style="width:10%;"><3E>ݾ<EFBFBD></td>
</tr>
<tr height=30 style="background-color:floralwhite;" >
<td align="center" colspan="2"><3E>˻<EFBFBD><CBBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD></td></td>
</tr>
<tr height=30>
<td align="center" > <20><> <20><> </td>
<td align="center" >0</td>
</tr>
<%
End if
%>
</table>
</td>
</tr>
<% end if %>
</table>
</form>
<% if command <> "excel" then%>
</div>
</div>
</div>
</div>
</div>
<!-- /.content -->
<!-- REQUIRED SCRIPTS -->
<script>
</script>
</div>
<!-- /.content-wrapper -->
<!-- #include virtual = "include/footer.asp" -->
<% end if %>

View File

@@ -0,0 +1,217 @@
<!-- #include virtual = "include/header.asp" -->
<%
dim command
command = Request("command")
if command <> "excel" then
%>
<!-- #include virtual = "include/left.asp" -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<h1><3E>׷<EFBFBD><D7B7><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD> <20><><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">
<%
end if
job_month = Request("job_month")
search_depart = Request("search_depart")
if command = "excel" Then
Response.CacheControl = "public"
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition","attachment;filename=<3D>׷<EFBFBD><D7B7><EFBFBD><EEBFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_" & job_month & ".xls"
end if
%>
<script>
function search(command) {
var url = "";
var job_month = document.job_cost_total.job_month.value;
var search_depart = "";
if($("select[name='search_depart']").length > 0){
search_depart = $("select[name='search_depart'] :selected").val();
}
if (job_month == "") {
alert("<22><>¥<EFBFBD><C2A5> <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>.");
} else {
url = "job_cost_total_group_dtl.asp?command=" + command + "&job_month=" + job_month + "&search_depart=" + search_depart;
document.job_cost_total.action = url;
document.job_cost_total.submit();
}
}
</script>
<form name="job_cost_total" method="post" >
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<%if command <> "excel" then%>
<tr>
<td style="padding:10 0 0 0;">
<table style='width:1000px' class="table table-sm table-sm2 table-bordered table-head tr-colors" >
<tr>
<td align="left" >
<select name="job_month" style="width:100px;letter-spacing:0px;">
<option value=""><3E><> <20><><EFBFBD><EFBFBD></option>
<%
For i=0 To 24
if LEFT(DateAdd("m", i*(-1), date), 7) > "2021-03" Then
%>
<option value="<%=LEFT(DateAdd("m", i*(-1), date), 7) %>" <%if job_month = LEFT(DateAdd("m", i*(-1), date), 7) then %> selected <% end if %>><%=LEFT(DateAdd("m", i*(-1), date), 7) %></option>
<%
End If
Next
%>
</select>
<%
if Session("depart_code") = "18" or session("teamplace") = "6" Then
%>
<select name="search_depart" style="width:120px;">
<option value=""><3E>μ<EFBFBD> <20><><EFBFBD><EFBFBD>(<28><>ü)</option>
<%
query = " SELECT depart, depart_cd FROM V_GROUP_COST_NEW with(nolock) where 1 = 1 AND left(cost_date,7) > '2021-04' group by depart, depart_cd order by depart asc "
'Response.write query
Adors.open query, adoconn, adopenstatic, adlockreadonly
if Adors.RecordCount > 0 Then
For i=1 to Adors.recordcount
%><option value="<%=Adors("depart") %>" <%if(Adors("depart") = search_depart)then%>selected<%end if%>><%=Adors("depart") %></option>
<%
adors.movenext
next
AdoRs.close
end if %>
</select>
<%
End If
%>
</td>
<td align="right">
<button type="button" class='btn btn-sm btn-primary' onclick='search("view");'><3E><>ȸ</button>
<button type="button" class='btn btn-sm btn-success' onclick='search("excel");'>Excel</button>
</td>
</tr>
</table>
</td>
</tr>
<% end if %>
<% if command <> "" then %>
<tr>
<td style="padding:0 0 0 0;">
<table style='width:1000px' class="table table-sm table-sm2 table-bordered table-head tr-colors" >
<%
query = ""
query = query & " SELECT d_no, hangmok, gubun, cost_date, txt_pjt "
query = query & " , isnull((SELECT top 1 p_subject FROM V_PROJECT_METHOD where p_child_sn = txt_pjt),'<27>Ϲ<EFBFBD>/<2F><><EFBFBD><EFBFBD>') as 'prj_nm' "
query = query & " , txt_hangmok, contents, cost,depart, depart_cd, write_name "
query = query & " FROM V_GROUP_COST_NEW with(nolock) "
query = query & " where 1 = 1 "
query = query & " AND left(cost_date,7) = '" & job_month & "' "
if search_depart <> "" then
query = query & " and depart = '" & search_depart & "' "
end if
if(session("depart_code") = "17" and session("teamplace") = "5")then 'ä<><C3A4><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>ͺм<CDBA>, Ȯ<><C8AE> <20><><EFBFBD><EFBFBD>
query = query & " and (( depart_cd in ('17','18','19') and depart_cd <> '0') OR depart = '" & Session("loginuser") & "') "
query = query & " and depart <> '<27>濵<EFBFBD><E6BFB5>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD>' "
else
if session("depart_code") <> "18" and session("teamplace") <> "6" Then
query = query & " and ((depart_cd = '" & Session("depart_code") & "' "
query = query & " and depart_cd <> '0') OR "
query = query & " depart = '" & Session("loginuser") & "') "
End If
end if
query = query & " order by cost_date asc "
' Response.write session("teamplace")
' Response.write query
Adors.open query, adoconn, adopenstatic, adlockreadonly
if Adors.RecordCount > 0 Then
sum_money = 0
%>
<tr height=30>
<td align="center" style="width:10%;"><3E><><EFBFBD><EFBFBD></td>
<td align="center" style="width:25%;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td>
<td align="center" style="width:10%;"><3E>׸<EFBFBD></td>
<td align="center" style="width:10%;"><3E><><EFBFBD><EFBFBD><EFBFBD>׸<EFBFBD></td>
<td align="center" style="width:10%;"><3E>ݾ<EFBFBD></td>
<td align="center" style="width:10%;"><3E>μ<EFBFBD></td>
<td align="center" style="width:10%;"><3E>ۼ<EFBFBD><DBBC><EFBFBD></td>
</tr>
<%
For i=1 to Adors.recordcount
IF list_bgcolor="#FFFFFF" Then
list_bgcolor="floralwhite"
Else
list_bgcolor="#FFFFFF"
End IF
%>
<tr height=30 style="background-color:<%=list_bgcolor%>;" >
<td align="center" ><%=Adors("cost_date") %></td>
<td align="left" ><%=Adors("prj_nm") %></td>
<td align="center" ><%=Adors("txt_hangmok") %></td>
<td align="center" ><%=Adors("contents") %></td>
<td align="center" ><%=Formatnumber(Adors("cost"), 0) %></td>
<td align="center" ><%=Adors("depart") %></td>
<td align="center" ><%=Adors("write_name") %></td>
</tr>
<%
sum_money = sum_money + CDbl(Adors("cost"))
adors.movenext
next
AdoRs.close
%>
<tr height=30>
<td align="center" colspan="4"> <20><> <20><> </td>
<td align="center" ><%= Formatnumber(sum_money, 0) %></td>
<td align="center" ></td>
<td align="center" ></td>
</tr>
<%
Else
%>
<tr height=30>
<td align="center" style="width:10%;"><3E><><EFBFBD><EFBFBD></td>
<td align="center" style="width:25%;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td>
<td align="center" style="width:10%;"><3E>׸<EFBFBD></td>
<td align="center" style="width:10%;"><3E><><EFBFBD><EFBFBD><EFBFBD>׸<EFBFBD></td>
<td align="center" style="width:10%;"><3E>ݾ<EFBFBD></td>
<td align="center" style="width:10%;"><3E>μ<EFBFBD></td>
<td align="center" style="width:10%;"><3E>ۼ<EFBFBD><DBBC><EFBFBD></td>
</tr>
<tr height=30 style="background-color:floralwhite;" >
<td align="center" colspan="7"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</td>
</tr>
<tr height=30>
<td align="center" colspan="4"> <20><> <20><> </td>
<td align="center" >0</td>
<td align="center" ></td>
<td align="center" ></td>
</tr>
<%
End if
%>
</table>
</td>
</tr>
<% end if %>
</table>
</form>
<% if command <> "excel" then%>
</div>
</div>
</div>
</div>
</div>
<!-- /.content -->
<!-- REQUIRED SCRIPTS -->
<script>
</script>
</div>
<!-- /.content-wrapper -->
<!-- #include virtual = "include/footer.asp" -->
<% end if %>