Files
KIN/ess/doc_prepayment2_print.asp
2025-09-29 17:55:08 +09:00

515 lines
16 KiB
Plaintext

<!-- #include virtual = "lib/config.asp" -->
<%
dim tmpstr
dim Query
dim i
dim user_name(4) '현재 사용자,0:사원코드, 1:이름,2:직급,3:전화번호, 4:부서코드(명)
dim Max_Width
dim title
dim Curr_date '오늘날짜
dim Company(6)
dim gap(23)'1:지급처, 2:지급처전화번호, 3:지급처담당자, 4:지급일자, 5:정산일자, 6:지출사유,
'7:가지급금내역, 8:공급가액, 9:부가세액, 10:가지급금합계액, 11:세부내역, 12:프로젝트명, 13:프로젝트번호
'14:가지급금내역의 1반째 항목, 15:1번째금액
'16:가지급금내역의 1반째 항목, 17:1번째금액
'18:가지급금내역의 1반째 항목, 19:1번째금액
'20:가지급금내역의 1반째 항목, 21:1번째금액
'22:가지급금내역의 1반째 항목, 23:1번째금액
dim krc_no
dim print_type '1:보기, 2:진짜프린트
dim db_table_name
d_no = request("d_no")
x = request("x")
krc_no = d_no
print_type = request("print_type")
view_chk= request("view_chk")
db_table_name = "문서내용"
title="가지급금지출"'결의서"
Max_Width =750
Curr_date = year(date) & "년 " & month(date) & "월 " & day(date) & "일"
query = "SELECT * "
query = query & "FROM 문서내용 as a "
query = query & " INNER JOIN Document as b on a.문서번호 = b.d_no "
query = query & "WHERE a.문서번호='" & d_no & "' "
if x = "99" then
else
query = query & " AND b.d_delok = 'N' "
end if
'Response.Write query
rsc.Open query, adoConn, 1
if rsc.RecordCount > 0 then
tmp_date = split(rsc("d_write_date"), "-")
Curr_date = tmp_date(0) & "년 " & tmp_date(1) & "월 " & tmp_date(2) & "일"
tmp_0 = split(rsc("target97"), "^^")
user_name(0) = rsc("login_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_00 = split(rsc("target98"), "^^")
Company(1) = tmp_00(0)
Company(2) = tmp_00(1)
Company(3) = tmp_00(2)
Company(4) = tmp_00(3)
Company(5) = tmp_00(4)
Company(6) = tmp_00(5)
tmp_7 = split(rsc("target99"), "^^")
tmp_8 = split(rsc("target100"), "^^")
if instr(1,tmp_7(0), "반려") 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), "반려") then
tmp_txt2 = tmp_7(1)
elseif instr(1,tmp_7(1), "<BR>") 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 = tmp_7(1)
end if
if instr(1,tmp_7(2), "반려") then
tmp_txt3 = tmp_7(2)
elseif instr(1,tmp_7(2), "<BR>") 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 = tmp_7(2)
end if
if instr(1,tmp_7(3), "반려") then
tmp_txt4 = tmp_7(3)
elseif instr(1,tmp_7(3), "<BR>") 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 = tmp_7(3)
end if
if instr(1,tmp_7(4), "반려") then
tmp_txt5 = tmp_7(4)
elseif instr(1,tmp_7(4), "<BR>") 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 = tmp_7(4)
end if
if instr(1,tmp_7(5), "반려") then
tmp_txt6 = tmp_7(5)
elseif instr(1,tmp_7(5), "<BR>") then
tmp_t6 = split(tmp_7(5), "<BR>")
tmp_txt6 = "<img src='/images/sign/" & tmp_t6(0) & "_" & tmp_t6(2) & ".jpg' border=0 width=40 height=40>"
else
tmp_txt6 = tmp_7(5)
end if
tmp_txt7 = tmp_8(0)
tmp_txt8 = tmp_8(1)
tmp_txt9 = tmp_8(2)
tmp_txt10 = tmp_8(3)
tmp_txt11 = tmp_8(4)
tmp_txt12 = tmp_8(5)
gap(1) = rsc("target1")
gap(2) = rsc("target2")
gap(3) = rsc("target3")
gap(4) = rsc("target4")
gap(5) = rsc("target5")
gap(6) = rsc("target6")
gap(7) = rsc("target7")
gap(8) = rsc("target8")
gap(9) = rsc("target9")
gap(10) = rsc("target10")
gap(11) = rsc("target11")
gap(12) = rsc("target12")
gap(14) = rsc("target19")
gap(15) = rsc("target20")
gap(16) = rsc("target21")
gap(17) = rsc("target22")
gap(18) = rsc("target23")
gap(19) = rsc("target24")
gap(20) = rsc("target25")
gap(21) = rsc("target26")
gap(22) = rsc("target27")
gap(23) = rsc("target28")
d_order_cnt = int(rsc("d_order_cnt"))
''날자를 '-'에서 년,월로 교체
gap(4) = mid(gap(4),1,4) & "년 " & mid(gap(4),6,2) & "월 " & mid(gap(4),9,2) & "일"
gap(5) = mid(gap(5),1,4) & "년 " & mid(gap(5),6,2) & "월 " & mid(gap(5),9,2) & "일"
for i=1 to 11
if trim(gap(i)) ="" then
gap(i) = "&nbsp;"
end if
next
''금액이 없으면 0원으로
for i=8 to 10
if gap(i) = "&nbsp;" then
gap(i) = "0"
end if
next
%>
<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 txt_date_1 = document.ess.txt_date_1.value;
var txt_date_2 = document.ess.txt_date_2.value;
var txt_target01 = document.ess.txt_target01.value;
var txt_target02 = document.ess.txt_target02.value;
var txt_target03 = document.ess.txt_target03.value;
var txt_target04 = document.ess.txt_target04.value;
var txt_target05 = document.ess.txt_target05.value;
var txt_target06 = document.ess.txt_target06.value;
var txt_target07 = document.ess.txt_target07.value;
var txt_target08 = document.ess.txt_target08.value;
var txt_tel_num_1 = document.ess.txt_tel_num_1.value;
var txt_tel_num_2 = document.ess.txt_tel_num_2.value;
var txt_tel_num_3 = document.ess.txt_tel_num_3.value;
var url = "doc_prepayment2_print.asp";
/*
url = url + "?txt_date_1=" + txt_date_1;
url = url + "&txt_date_2=" + txt_date_2;
url = url + "&txt_target01=" + txt_target01;
url = url + "&txt_target02=" + txt_target02;
url = url + "&txt_target03=" + txt_target03;
url = url + "&txt_target04=" + txt_target04;
url = url + "&txt_target05=" + txt_target05;
url = url + "&txt_target06=" + txt_target06;
url = url + "&txt_target07=" + txt_target07;
url = url + "&txt_target08=" + txt_target08;
url = url + "&txt_tel_num_1=" + txt_tel_num_1;
url = url + "&txt_tel_num_2=" + txt_tel_num_2;
url = url + "&txt_tel_num_3=" + txt_tel_num_3;
*/
url = url + "?print_type=2";
document.ess.action=url;
document.ess.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();
}
}
function clsit()
{
alert('결재요청 되었습니다');
// self.close();
}
function subit(a, b)
{
var tmp_txt;
var approve_pass;
if (a == 1)
{
tmp_txt = "부재자 ";
approve_pass = 1;
}
else
{
tmp_txt = "";
}
if (confirm(tmp_txt + "승인을 하시겠습니까?"))
{
//document.ess.action = "allow_ok.asp?approve_pass="+approve_pass;
document.ess.action = "allow_ok.asp?approve_pass="+approve_pass+"&tmp_pass_psn="+b+"&title="+"<%=replace(title," ","")%>";
document.ess.submit();
}
}
function backit(a)
{
alert("사유를 작성해 주세요");
var url = "reason.asp?d_no="+a;
window.open(url,'','left=0,top=0,width=400,height=150,scrollbars=yes,resizable=yes')
}
//-->
</script>
<body topmargin="10" leftmargin="10" <%if cint(print_type) = 2 then%> onLoad="print_ie();" <% end if %>>
<form method='post' name='ess'>
<input type="hidden" name="d_no" value="<%=d_no%>">
<input type=hidden name = "txt_target01" value="<%=gap(1)%>">
<%tmpstr = split(gap(2),"-")%>
<input type=hidden name = "txt_tel_num_1" value="<%=tmpstr(0)%>">
<input type=hidden name = "txt_tel_num_2" value="<%=tmpstr(1)%>">
<input type=hidden name = "txt_tel_num_3" value="<%=tmpstr(2)%>">
<input type=hidden name = "txt_target02" value="<%=gap(3)%>">
<input type=hidden name = "txt_date_1" value="<%=gap(4)%>">
<input type=hidden name = "txt_date_2" value="<%=gap(5)%>">
<input type=hidden name = "txt_target03" value="<%=gap(6)%>">
<input type=hidden name = "txt_target04" value="<%=gap(7)%>">
<input type=hidden name = "txt_target05" value="<%=gap(8)%>">
<input type=hidden name = "txt_target06" value="<%=gap(9)%>">
<input type=hidden name = "txt_target07" value="<%=gap(10)%>">
<input type=hidden name = "txt_target08" value="<%=gap(11)%>">
<%if x = "99" then%>
<!-- #include file = "inc_delreason.asp" -->
<%end if '''if x = "99" then%>
<%
if cint(print_type) <> 2 and (d_order_cnt = "99" or d_order_cnt = "77") and (tmp_admin_chk = "1" or tmp_request_chk = "1" or int(rsc("login_p_no")) = int(Session("User_Number"))) then
%>
<!-- #include file = "inc_print.asp" -->
<%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 width="100%" 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="5" style="padding:0 0 10 0">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td width="255"><img src="/images/approval/doc_stit13_3.jpg"></td>
<td>
<!-- #include file = "inc_approval2.asp" -->
</td>
</tr>
</table>
</td>
</tr>
<tr height="24">
<td align="center" colspan="5" style="font-size:12px;">가지급금 지출 내역서</td>
</tr>
<tr>
<td width="15%" align="center" class='tit2'>지급처</td>
<td width="35%" class='tit7'>
<font class="tahoma">
<%=gap(1)%>
<%tmpstr = split(gap(2),"-")%>
Tel.
<%=tmpstr(0)%> - <%=tmpstr(1)%> - <%=tmpstr(2)%>
</font>
</td>
<td width="15%" align="center" class='tit2' rowspan="4">가지급금 내역</td>
<td width="35%" align="center" class='tit7' rowspan="4">
<%if not (trim(gap(7)) = "&nbsp;" or trim(gap(7)) = "") then%>
<%=ViewWord(gap(7))%>
<%else%>
<table width="100%" cellpadding="3" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td width="60%" class='tit2' align="center">항목</td>
<td width="40%" class='tit2' align="center">금액</td>
</tr>
<%for i=1 to 5%>
<tr>
<%if trim(gap(14+((i-1)*2))) = "" then%>
<td class='tit7'>&nbsp;</td>
<td class='tit7'>&nbsp;</td>
<% else %>
<td class='tit7'><font class="tahoma"><%=gap(14+((i-1)*2))%></font></td>
<td class='tit7' align="right"><font class="tahoma">₩ <%=gap(15+((i-1)*2))%></font></td>
<% end if %>
</tr>
<%next%>
</table>
<%end if%>
</td>
</tr>
<tr>
<td width="15%" align="center" class='tit2'>지급처 담당자</td>
<td width="35%" class='tit7'>
<font class="tahoma">
<%=gap(3)%>
</font>
</td>
</tr>
<tr>
<td width="15%" align="center" class='tit2'>지급일자</td>
<td width="35%" class='tit7'>
<font class="tahoma">
<%=gap(4)%>
</font>
</td>
</tr>
<tr>
<td width="15%" align="center" class='tit2'>정산 예정일</td>
<td width="35%" class='tit7'>
<font class="tahoma">
<%=gap(5)%>
</font>
</td>
</tr>
<tr height="30">
<td width="15%" align="center" class='tit2'>지출사유</td>
<td width="35%" class='tit7'>
<font class="tahoma">
<%=gap(6)%>
</font>
</td>
<td width="15%" align="center" class='tit2'>공급가액</td>
<td width="35%" class='tit7' align="right">
<font class="tahoma">
<%=gap(8)%> 원
</font>
</td>
</tr>
<%
'----------------------------------------------------------------------------------------
'### 프로젝트명에 해당하는 직접비가 있다면 링크함 - 2010년 1월 26일 수정
query = "SELECT * "
query = query & "FROM Document a "
query = query & " INNER JOIN 문서내용 b on a.d_no = b.문서번호 "
query = query & "WHERE a.d_delok = 'N' "
query = query & " AND a.d_name = '직접비' "
query = query & " AND b.p_sn = '" & rsc("p_sn") & "' "
'Response.Write query & "<BR>"
adoRs.open query, adoConn, 1
'Response.Write "adoRs.recordcount : " & adoRs.recordcount & "<BR>"
if adoRs.recordcount > 0 then
'tmp_link = " - <a href='direct_cost_print.asp?p_sn=" & rsc("p_sn") & "' target='_blank' class='blue'>직접비 보기</a>"
tmp_link = "<a href='direct_cost_print.asp?p_sn=" & rsc("p_sn") & "' target='_blank' class='blue'><img src='/images/approval/btn_directcost_view.jpg' align='absmiddle' style='CURSOR:pointer;'></a>"
else
tmp_link = ""
end if
adoRs.close
'----------------------------------------------------------------------------------------
%>
<tr height="30">
<td width="15%" align="center" class='tit2'>프로젝트</td>
<td width="35%" class='tit7'>
<font class="tahoma">
<%=gap(12)%>(<%=rsc("p_sn")%>)&nbsp;<%=tmp_link%>
</font>
</td>
<td width="15%" align="center" class='tit2'>부가세액</td>
<td width="35%" class='tit7' align="right">
<font class="tahoma">
<%=gap(9)%> 원
</font>
</td>
</tr>
<tr height="30">
<td width="15%" align="center" class='tit2'>지출 발의자</td>
<td width="35%" class='tit7' align="center">
<font class="tahoma">
<%=user_name(1)%>
</font>
</td>
<td width="15%" align="center" class='tit2'>가지급 합계액</td>
<td width="35%" class='tit7' align="right">
<font class="tahoma">
<%=gap(10)%> 원
</font>
</td>
</tr>
<tr>
<td colspan="5" style="padding:10 0 0 0;">
<table border="0" cellspacing=0 cellpadding=0 width="100%">
<tr>
<td class='tit7'>
<br>
<font class="tahoma">
<%=ViewWord(gap(11))%>
</font>
<br>
</td>
</tr>
</table>
</td>
</tr>
<!-- #include file = "inc_reply.asp" -->
<tr>
<td colspan="5" 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="5" 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>
</form>
</body>
</html>
<%
end if
rsc.Close
%>