<% Response.CharSet = "EUC-KR" '한글 dim tmpstr dim Query dim i dim user_name(4) '현재 사용자,0:사원코드, 1:이름,2:직급,3:전화번호, 4:부서코드(명) dim Max_Width dim title dim target_name '발급대상자 이름 dim Curr_date '오늘날짜 dim Company(6) dim Gap(10) '1:프로젝트 코드, 2:지출(입금)목적, 3:지출(입금)일자, 4:지출(입금)방법, 5:공급가액, 6:부가세액, 7:총액, 8:거래처, 9:프로젝트 코드, 10:품의서 문서번호 dim krc_no dim print_type '1:보기, 2:진짜프린트 dim db_table_name dim title_type 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 = "문서내용" Max_Width =750 Curr_date = year(date) & "년 " & zeroformat(month(date),2) & "월 " & zeroformat(day(date),2) & "일" ''//========================================== ''2010년 3월 3일 '''인쇄여부 표시 if print_type = "2" then query = "update 문서내용 set print_chk = 'Yes', print_cnt = print_cnt + 1 where 문서번호='" & d_no & "' " adoConn.Execute query end if 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 if session("admin_ip") = Request.ServerVariables("remote_host") then else query = query & " AND b.d_delok = 'N' " end if end if rsc.Open query, adoConn, 1 if rsc.RecordCount > 0 Then If rsc("문서제목") = "내근직수당지출결의서" Then title="내근직 수당 지출결의서" pay_type = "1" Else title="면접원 수당 지출결의서" pay_type = "2" End If title_type = mid(replace(title," ",""), 1, 2) startDT = rsc("target10") endDT = rsc("target11") sv = rsc("target12") d_p_subject = split(rsc("target21"), "^//^") d_p_child_sn = split(rsc("target20"), "^//^") d_estimate_money = split(rsc("target13"), "^//^") d_currentMoney = split(rsc("target14"), "^//^") d_totalPay = split(rsc("target15"), "^//^") d_chaPay = split(rsc("target16"), "^//^") overMoney_reason = split(rsc("target17"), "^//^") ''' Response.Write "rsc('target17') : " & rsc("target17") & "
" 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), "
") then tmp_t1 = split(tmp_7(0), "
") tmp_txt1 = "" 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), "
") then tmp_t2 = split(tmp_7(1), "
") tmp_txt2 = "" 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), "
") then tmp_t3 = split(tmp_7(2), "
") tmp_txt3 = "" 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), "
") then tmp_t4 = split(tmp_7(3), "
") tmp_txt4 = "" 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), "
") then tmp_t5 = split(tmp_7(4), "
") tmp_txt5 = "" else tmp_txt5 = tmp_7(4) end if tmp_txt6 = tmp_8(0) tmp_txt7 = tmp_8(1) tmp_txt8 = tmp_8(2) tmp_txt9 = tmp_8(3) tmp_txt10 = tmp_8(4) 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("p_sn") gap(10) = rsc("target9") d_order_cnt = int(rsc("d_order_cnt")) print_type = request("print_type") ''날자를 '-'에서 년,월로 교체 gap(3) = mid(gap(3),1,4) & "년 " & mid(gap(3),6,2) & "월 " & mid(gap(3),9,2) & "일" for i=1 to 9 if trim(gap(i)) = "" then gap(i) = " " end if next for i=5 to 7 if gap(i) = " " then gap(i) = "0" end if next ''로그저장 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 & "'" & Session("User_Number") & "', " query = query & "'" & Session("loginuser") & "', " query = query & "'문서열기', " 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") & "')" if Request.ServerVariables("REMOTE_ADDr") = session("admin_ip") then else adoconn.execute query end if %> <%=GNB_TITLE%> <
onLoad="print_ie();" <% end if %>>
<%if x = "99" then%> <%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")) or Session("Depart_Code") = "18") then %> <%end if%>
<% Dim pay_apply_username pay_apply_username = "" set adors2 = server.CreateObject("ADODB.RECORDSET") query = "select p_name from person where p_no = '" & sv & "' " adors2.open query, adoconn, adopenstatic, adlockreadonly If adors2.recordCount > 0 Then pay_apply_username = adors2("p_name") End If adors2.close %>
<%=title%>
문 서 번 호 <%=d_no%>
결 의 일 자 <%=Curr_date%>
성         명 <%=user_name(1)%>
소         속 <%=user_name(4)%>
직         급 <%=user_name(2)%>
하기의 프로젝트(업무)와 관련하여, <%=title_type%>을 결의하오니 승인하여 주시기 바랍니다.
수당 결재 기간 <%if startDT <> "" then %><%=startDT%> ~ <%=endDT%><% else %>프로젝트단위<%end if %> 수당 담당자 <%=pay_apply_username%>
<% Dim minus_money_flag, data_index minus_money_flag = false Dim total_estimate_money, total_currentMoney, total_Pay, total_chaPay total_estimate_money = 0 total_currentMoney = 0 total_Pay = 0 total_chaPay = 0 for data_index = 0 To UBound(d_p_child_sn)-1 Dim tmp_p_child_sn Dim tmp_p_subject Dim tmp_estimate_money Dim tmp_currentMoney Dim tmp_totalPay Dim tmp_chaPay Dim tmp_overMoney_reason replaceStr = CStr(data_index+1)+"^^" tmp_p_child_sn = Replace(d_p_child_sn(data_index), replaceStr, "") tmp_p_subject = Replace(d_p_subject(data_index), replaceStr, "") tmp_estimate_money = Replace(d_estimate_money(data_index), replaceStr, "") tmp_currentMoney = Replace(d_currentMoney(data_index), replaceStr, "") tmp_totalPay = Replace(d_totalPay(data_index), replaceStr, "") tmp_chaPay = Replace(d_chaPay(data_index), replaceStr, "") tmp_overMoney_reason = Replace(overMoney_reason(data_index), replaceStr, "") %> <% If CDbl(tmp_chaPay) < 0 Then minus_money_flag = true End If %> <% tempPay = 0 %> <% total_estimate_money = total_estimate_money + CDbl(tmp_estimate_money) total_currentMoney = total_currentMoney + CDbl(tmp_currentMoney) total_Pay = total_Pay + CDbl(tmp_totalPay) total_chaPay = total_chaPay + CDbl(tmp_chaPay) %> <% Next %>
프로젝트 예상직접비 누적비용 지출결의비용 예상잔액 사유
[<%=tmp_p_child_sn%>]  ', '<%= d_no %>')">
<%=tmp_p_subject%>
<%=tmp_estimate_money%> <%=tmp_currentMoney%> <%=tmp_totalPay%> <%=tmp_chaPay%> <%=tmp_overMoney_reason%>
합계 <%=FormatNumber(total_estimate_money, 0)%> <%=FormatNumber(total_currentMoney, 0)%> <%=FormatNumber(total_Pay, 0)%> <%=FormatNumber(total_chaPay, 0)%>  
	영 수 일 자 :                  년      월      일
	영   수   자 :                                   (印)
<% end if rsc.Close %>