Files
KIN/approval/doc_prepayment2_ex_print.asp
2025-09-29 17:55:08 +09:00

843 lines
32 KiB
Plaintext

<!-- #include virtual = "include/header.asp" -->
<!-- #include virtual = "include/left.asp" -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<h1>문서 작성</h1>
</div>
<!-- /.content-header -->
<!-- Main content -->
<div class="content-body">
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<%
dim tmpstr
dim Query
dim i, j
dim user_name(4) '현재 사용자,0:사원코드, 1:이름,2:직급,3:전화번호, 4:부서코드(명)
dim Max_Width
dim title
dim Curr_date '오늘날짜
dim Company(6)
dim krc_no '정산서의 문서번호
dim krc_no_estimate '가지급금지출결의서의 문서번호
dim gap(27)
dim gap_real(65)
dim print_type
dim tabindex
dim db_table_name
db_table_name = "문서내용"
title="가지급금정산2"
Max_Width =750
Curr_date = year(date) & "년 " & month(date) & "월 " & day(date) & "일"
set rsm = server.CreateObject("ADODB.RECORDSET")
''//=================
''//=================
'''''과거 지난기록 가져오기(가지급금지출결의서의 내용 가져오기
krc_no_estimate=request("krc_no_estimate")
gap(2) = "--" ' '전화번호 'split때문에
if krc_no_estimate <> "" then '가지급정산인데 가지급지출결의서의 문서번호를 기준으로 일단은 가지급지출결의서 내용을 가져오기
query = "select * from " & db_table_name
query = query & " where 문서번호 = '" & krc_no_estimate & "'"
adors.open query, adoconn, adopenstatic, adlockreadonly
gap(1) = adors("target1")
gap(2) = adors("target2")
gap(3) = adors("target3")
gap(4) = adors("target4")
gap(5) = adors("target5")
gap(6) = adors("target6")
gap(7) = ViewWord(adors("target7"))
gap(8) = adors("target8")
gap(9) = adors("target9")
gap(10) = adors("target10")
gap(11) = ViewWord(adors("target11"))
gap(16) = adors("target12")
gap(17) = adors("target13")
gap(18) = adors("target19")
gap(19) = adors("target20")
gap(20) = adors("target21")
gap(21) = adors("target22")
gap(22) = adors("target23")
gap(23) = adors("target24")
gap(24) = adors("target25")
gap(25) = adors("target26")
gap(26) = adors("target27")
gap(27) = adors("target28")
adoRs.close
end if
print_type = request("print_type")
tmpstr = split(request("txt_target"),",")
gap(11) = request("txt_target08")
if print_type = "1" then
for i=1 to ubound(tmpstr)
gap_real(i) = tmpstr(i)
'Response.Write i & " => " & gap_real(i) & "'<br>"
next
elseif print_type = "2" then
for i=1 to ubound(tmpstr)-12
gap_real(i) = tmpstr(i+12)
'Response.Write i & " => " & gap_real(i) & "'<br>"
next
end if
' Response.Write tmpstr(0) & "'<br>"
''//=================
''//=================
''//===============
''회사 회사명, 사업자등록번호, 대표자명, 주소 가져오기
Query = "select * from company"
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
Company(1) = adors("com_name")
Company(2) = adors("사업자등록번호")
Company(3) = adors("대표자명")
Company(4) = adors("주소")
Company(5) = adors("법인등록번호")
Company(6) = adors("회사대표전화번호")
adoRs.close
''///===============
''로그인 사용자 정보
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_txt1 = request("tmp_txt1")
tmp_txt2 = request("tmp_txt2")
tmp_txt3 = request("tmp_txt3")
tmp_txt4 = request("tmp_txt4")
tmp_txt5 = request("tmp_txt5")
tmp_txt6 = request("tmp_txt6")
tmp_txt7 = request("tmp_txt7")
tmp_txt8 = request("tmp_txt8")
tmp_txt9 = request("tmp_txt9")
tmp_txt10 = request("tmp_txt10")
tmp_txt11 = request("tmp_txt11")
tmp_txt12 = request("tmp_txt12")
'Response.Write "tmp_txt1 : " & tmp_txt1 & "<BR>"
if cint(print_type) = 2 then
'먼저 가지급금정산서의 문서번호 생성
''///===============
''문서번호 정보
Query = "select 문서번호 as krc_no from " & db_table_name
query = query & " where 문서제목 = '" & replace(title, " ", "") & "' "
query = query & " and substring(문서번호,5,4) = '" & year(date) & "' "
query = query & " order by 문서번호"
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 & "5-"
krc_no = tmpstr & ZeroFormat(krc_no,5)
'''진행비
gap(12) = ""
for i=1 to 24 step 2
gap(12) = gap(12) & gap_real(i) & "^^" & gap_real(i+1) & "^^"
'Response.Write gap(12) & "<BR>"
next
''출장비
gap(13)=""
for i=25 to 36 step 2
gap(13) = gap(13) & gap_real(i) & "^^" & gap_real(i+1) & "^^"
next
''기타
gap(14)=""
for i=37 to 47 step 2
gap(14) = gap(14) & gap_real(i) & "^^" & gap_real(i+1) & "^^"
next
''정산내역
gap(15)=""
for i=48 to 51
gap(15) = gap(15) & gap_real(i+1) & "^^"
next
' Response.Write "12 => '" & gap(12) & "<br>"
' Response.Write "13 => '" & gap(13) & "<br>"
' Response.Write "14 => '" & gap(14) & "<br>"
' Response.Write "15 => '" & gap(15) & "<br>"
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)
%>
<!-- #include file = "inc_payapproval.asp" -->
<!-- #include file = "inc_payapproval_line.asp" -->
<!-- #include file = "inc_preapproval.asp" -->
<%
target99 = tmp_txt1 & "^^" & tmp_txt2 & "^^" & tmp_txt3 & "^^" & tmp_txt4 & "^^" & tmp_txt5 & "^^" & tmp_txt6
target100 = tmp_txt7 & "^^" & tmp_txt8 & "^^" & tmp_txt9 & "^^" & tmp_txt10 & "^^" & tmp_txt11 & "^^" & tmp_txt12
'Document table에 삽입
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 & "', '" & replace(title, " ", "") & "', '" & Session("loginuser") & "', '" & date() & "', '16', '" & 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 & " 'Y', 'N') "
'Response.Write query & "<BR>"
adoconn.execute query
'====================================================================
'//========================
'내용 저장하기
'일단 기존에 저장된 가지급금정산서는 지우고
'왜냐하면 가지급금정산서는 가지급금지출결의서와 1대1이기에
'query = "select 문서번호 from " & db_table_name & " where target16 like '" & krc_no_estimate & "%'"
'adoRs.open Query, adoconn,adopenstatic, adlockreadonly
'if adoRs.recordcount > 0 then
' krc_no = adors("문서번호")
'end if
'adoRs.close
'query = "delete from " & db_table_name & " where target16 like '" & krc_no_estimate & "%'"
'adoconn.execute query
query = "insert into " & db_table_name & " (문서번호, 문서제목, target1, target2, target3, target4, target5, "
query = query & " target6, target7, target8, target9, target10, target11, "
query = query & " target12, target13, target14, target15, target16, target17, target18,"
query = query & " target19, target20, target21, target22, target23, target24, target25, target26, target27, target28, "'가지급금의 세부내역(2009-10-01)
query = query & " target97,target98,target99,target100, "
query = query & " p_sn, 발급일, 발급시각, login_p_no, login_이름,login_ip) values ( "
query = query & "'" & krc_no & "', "
query = query & "'" & replace(title, " ", "") & "', "
query = query & "'" & gap(1) & "', "
query = query & "'" & gap(2) & "', "
query = query & "'" & gap(3) & "', "
query = query & "'" & gap(4) & "', "
query = query & "'" & gap(5) & "', "
query = query & "'" & gap(6) & "', "
query = query & "'" & CheckWord(gap(7)) & "', "
query = query & "'" & gap(8) & "', "
query = query & "'" & gap(9) & "', "
query = query & "'" & gap(10) & "', "
query = query & "'" & CheckWord(replace(gap(11),chr(13),"<br>")) & "', "
query = query & "'" & gap(12) & "', "
query = query & "'" & gap(13) & "', "
query = query & "'" & gap(14) & "', "
query = query & "'" & gap(15) & "', "
query = query & "'" & krc_no_estimate & "', "
query = query & "'" & gap(16) & "', "
query = query & "'" & gap(17) & "', "
for i= 18 to 27''가지급금의 세부내역(2009-10-01)
query = query & "'" & gap(i) & "', "
next
query = query & "'" & target97 & "', "
query = query & "'" & target98 & "', "
query = query & "'" & target99 & "', "
query = query & "'" & target100 & "', "
query = query & "'" & gap(17) & "', "
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") & "') "
'Response.Write query & "<br>"
' if session("loginuser") = "김홍근" or session("loginuser") = "강두형" then
adoconn.execute query
''로그저장
query = "insert into " & db_table_name & "_log (문서번호, 문서제목, 대상자_p_no, 대상자_이름, 내용,"
query = query & " 발급일, 발급시각, 발급자_p_no, 발급자_이름, 발급자_ip) values ( "
query = query & "'" & krc_no & "', "
query = query & "'" & replace(title, " ", "") & "', "
query = query & "'" & user_name(0) & "', "
query = query & "'" & user_name(1) & "', "
query = query & "'" & replace(title, " ", "") & "인쇄', "
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") & "')"
adoconn.execute query
end if
%>
<script language=javascript>
function win_close()
{
// window.close();
window.history.back(-1);
}
function subit(){
var txt_date_1 = document.frm_estimate_moeny.txt_date_1.value;
var txt_target = new Array();
for (i=1;i<65;i++){
var txt = document.frm_estimate_moeny.elements[i].value;
txt = allTrim(txt);
for(var j=0;j<txt.length;j++){
txt = txt.replace(',','');
txt = txt.replace(' ','');
txt = txt.replace('&','/');
}
txt_target[i] = txt;
}
if (allTrim(txt_date_1) == ""){
alert("정산일자를 기록하세요");
document.frm_estimate_moeny.txt_date_1.focus();
return false;
}
var url = "doc_prepayment2_ex_print.asp";
url = url + "?txt_date_1=" + txt_date_1;
url = url + "&txt_target=" + txt_target;
url = url + "&krc_no_estimate=" + document.frm_estimate_moeny.krc_no_estimate.value;
url = url + "&print_type=2";
//alert(url);
document.frm_estimate_moeny.action=url;
document.frm_estimate_moeny.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('결재요청 되었습니다');
//document.frm_estimate_moeny.action = "/main_left.asp";
//document.frm_estimate_moeny.target = "mainleft";
//document.frm_estimate_moeny.submit();
// self.close();
}
//-->
</script>
<%if cint(print_type) = 2 then%>
<script>
clsit();
</script>
<% end if %>
<form method='post' name='frm_estimate_moeny'>
<td width="100%" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<!-- 확인 -->
</tr>
<tr>
<td colspan="2" style="padding:20;">
<table cellpadding="0" cellspacing="0" border="0">
<%if cint(print_type) = 1 then%>
<tr>
<td style="padding:0 0 5 0;">
<img src="/images/common/btn_approve.jpg" onClick="subit()" style="CURSOR:pointer;">
<img src="/images/common/btn_cancel.jpg" onClick="win_close();" style="CURSOR:pointer;">
</td>
</tr>
<%end if%>
<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="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_4.jpg"></td>
<td>
<table width="100%" cellpadding="0" cellspacing="1" border="0" style="border-collapse:collapse;" bgcolor="#d8d8d8">
<%if cdate(formatdatetime(date,2)) > "2014-01-07" then
tmp_title = "대표이사"
else
tmp_title = "부회장"
end if%>
<tr align="center">
<td height=20 class="k_small" bgcolor="#F1F1F1" colspan=2 width=22% style="font-size:11px;">기안/승인(실사)</td>
<td height=20 class="k_small" bgcolor="#F1F1F1" colspan=2 width=22% style="font-size:11px; display:none;">기안/승인(연구)</td>
<td height=20 class="k_small" bgcolor="#F1F1F1" colspan=2 width=22% style="font-size:11px;">기안/승인(임원)</td>
<td colspan=4 class="k_small" bgcolor="#F1F1F1" width=44% style="font-size:11px;">검토/승인(관리부서)</td>
</tr>
<tr align="center">
<td height=20 class="k_small" bgcolor="#F1F1F1" width=10% style="font-size:11px;">본인</td>
<td width=10% class="k_small" bgcolor="#F1F1F1" style="font-size:11px;">부서장</td>
<td width=10% class="k_small" bgcolor="#F1F1F1" style="font-size:11px; display:none;">팀장</td>
<td width=10% class="k_small" bgcolor="#F1F1F1" style="font-size:11px; display:none;">부서장</td>
<td width=10% class="k_small" bgcolor="#F1F1F1" style="font-size:11px;">임원</td>
<td width=10% class="k_small" bgcolor="#F1F1F1" style="font-size:11px;"><%=tmp_title%></td>
<td width=10% class="k_small" bgcolor="#F1F1F1" style="font-size:11px;">담당</td>
<td width=10% class="k_small" bgcolor="#F1F1F1" style="font-size:11px;">부서장</td>
<td width=10% class="k_small" bgcolor="#F1F1F1" style="font-size:11px;">임원</td>
<td width=10% class="k_small" bgcolor="#F1F1F1" style="font-size:11px;"><%=tmp_title%></td>
</tr>
<%
'my_pos = "3"
'Response.Write "my_pos : " & my_pos & "<BR>"
tmp_txt = "<p style='line-height:11pt;font-size:9pt;'>" & Session("loginuser") & "<BR>" & replace(date(), "-","") & "<BR>" & FormatDateTime(time,4)
tmp_txt = Session("loginuser") & "<BR>" & replace(date(), "-","") & "<BR>" & Session("User_Number")
if my_pos = 6 then '사장
tmp_txt1 = "전결"
tmp_txt2 = "전결"
tmp_txt3 = "전결"
tmp_txt4 = "전결"
tmp_txt5 = "전결"
tmp_txt6 = tmp_txt
tmp_txt7 = "/"
tmp_txt8 = "/"
tmp_txt9 = "/"
tmp_txt10 = "/"
tmp_txt11 = "/"
tmp_txt12 = month(now()) & " / " & day(now())
elseif my_pos = 5 then '임원
tmp_txt1 = "전결"
tmp_txt2 = "전결"
tmp_txt3 = "전결"
tmp_txt4 = tmp_txt
tmp_txt5 = " "
tmp_txt6 = " "
tmp_txt7 = "/"
tmp_txt8 = "/"
tmp_txt9 = "/"
tmp_txt10 = "/"
tmp_txt11 = month(now()) & " / " & day(now())
tmp_txt12 = "/"
elseif my_pos = 3 or my_pos = 4 then '부서장
tmp_txt1 = "전결"
tmp_txt2 = tmp_txt
tmp_txt3 = " "
tmp_txt4 = " "
tmp_txt5 = " "
tmp_txt6 = " "
tmp_txt7 = "/"
tmp_txt8 = month(now()) & " / " & day(now())
tmp_txt9 = "/"
tmp_txt10 = "/"
tmp_txt11 = "/"
tmp_txt12 = "/"
elseif my_pos = 1 OR my_pos = 2 then '팀 팀원, 팀장
tmp_txt1 = tmp_txt
tmp_txt2 = " "
tmp_txt3 = " "
tmp_txt4 = " "
tmp_txt5 = " "
tmp_txt6 = " "
tmp_txt7 = month(now()) & " / " & day(now())
tmp_txt8 = "/"
tmp_txt9 = "/"
tmp_txt10 = "/"
tmp_txt11 = "/"
tmp_txt12 = "/"
else '노팀 팀원
tmp_txt1 = tmp_txt
tmp_txt2 = " "
tmp_txt3 = " "
tmp_txt4 = " "
tmp_txt5 = " "
tmp_txt6 = " "
tmp_txt7 = month(now()) & " / " & day(now())
tmp_txt8 = "/"
tmp_txt9 = "/"
tmp_txt10 = "/"
tmp_txt11 = "/"
tmp_txt12 = "/"
end if
%>
<input type="hidden" name="tmp_txt1" value="<%=tmp_txt1%>">
<input type="hidden" name="tmp_txt2" value="<%=tmp_txt2%>">
<input type="hidden" name="tmp_txt3" value="<%=tmp_txt3%>">
<input type="hidden" name="tmp_txt4" value="<%=tmp_txt4%>">
<input type="hidden" name="tmp_txt5" value="<%=tmp_txt5%>">
<input type="hidden" name="tmp_txt6" value="<%=tmp_txt6%>">
<input type="hidden" name="tmp_txt7" value="<%=tmp_txt7%>">
<input type="hidden" name="tmp_txt8" value="<%=tmp_txt8%>">
<input type="hidden" name="tmp_txt9" value="<%=tmp_txt9%>">
<input type="hidden" name="tmp_txt10" value="<%=tmp_txt10%>">
<input type="hidden" name="tmp_txt10" value="<%=tmp_txt11%>">
<input type="hidden" name="tmp_txt10" value="<%=tmp_txt12%>">
<tr height="35">
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt1%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt3%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"style="display:none;"><%=tmp_txt3%>&nbsp;</td>
<td bgcolor="#FFFFFF" align="center" class="k_small"style="display:none;"><%=tmp_txt4%>&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>
<tr height="18">
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt7%></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt9%></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"style="display:none;"><%=tmp_txt9%></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"style="display:none;"><%=tmp_txt10%></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt11%></td>
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt12%></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>
</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" >지급처</td>
<td width="35%" >
<font class="tahoma">
<%=gap(1)%>
<%tmpstr = split(gap(2),"-")%>
Tel.
<%=tmpstr(0)%> - <%=tmpstr(1)%> - <%=tmpstr(2)%>
</font>
</td>
<td width="15%" align="center" rowspan="4">가지급금 내역</td>
<td width="35%" align="center" 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%" align="center">항목</td>
<td width="40%" align="center">금액</td>
</tr>
<%for i=1 to 5%>
<tr>
<%if trim(gap(18+((i-1)*2))) = "" then%>
<td >&nbsp;</td>
<td >&nbsp;</td>
<% else %>
<td ><%=gap(18+((i-1)*2))%></td>
<td align="right">\ <%=gap(19+((i-1)*2))%></td>
<% end if %>
</tr>
<%next%>
</table>
<%end if%>
</td>
</tr>
<tr>
<td width="15%" align="center" >지급처 담당자</td>
<td width="35%" >
<font class="tahoma">
<%=gap(3)%>
</font>
</td>
</tr>
<tr>
<td width="15%" align="center" >지급일자</td>
<td width="35%" >
<font class="tahoma">
<%=gap(4)%>
</font>
</td>
</tr>
<tr>
<td width="15%" align="center" >정산 예정일</td>
<td width="35%" >
<font class="tahoma">
<%=gap(5)%>
</font>
</td>
</tr>
<tr height="25">
<td width="15%" align="center" >지출사유</td>
<td width="35%" >
<font class="tahoma">
<%=gap(6)%>
</font>
</td>
<td width="15%" align="center" >계</td>
<td width="35%" align="right">
<font class="tahoma">
<%=gap(8)%> 원
</font>
</td>
</tr>
<tr height="25">
<td width="15%" align="center" >프로젝트</td>
<td width="35%" >
<%=gap(16)%>
</td>
<td width="15%" align="center" >부가세액</td>
<td width="35%" align="right">
<%=gap(9)%> 원
</td>
</tr>
<tr height="25">
<td width="15%" align="center" >지출 발의자</td>
<td width="35%" align="center">
<%=user_name(1)%>
</td>
<td width="15%" align="center" >가지급 합계액</td>
<td width="35%" align="right">
<%=gap(10)%> 원
</td>
</tr>
</table>
<input type="hidden" name=txt_target08 value="<%=replace(ViewWord(gap(11)),"<br>",chr(13))%>">
<table width="95%" cellpadding="3" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr height="15">
<td align="center" colspan="4" style="font-size:12px;">세 부 정 산 내 역 (진 행 비)</td>
</tr>
<tr>
<%
'Response.Write "gap_real = " & gap_real(13) & "<BR>"
tabindex = 11
for i=1 to 2 '사례비, 운반비
tabindex = tabindex + 1
%>
<td width="15%" align="center" ><input type=text readonly value="<%=gap_real(tabindex-11)%>" size="15"></td>
<%tabindex = tabindex + 1%>
<td width="35%" align="center">
<input type=text name="txt_target<%=zeroformat(tabindex,2)%>" OnKeyup="OnlyNumber(this);check_comma();" value="<%=gap_real(tabindex-11)%>" tabindex="<%=tabindex%>">&nbsp;원
</td>
<%
next
%>
</tr>
<%for i=1 to 3%>
<tr>
<%for j=(i-1) * 2+3 to (i-1) * 2+4 '임대료부터 우편료까지
tabindex = tabindex + 1'%>
<td width="15%" align="center" ><input type=text readonly value="<%=gap_real(tabindex-11)%>" size="15"></td>
<%tabindex = tabindex + 1%>
<td width="35%" align="center">
<input type=text name="txt_target<%=zeroformat(tabindex,2)%>" OnKeyup="OnlyNumber(this);check_comma();" value="<%=gap_real(tabindex-11)%>" tabindex="<%=tabindex%>">&nbsp;원
</td>
<%next%>
</tr>
<%next%>
<%for i=4 to 5%>
<tr>
<%for j=(i-1) * 2+3 to (i-1) * 2+4 '여분4개
tabindex = tabindex + 1'%>
<td width="15%" align="center" ><input type=text value="<%=gap_real(tabindex-11)%>" size="15" name='txt_target<%=zeroformat(tabindex,2)%>'></td>
<%tabindex = tabindex + 1'%>
<td width="35%" align="center">
<input type=text name="txt_target<%=zeroformat(tabindex,2)%>" OnKeyup="OnlyNumber(this);check_comma();" value="<%=gap_real(tabindex-11)%>" tabindex="<%=tabindex%>">&nbsp;원
</td>
<%next%>
</tr>
<%next%>
<tr height="15">
<td align="center" colspan="4" style="font-size:12px;">세 부 정 산 내 역 (출 장 비)</td>
</tr>
<tr>
<%
for i=13 to 14 '항공료부터 교통비까지
tabindex = tabindex + 1
%>
<td width="15%" align="center" ><input type=text readonly value="<%=gap_real(tabindex-11)%>" size="15"></td>
<%tabindex = tabindex + 1%>
<td width="35%" align="center">
<input type=text name="txt_target<%=zeroformat(tabindex,2)%>" OnKeyup="OnlyNumber(this);check_comma();" value="<%=gap_real(tabindex-11)%>" tabindex="<%=tabindex%>">&nbsp;원
</td>
<%
next
%>
</tr>
<%for i=7 to 8%>
<tr>
<%for j=(i-1) * 2+3 to (i-1) * 2+4 '숙바료 부터 기타까지
tabindex = tabindex + 1'%>
<td width="15%" align="center" ><input type=text readonly value="<%=gap_real(tabindex-11)%>" size="15"></td>
<%tabindex = tabindex + 1'%>
<td width="35%" align="center">
<input type=text name="txt_target<%=zeroformat(tabindex,2)%>" OnKeyup="OnlyNumber(this);check_comma();" value="<%=gap_real(tabindex-11)%>" tabindex="<%=tabindex%>">&nbsp;원
</td>
<%next%>
</tr>
<%next%>
<tr height="15">
<td align="center" colspan="4" style="font-size:12px;">세 부 정 산 내 역 (기 타)</td>
</tr>
<tr>
<%
for i=19 to 20
tabindex = tabindex + 1
%>
<td width="15%" align="center" ><input type=text value="<%=gap_real(tabindex-11)%>" size="15" name='txt_target<%=zeroformat(tabindex,2)%>' tabindex="<%=tabindex%>"></td>
<%tabindex = tabindex + 1%>
<td width="35%" align="center">
<input type=text name="txt_target<%=zeroformat(tabindex,2)%>" OnKeyup="OnlyNumber(this);check_comma();" value="<%=gap_real(tabindex-11)%>" tabindex="<%=tabindex%>">&nbsp;원
</td>
<%
next
%>
</tr>
<%for i=10 to 11%>
<tr>
<%for j=(i-1) * 2+3 to (i-1) * 2+4
tabindex = tabindex + 1'%>
<td width="15%" align="center" ><input type=text value="<%=gap_real(tabindex-11)%>" size="15" name='txt_target<%=zeroformat(tabindex,2)%>' tabindex="<%=tabindex%>"></td>
<%tabindex = tabindex + 1'%>
<td width="35%" align="center">
<input type=text name="txt_target<%=zeroformat(tabindex,2)%>" OnKeyup="OnlyNumber(this);check_comma();" value="<%=gap_real(tabindex-11)%>" tabindex="<%=tabindex%>">&nbsp;원
</td>
<%next%>
</tr>
<%next%>
<tr height="15">
<td align="center" colspan="4" style="font-size:12px;">정 산 내 역</td>
</tr>
<%tabindex = tabindex + 1'%>
<tr height="30">
<td align="center" colspan="2">정산일자</td>
<td align="center" colspan="2">
<input type="text" class="gray" style="width:150;text-align:right" name="txt_date_1"OnBlur="OnFormatDate(this)" OnFocus="OnReplaceDate(this)" OnKeyup="OnlyNumber(this)" value="<%=gap_real(49)%>">
<img src="/images/common/btn_calendar.jpg" align="absmiddle" OnClick="winopn('/lib/calendar.html?actval=txt_date_1')" style="CURSOR:pointer;">
</td>
</tr>
<tr height="30">
<td width="15%" align="center" rowspan="2">가지급 정산</td>
<td width="35%" align="center">
총사용 금액
</td>
<td align="center" colspan="2">
<input type="text" class="gray" name="txt_target60" readonly value="<%=formatnumber(gap_real(50),0)%>" >&nbsp;원
</td>
</tr>
<tr height="30">
<td width="35%" align="center">
<input type="text" class="gray" name="txt_target61" readonly value="<%=gap_real(51)%>" >
</td>
<td align="center" colspan="2">
<input type="text" class="gray" name="txt_target62" readonly value="<%=formatnumber(gap_real(52),0)%>" >&nbsp;원
</td>
</tr>
<tr height="15">
<td align="center" colspan="4" style="font-size:12px;">비 고</td>
</tr>
<tr>
<td colspan="4">
<textarea style="width:100%;height:200;" name="txt_note"><%=replace(gap(11),"<br>",chr(13))%></textarea>
</td>
</tr>
<%if print_type=2 then%>
<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>
<%end if%>
<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 src="/images/approval/docbg_btm.jpg"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<%
'프로그램이 구려서 아래의 히든 값은 반드시 여기에 위치해야 함..
'위로 올리면 저장되는 값이 어긋남.
%>
<input type=hidden readonly name = 'krc_no_estimate' value="<%=krc_no_estimate%>">
</form>
</div>
</div>
</div>
</div>
</div>
<!-- /.content -->
<!-- REQUIRED SCRIPTS -->
<script>
</script>
</div>
<!-- /.content-wrapper -->
<!-- #include virtual = "include/footer.asp" -->