<% ''//===================== ''//===================== ''2013년 9월 27일자로 ' 지출 결의서에 입금결의서를 추가하여 2개문서를 같은 프로그램에서 구동 '' 구분은 titie와 title_type로 구분 ''//===================== ''//===================== set uploadform = Server.CreateObject("DEXT.FileUpload") uploadform.Codepage = 949 dim doc_type : doc_type = "doc_expense2_print_2014" 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(30, 10) '1:프로젝트 코드, 2:지출(입금)목적, 3:지출(입금)일자, 4:지출(입금)방법, 5:공급가액, 6:부가세액, 7:총액, 8:거래처, 9:프로젝트 코드, 10:품의서 문서번호 Dim target21(30) dim krc_no dim print_type '1:보기, 2:진짜프린트 dim db_table_name dim approval_chk dim title_type Dim before_Approval_money, current_Approval_money db_table_name = "문서내용" approval_chk = "true" if uploadform("title_type") = "지출" then title="지 출 결 의 서" else title="입 금 결 의 서" end if title_type = mid(replace(title," ",""), 1, 2) Max_Width =750 Curr_date = year(date) & "년 " & zeroformat(month(date),2) & "월 " & zeroformat(day(date),2) & "일" set rsm = server.CreateObject("ADODB.RECORDSET") ''//=============== ''회사 회사명, 사업자등록번호, 대표자명, 주소 가져오기 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 'response.Write "uploadform('cost_type') : " & uploadform("cost_type") &"
" cost_type = uploadform("cost_type") If IsNull(cost_type) Or cost_type = "" Then cost_type = 2 End If If cost_type = 1 then d_cost_type = "support" Else d_cost_type = "common" End if contents_cnt = uploadform("p_sn").count 'response.Write "cnt : " & uploadform("contents_cnt") &"
" tmp_money = 0 ''////////======================== ''값가져오기 current_Approval_money = 0 for i=1 to contents_cnt gap(i, 1) = replace(replace(replace(uploadform("p_sn")(i)," ","")," ","")," ","") '프로젝트 명 (20170810 replace 추가) gap(i, 1) = replace(gap(i, 1), "@NPER@", "&") gap(i, 2) = uploadform("expence_reason")(i) '메모 gap(i, 3) = "" ' gap(i, 4) = "" ' gap(i, 5) = uploadform("expence_money")(i) '공급가액 gap(i, 6) = uploadform("expence_vat")(i) '부가세액 gap(i, 7) = uploadform("expence_sum")(i) '입금총액 current_Approval_money = current_Approval_money + CDbl(Replace(gap(i, 5), ",", "")) gap(i, 8) = "" ' gap(i, 9) = replace(replace(replace(uploadform("p_sn")(i)," ","")," ","")," ","") '프로젝트 번호(20170810 추가 replace 추가) gap(i, 10) = uploadform("expence_reason")(i) '비고내용 target21(i) = ( cstr(i) + "^^" + gap(i, 9) + "^//^" + gap(i, 5) + "^//^" + gap(i, 6) + "^//^" + gap(i, 7) + "^//^" + gap(i, 10) + "^//^") ' response.Write "gap(i, 1) : " & gap(i, 1) &"
" ' response.Write "gap(i, 2) : " & gap(i, 2) &"
" ' response.Write "gap(i, 3) : " & gap(i, 3) &"
" ' response.Write "gap(i, 4) : " & gap(i, 4) &"
" ' response.Write "gap(i, 5) : " & gap(i, 5) &"
" ' response.Write "gap(i, 6) : " & gap(i, 6) &"
" ' response.Write "gap(i, 7) : " & gap(i, 7) &"
" ' response.Write "gap(i, 8) : " & gap(i, 8) &"
" ' response.Write "gap(i, 9) : " & gap(i, 9) &"
" ' response.Write "gap(i, 10) : " & gap(i, 10) &"
" ' response.Write "target21(i) : " & target21(i) &"
" Next tmp_money = current_Approval_money 'gap(10) = uploadform("txt_d_no") '품의문서 print_type = uploadform("print_type") hangmok = uploadform("hangmok") '비용항목 sebu = uploadform("sebu") '세부내용 expence_company = uploadform("expence_company")'거래처 expence_date = uploadform("expence_date") '증빙일자 expence_way = uploadform("expence_way") '지출방법 expence_num = uploadform("expence_num") '지출방법 expence_company_num = uploadform("expence_company_num") '지출방법 expence_taxtype = uploadform("expence_taxtype") '지출방법 expence_item = uploadform("expence_item") '지출방법 k_company = uploadform("k_company") '회사 payment_date = uploadform("payment_date") '증빙일자 total_expence_money = uploadform("total_expence_money") '공급가총액 total_expence_vat = uploadform("total_expence_vat") '부가세총액 total_expence_sum = uploadform("total_expence_sum") '지출총액 합 attach_d_no = uploadform("txt_d_no") '품의서 'Response.Write "hangmok : " & hangmok & "
" 'Response.Write "sebu : " & sebu & "
" 'Response.Write "expence_company : " & expence_company & "
" 'Response.Write "expence_date : " & expence_date & "
" 'Response.Write "expence_way : " & expence_way & "
" 'Response.Write "attach_d_no : " & attach_d_no & "
" 'Response.Write "d_cost_type : " & d_cost_type & "
" 'Response.Write "cost_type : " & cost_type & "
" 'd_cost_type = uploadform("d_cost_type") '실사or연구 'Response.Write "p_sub_type : " & p_sub_type & "
" 'Response.Write "est : " & est & "
" tmp_txt1 = uploadform("tmp_txt1") tmp_txt2 = uploadform("tmp_txt2") tmp_txt3 = uploadform("tmp_txt3") tmp_txt4 = uploadform("tmp_txt4") tmp_txt5 = uploadform("tmp_txt5") tmp_txt6 = uploadform("tmp_txt6") tmp_txt7 = uploadform("tmp_txt7") tmp_txt8 = uploadform("tmp_txt8") tmp_txt9 = uploadform("tmp_txt9") tmp_txt10 = uploadform("tmp_txt10") 'response.Write tmp_txt1 &" ,"& tmp_txt2 &" ,"& tmp_txt3 &" ,"& tmp_txt4 &" ,"& tmp_txt5 &" ,"& tmp_txt6 &" ,"& tmp_txt7 &" ,"& tmp_txt8 &" ,"& tmp_txt9 &" ,"& tmp_txt10 '비용 항목 가져오기 'response.Write "hangmok : " & hangmok & "
" if hangmok <> "" then query = " SELECT d_cost_name " query = query & " FROM direct_costcode " query = query & " WHERE id = '"& hangmok & "'" query = query & " AND d_cost_parents = '0' " 'response.Write "query : " & query & "
" rsp.Open query, adoConn, 1 hangmok_name = rsp("d_cost_name") rsp.close end if '세부내용 가져오기 if sebu <> "" then query = " SELECT d_cost_name " query = query & " FROM direct_costcode " query = query & " WHERE id = '"& sebu & "'" rsp.Open query, adoConn, 1 sebu_name = rsp("d_cost_name") rsp.close end if 'response.write "cint(print_type) : " & cint(print_type) & "
" If cint(print_type) = 0 Then print_type = 1 End if If attach_d_no <> "" Then Query = " select * from project2.dbo.문서내용 where 문서번호 = '" & attach_d_no & "'" adoRs.open Query, adoconn,adopenstatic, adlockreadonly if adoRs.recordcount > 0 Then pre_Approval_money = CLng(Replace(adoRs("target5"), ",", "")) before_Approval_money = CLng(Replace(adoRs("target5"), ",", "")) end if adoRs.close Query = "select * " Query = Query & "from 문서내용 " Query = Query & "where 문서제목 = '지출결의서' and del_yes_no = 'no' " Query = Query & "and target9 like '" & attach_d_no & "' " adoRs.open Query, adoconn,adopenstatic, adlockreadonly if adoRs.recordcount > 0 Then For i = 1 To adoRs.recordcount approval_money = Replace(adoRs("target5"), ",", "") before_Approval_money = before_Approval_money - approval_money adors.moveNext next end if adors.close End if if cint(print_type) = 2 then 'response.write "d_cost_type : " & d_cost_type & "
" '먼저 지 출 결 의 서의 문서번호 생성 ''///=============== ''문서번호 정보 Query = "select 문서번호 as krc_no from " & db_table_name query = query & " where 문서제목 = '" & replace(title, " ", "") & "' " query = query & " and substring(문서번호,10,1) = 'A' " 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) & "-" if title_type = "지출" then tmpstr = tmpstr & "A-" end If krc_no = tmpstr & ZeroFormat(krc_no,5) ' response.write "tmpstr : " & tmpstr & "//ZeroFormat(krc_no,5) : " & ZeroFormat(krc_no,5) & "
" 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) '==================================================================== %> <% if( Request.ServerVariables("REMOTE_ADDR") = "10.10.13.79" or Request.ServerVariables("REMOTE_ADDR") = "10.10.13.115" )then response.write "
d_orders = "& d_orders response.write "
d_order_cnt = "& d_order_cnt response.write "
my_pos = "& my_pos response.write "
tmp_dcode = "& tmp_dcode(d_code, 1) response.write "
d_order4 = "& tmp_ess(tmp_dcode(d_code, 1), 0) response.write "
d_order5 = "& tmp_ess(0, 0) end if target99 = tmp_txt1 & "^^" & tmp_txt2 & "^^" & tmp_txt3 & "^^" & tmp_txt4 & "^^" & tmp_txt5 target100 = tmp_txt6 & "^^" & tmp_txt7 & "^^" & tmp_txt8 & "^^" & tmp_txt9 & "^^" & tmp_txt10 'Response.write krc_no '//======================== '내용 저장하기 query = "insert into " & db_table_name & " (문서번호, 문서제목, target1, target2, target3, target4, target5, " query = query & " target6, target7, target8, target9, target10, target11, target12, target13, target14, target15, target16, target17, target18, target19, remark20, target20, " query = query & " target21, target22, target23, target24, target25, target26, target27, target28, target29, target30, " query = query & " target31, target32, target33, target34, target35, target36, target37, target38, target39, target40, " query = query & " target41, target42, target43, target44, target45, target46, target47, target48, target49, target50, " query = query & " target97,target98,target99,target100,p_sn, 발급일, 발급시각, login_p_no, login_이름,login_ip,remark1,remark19) values ( " query = query & "'" & krc_no & "', " query = query & "'" & replace(title, " ", "") & "', " query = query & "'" & "" & "', " '프로젝트명(target1) query = query & "'" & "" & "', " query = query & "'" & expence_date & "', " '증빙일자(target3) query = query & "'" & expence_way & "', " '지출방법(target4) if hangmok = "202" then query = query & "'-" & total_expence_money & "', " '공급가액(target5) query = query & "'-" & total_expence_vat & "', " '부가세액(target6) query = query & "'-" & total_expence_sum & "', " '입금총액(target7) else query = query & "'" & total_expence_money & "', " '공급가액(target5) query = query & "'" & total_expence_vat & "', " '부가세액(target6) query = query & "'" & total_expence_sum & "', " '입금총액(target7) end if query = query & "'" & expence_company & "', " '거래처(target8) query = query & "'" & attach_d_no & "', " '품의문서(target9) query = query & "'" & "" & "', " '자식프로젝트번호(target10),(없음) query = query & "'" & hangmok & "', " '비용항목(target11) query = query & "'" & sebu & "', " '세부내용(target12) query = query & "'" & "" & "', " '직접비예산(target13) query = query & "'" & "" & "', " '누적집행금액(target14) query = query & "'" & "" & "', " '차액(target15) query = query & "'" & d_cost_type & "', " '실사 or 연구(target16) query = query & "'" & "" & "', " '추가사유(target17) query = query & "'" & expence_num & "', " '국세청번호(target18) query = query & "'" & expence_company_num & "|" & expence_taxtype & "|" & expence_item & "', " '거래처사업자번호|세금구분|대표품목(target19) query = query & "'" & k_company & "', " '국세청번호(target18) query = query & "'" & "" & "', " '자식프로젝트번호(target20) 없음 for i=1 to 30 query = query & "'" & target21(i) & "', " next query = query & "'" & target97 & "', " query = query & "'" & target98 & "', " query = query & "'" & target99 & "', " query = query & "'" & target100 & "', " 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") & "', '3', " query = query & "'" & payment_date & "') " '지급일자(remark19) 'Response.Write query & "
" adoconn.execute query '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 & "', '" & title_type & "결의서', '" & Session("loginuser") & "', '" & date() & "', '10', '" & 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 & "
" 'Response.End adoconn.execute query '==================================================================== ''========================================================================================================================================================= '(2014-01-20) 결재가 올라가면 direct_cost 테이블의 act_sum에 바로 업데이트 시킴. 반려나 결재취소시에는 해당 금액만큼 뺄 것임. If cost_type = 1 Then for i=1 to contents_cnt 'response.Write "gap("&i&", 1) : " & gap(i, 1) &"
" 'response.Write "gap("&i&", 2) : " & gap(i, 2) &"
" 'response.Write "gap("&i&", 5) : " & gap(i, 5) &"
" 'response.Write "gap("&i&", 6) : " & gap(i, 6) &"
" 'response.Write "gap("&i&", 7) : " & gap(i, 7) &"
" 'response.Write "gap("&i&", 9) : " & gap(i, 9) &"
" 'response.Write "gap("&i&", 10) : " & gap(i, 10) &"
" 'response.Write "hangmok : " & hangmok &"
" 'response.Write "sebu : " & sebu &"
" 'response.Write "expence_company : " & expence_company &"
" 'response.Write "expence_date : " & expence_date &"
" 'response.Write "d_cost_type : " & d_cost_type &"
" 'response.Write "cost_type : " & cost_type &"
" ' gap(i, 1) '프로젝트 명 ' gap(i, 2) '메모 ' gap(i, 5) '공급가액 ' gap(i, 6) '부가세액 ' gap(i, 7) '입금총액 ' gap(i, 9) '프로젝트 번호 ' gap(i, 10) '비고내용 query = " SELECT est_money, act_money " query = query & " FROM direct_cost " query = query & " WHERE del_yes_no = 'no' " query = query & " AND cost_type = '"& "support" &"' " query = query & " AND p_child_sn = '"& gap(i, 1) &"' " query = query & " AND hangmok = '"& hangmok&"' " query = query & " AND sebu = ( " query = query & " SELECT d_cost_name " query = query & " FROM direct_costcode " query = query & " WHERE id = '"& sebu &"' " query = query & " ) " rsm.Open query, adoConn, 1 tmp_money = gap(i, 5) If rsm.recordCount > 0 Then act_money = CDbl(Replace(rsm("act_money"), ",", "")) + CDbl(Replace(tmp_money, ",", "")) cha_money = CDbl(Replace(act_money, ",", "")) - CDbl(Replace(rsm("est_money"), ",", "")) rsm.close query = " UPDATE direct_cost " query = query & " SET act_money = '"& act_money &"' " query = query & " ,cha_money = '"& cha_money &"' " query = query & " WHERE del_yes_no = 'no' " query = query & " AND cost_type = '"& "support" &"' " query = query & " AND p_child_sn = '"& gap(i, 1) &"' " query = query & " AND hangmok = '"& hangmok&"' " query = query & " AND sebu = ( " query = query & " SELECT d_cost_name " query = query & " FROM direct_costcode " query = query & " WHERE id = '"& sebu &"' " query = query & " ) " 'Response.Write query & "
" adoconn.execute query Else act_money = CDbl(Replace(tmp_money, ",", "")) cha_money = 0 - CDbl(Replace(tmp_money, ",", "")) rsm.close query = " SELECT d_cost_name " query = query & " FROM direct_costcode " query = query & " WHERE id = '"& sebu & "' " rsm.Open query, adoConn, 1 tmp_sebu = rsm("d_cost_name") rsm.close Dim temp_project_subject temp_project_subject = "" Query = "SELECT * " Query = Query & "FROM V_PROJECT_METHOD " If Len(gap(i, 1)) < 11 Then Query = Query & "WHERE p_sn = '" & gap(i, 1) & "' " Else Query = Query & "WHERE p_child_sn = '" & gap(i, 1) & "' " End if rsm.open Query, adoconn,adopenstatic, adlockreadonly if rsm.recordcount > 0 then temp_project_subject = rsm("p_subject") end if rsm.close query = "insert into direct_cost (" query = query & " p_sn, krc_no, p_subject, hangmok, sebu, " query = query & " act_money, cha_money, " query = query & " modify_date, modify_time, modify_user, modify_user_code, modify_ip, write_count,p_subject_group, p_sn_group, cost_type, p_child_sn" query = query & " ) values (" query = query & "'" & Left(gap(i, 9), 7) & "', " query = query & "'" & krc_no & "', " query = query & "'" & temp_project_subject & "', " query = query & "'" & hangmok & "', " query = query & "'" & tmp_sebu & "', " query = query & "'" & act_money & "', " query = query & "'" & cha_money & "', " query = query & "'" & date() & "'," query = query & "'" & time() & "'," query = query & "'" & session("loginuser") & "', " query = query & "'" & session("user_number") & "', " query = query & "'" & Request.ServerVariables("REMOTE_HOST") & "', " query = query & "'" & 1 & "', " query = query & "'" & p_subject_group & "', " query = query & "'" & p_sn_group & "', '" & "support" & "', '" & gap(i, 9) & "')" adoconn.execute query End if Next End if if uploadform("doc_attach_file").count > 0 Then Set fso = Server.CreateObject("Scripting.FileSystemObject") for i=1 To uploadform("doc_attach_file").count if fso.FolderExists(Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no) = False Then fso.CreateFolder Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no End If fso.MoveFile Server.Mappath("/") & uploadform("doc_attach_file")(i), Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no & "/" & krc_no & "_" & Cstr(i) & ".jpg" Next Set fso = Nothing End If ''========================================================================================================================================================= elseif cint(print_type) = 0 Then elseif cint(print_type) = 1 then end if if( Request.ServerVariables("REMOTE_ADDR") = "10.10.13.79" or Request.ServerVariables("REMOTE_ADDR") = "10.10.13.115" or Request.ServerVariables("REMOTE_ADDR") = "::1")then response.write "
my_type = "& tmp_type response.write "
d_order_cnt = "& d_order_cnt response.write "
my_pos = "& my_pos response.write "
tmp_dcode = "& tmp_dcode(d_code, 1) response.write "
d_order4 = "& tmp_ess(tmp_dcode(d_code, 1), 0) response.write "
d_order5 = "& tmp_ess(0, 0) end if response.write my_pos %> <%=GNB_TITLE%> onLoad="clsit();" <% end if %>>
<% For i = 1 To contents_cnt %> <% Next %>
<%if cint(print_type) = 1 then%> <%end if%>
<%if approval_chk = "true" then%> <%else Response.Write "본부가 혼재된 프로젝트는 결재 상신이 안됩니다. 본부를 구분하세요" end if%>
<% if attach_d_no <> "" then %> <% end if %>
<%if title_type = "지출" then%> <%else%> <%end if%> <%if cdate(formatdatetime(date,2)) > "2014-01-07" then tmp_title = "대표이사" else tmp_title = "부회장" end if%> <% 'my_pos = "3" 'Response.Write "my_pos : " & my_pos & "
" tmp_txt = "

" & Session("loginuser") & "
" & replace(date(), "-","") & "
" & FormatDateTime(time,4) tmp_txt = Session("loginuser") & "
" & replace(date(), "-","") & "
" & Session("User_Number") if my_pos = 6 then '사장 tmp_txt1 = "전결" tmp_txt2 = "전결" tmp_txt3 = "전결" tmp_txt4 = "전결" tmp_txt5 = tmp_txt tmp_txt6 = "/" tmp_txt7 = "/" tmp_txt8 = "/" tmp_txt9 = "/" tmp_txt10 = 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 = month(now()) & " / " & day(now()) tmp_txt10 = "/" elseif my_pos = 3 or my_pos = 4 then '팀장(부서장) tmp_txt1 = "전결" tmp_txt2 = "전결" tmp_txt3 = tmp_txt tmp_txt4 = " " tmp_txt5 = " " tmp_txt6 = "/" tmp_txt7 = "/" tmp_txt8 = month(now()) & " / " & day(now()) tmp_txt9 = "/" tmp_txt10 = "/" elseif my_pos = 2 then '팀장(부서장) tmp_txt1 = tmp_txt tmp_txt2 = "전결" tmp_txt3 = " " tmp_txt4 = " " tmp_txt5 = " " tmp_txt6 = month(now()) & " / " & day(now()) tmp_txt7 = "/" tmp_txt8 = "/" tmp_txt9 = "/" tmp_txt10 = "/" elseif my_pos = 0 or my_pos = 1 then '팀원 tmp_txt1 = tmp_txt tmp_txt2 = "전결" tmp_txt3 = " " tmp_txt4 = " " tmp_txt5 = " " tmp_txt6 = month(now()) & " / " & day(now()) tmp_txt7 = "/" tmp_txt8 = "/" tmp_txt9 = "/" tmp_txt10 = "/" end if %>

기안/승인(소속부서) 검토/승인(관리부서)
본인 팀장 부서장 임원 <%=tmp_title%> 담당 부서장 임원 <%=tmp_title%>
<%=tmp_txt1%>  <%=tmp_txt2%>  <%=tmp_txt3%>  <%=tmp_txt4%>  <%=tmp_txt5%> 
<%=tmp_txt6%> <%=tmp_txt7%> <%=tmp_txt8%> <%=tmp_txt9%> <%=tmp_txt10%> / / / /
결 의 일 자 <%=Curr_date%>
성         명 <%=user_name(1)%>
소         속 <%=user_name(4)%>
직         급 <%=user_name(2)%>
하기의 프로젝트(업무)와 관련하여, <%=title_type%>을 결의하오니 승인하여 주시기 바랍니다.
<% if cint(print_type) = 1 then %> <% End If %>
비용항목 <%=hangmok_name%> 세부내용 <%=sebu_name%>
거래처 <%=expence_company%> 증빙일자 <%=expence_date%>
증빙서류 <%=expence_way%> 증빙번호 <%=expence_num%>
지급일자 <%=payment_date%>
증빙첨부
<% if uploadform("doc_attach")(1) <> "" Then %> <% set objImage = Server.CreateObject("DEXT.ImageProc") objImage.AutoMakeFolder = True For i=1 To uploadform("doc_attach").count if true = objImage.SetSourceFile(uploadform("doc_attach")(i).TempFilePath) then tmpFileName = "\Upload\DOC_ATTACH\tmp\" & date_time() & "_" & Session("User_Number") & "_" & Cstr(i) & ".jpg" thumb_image = objImage.SaveasThumbnail(Server.MapPath("/") & tmpFileName, objImage.ImageWidth, objImage.ImageHeight, false) %>
<% End If Next Set objImage = Nothing %> <% End If %>
<% Dim project_mapping_check project_mapping_check = True total_expence_money = 0 total_expence_vat = 0 total_expence_sum = 0 For i = 1 To contents_cnt %> <% Dim tmp_p_subject tmp_p_subject = "" Query = "SELECT * " Query = Query & "FROM V_PROJECT_METHOD " If CInt(left(gap(i, 1), 4)) < 1407 Then Query = Query & "WHERE p_sn = '" & gap(i, 1) & "' " Else If CInt(left(gap(i, 1), 4)) = 9999 Then Query = Query & "WHERE p_sn = '" & gap(i, 1) & "' " Else Query = Query & "WHERE p_child_sn = '" & gap(i, 1) & "' " End if End if adoRs.open Query, adoconn,adopenstatic, adlockreadonly if adoRs.recordcount > 0 then tmp_p_subject = adors("p_subject") Else If gap(i, 1) = "99999" Then tmp_p_subject = "운영 및 관리업무" End if end if adors.close If tmp_p_subject = "" Then tmp_p_subject = "프로젝트 코드 맵핑 오류" project_mapping_check = false End if %> <% total_expence_money = total_expence_money + CDbl(Replace(gap(i, 5), ",", "")) total_expence_vat = total_expence_vat + CDbl(Replace(gap(i, 6), ",", "")) total_expence_sum = total_expence_sum + CDbl(Replace(gap(i, 7), ",", "")) %> <% Next %>
프로젝트 공급가액 부가세액 지출총액 비고(내용, 수량, 단가)
<%=tmp_p_subject&" ("&gap(i, 1)&")"%> <%=gap(i, 5)%> <%=gap(i, 6)%> <%=gap(i, 7)%> <%=ViewWord(gap(i, 10))%>
합계 <%=FormatNumber(total_expence_money, 0)%> <%=FormatNumber(total_expence_vat, 0)%> <%=FormatNumber(total_expence_sum, 0)%>  
<% Query = "select * ,dbo.SPLIT(target21,'^//^',5) AS remark " Query = Query & "from 문서내용 " Query = Query & "where 문서제목 = '지출결의서' and del_yes_no = 'no' " Query = Query & "and target9 like '" & attach_d_no & "' " adoRs.open Query, adoconn,adopenstatic, adlockreadonly Dim approval_money, remark approval_money = "0" remark= "" if adoRs.recordcount > 0 then 'tmp_p_subject = adors("p_subject") %> <% For i = 1 To adoRs.recordcount approval_money = Replace(adoRs("target5"), ",", "") remark = ViewWord(adoRs("remark")) If Len(remark) > 20 Then remark = Left(remark, 20) & "..." End if %> <% adors.moveNext next end if adors.close %>
품의문서 <%=attach_d_no%> [ 품의문서 금액 : <%=FormatNumber(pre_Approval_money, 0)%>원 ], [ 남은금액 : <% If CDbl(before_Approval_money) < 0 Then %> <%=FormatNumber(before_Approval_money, 0)%> <% Else %> <%=FormatNumber(before_Approval_money, 0)%> <% End If %> 원 ]
품의서를 이용한 지출결의서 사용 내역
문서제목 문서번호 지출금액(VAT별도) 증빙일/작성자 비고(내용, 수량, 단가)
<%=adoRs("문서제목")%> <%=adoRs("문서번호")%> <%=FormatNumber(approval_money, 0)%> <%=adoRs("target3")%> / <%=adoRs("login_이름")%> <%=remark%>
	영 수 일 자 :                  년      월      일
	영   수   자 :                                   (印)
<% set uploadform = nothing %>