293 lines
13 KiB
Plaintext
293 lines
13 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<%
|
|
dim Query
|
|
dim i,j
|
|
dim user_name(4) '현재 사용자,0:사원코드, 1:이름,2:직급,3:전화번호, 4:부서코드(명)
|
|
dim Curr_date '오늘날짜
|
|
dim Company(6)
|
|
dim Gap()
|
|
dim Max_length '입력가능 줄수정의
|
|
dim print_type '1:보기, 2:진짜프린트
|
|
dim depart_cost_type
|
|
dim depart_gubun
|
|
dim y_m
|
|
dim cost_type(2) ''지출방법 구분
|
|
|
|
cost_type(1) = "개인법인카드"
|
|
cost_type(2) = "현금/개인카드"
|
|
|
|
print_type = request("print_type")
|
|
|
|
depart_cost_type = request("depart_div")
|
|
depart_gubun = "팀"
|
|
if depart_cost_type = "2" then
|
|
depart_gubun = "장"
|
|
end if
|
|
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 VGC.cost_date, VGC.p_no, VGC.txt_pjt, ISNULL(TPM.p_subject, '일반업무') 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 문서내용 M ON VGC.d_no = M.문서번호 "
|
|
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") '사번
|
|
user_name(1) = tmp_0(0) '이름
|
|
user_name(2) = tmp_0(1) '직위 코드
|
|
user_name(3) = tmp_0(2) '직통 전화
|
|
user_name(4) = tmp_0(3) '부서코드
|
|
|
|
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_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 = "그룹활동비"
|
|
'elseif depart_cost_type = "2" then
|
|
' tmp_tit = "그룹장활동비"
|
|
'end if
|
|
tmp_tit = "그룹운영비"
|
|
%>
|
|
<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">기안/승인(소속부서)</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="50%" class="tit2" align="center">프로젝트(업무)명/내용</td>
|
|
<td width="10%" class="tit2" align="center">항목</td>
|
|
<td width="20%" class="tit2" align="center">비고</td>
|
|
<td width="10%" class="tit2" align="center">금액</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^^일반업무 - 기타^^1^^5000^^99999^^현금/개인카드
|
|
%>
|
|
<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">₩<%=formatnumber(d_cost,0)%> </font></td>
|
|
</tr>
|
|
<%
|
|
rsc.MoveNext
|
|
Loop
|
|
%>
|
|
<tr>
|
|
<td colspan="4" class="tit2" align="center">합계</td>
|
|
<td class="tit2" align="right"><font class="tahoma">₩<%=formatnumber(sum_cost,0)%> </font></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
|
|
%> |