283 lines
13 KiB
Plaintext
283 lines
13 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<%
|
|
'Response.write session("User_Number")
|
|
|
|
dim Query
|
|
dim i,j
|
|
dim user_name(4) '현재 사용자,0:사원코드, 1:이름,2:직급,3:전화번호, 4:부서코드(명)
|
|
dim Curr_date '오늘날짜
|
|
dim Company(6)
|
|
dim Gap()
|
|
dim print_type '1:보기, 2:진짜프린트
|
|
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) & "년 " & zeroformat(month(date),2) & "월 " & zeroformat(day(date),2) & "일"
|
|
|
|
|
|
Query = ""
|
|
Query = Query & " SELECT 문서번호, 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 문서내용 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 문서제목='접대비보고서' 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 문서내용 set print_chk = 'Yes', print_cnt = print_cnt + 1 "
|
|
query = query & " where 문서번호 in ("
|
|
query = query & " select 문서번호 from 문서내용 "
|
|
query = query & " WHERE 문서제목='접대비보고서' 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") '이름
|
|
user_name(2) = adoRs("p_rank_name") '직위 코드
|
|
user_name(3) = adoRs("p_tel3") '직통 전화
|
|
user_name(4) = adoRs("p_team_name") '부서코드
|
|
adoRs.close
|
|
|
|
tmp_7 = split(rsc("target99"), "^^")
|
|
|
|
if trim(tmp_7(0)) <> "전결" 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)) <> "전결" 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)) <> "전결" 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)) <> "전결" 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)) <> "전결" 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;">마케팅비</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">기안/승인(소속부서)</td>
|
|
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1">검토/승인(관리부서)</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">본인</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">팀장</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">부서장</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">임원</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">대표이사</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">담당</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">부서장</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">임원</td>
|
|
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1">대표이사</td>
|
|
</tr>
|
|
<tr height=40>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt1%> </td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt2%> </td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt3%> </td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt4%> </td>
|
|
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt5%> </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>출 력 일 자</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>성 명</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>소 속</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>직 급</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">접대일자</td>
|
|
<td width="25%" class="tit2" align="center">프로젝트</td>
|
|
<td width="10%" class="tit2" align="center">금액</td>
|
|
<td width="40%" class="tit2" align="center">접대목적</td>
|
|
<td width="15%" class="tit2" align="center">회사명(성명)</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", "운영 및 관리업무", rsc("p_subject"))%></font></td>
|
|
<td class="tit7" align="right"><font class="tahoma">₩<%=formatnumber(rsc("cost"),0)%> </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">합계</td>
|
|
<td class="tit2" align="right"><font class="tahoma">₩<%=formatnumber(sum_cost,0)%> </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"> 영 수 일 자 : 년 월 일</font></pre>
|
|
<pre><font class="tahoma"> 영 수 자 : (印)</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
|
|
%> |