1109 lines
45 KiB
Plaintext
1109 lines
45 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
||
<OBJECT RUNAT=Server PROGID=ADODB.Recordset id=rsp></OBJECT>
|
||
<%
|
||
''//=====================
|
||
''//=====================
|
||
''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") &"<BR>"
|
||
|
||
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") &"<BR>"
|
||
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) &"<BR>"
|
||
' response.Write "gap(i, 2) : " & gap(i, 2) &"<BR>"
|
||
' response.Write "gap(i, 3) : " & gap(i, 3) &"<BR>"
|
||
' response.Write "gap(i, 4) : " & gap(i, 4) &"<BR>"
|
||
' response.Write "gap(i, 5) : " & gap(i, 5) &"<BR>"
|
||
' response.Write "gap(i, 6) : " & gap(i, 6) &"<BR>"
|
||
' response.Write "gap(i, 7) : " & gap(i, 7) &"<BR>"
|
||
' response.Write "gap(i, 8) : " & gap(i, 8) &"<BR>"
|
||
' response.Write "gap(i, 9) : " & gap(i, 9) &"<BR>"
|
||
' response.Write "gap(i, 10) : " & gap(i, 10) &"<BR>"
|
||
' response.Write "target21(i) : " & target21(i) &"<BR>"
|
||
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") '회사
|
||
|
||
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 & "<BR>"
|
||
'Response.Write "sebu : " & sebu & "<BR>"
|
||
'Response.Write "expence_company : " & expence_company & "<BR>"
|
||
'Response.Write "expence_date : " & expence_date & "<BR>"
|
||
'Response.Write "expence_way : " & expence_way & "<BR>"
|
||
'Response.Write "attach_d_no : " & attach_d_no & "<BR>"
|
||
'Response.Write "d_cost_type : " & d_cost_type & "<BR>"
|
||
'Response.Write "cost_type : " & cost_type & "<BR>"
|
||
|
||
|
||
'd_cost_type = uploadform("d_cost_type") '실사or연구
|
||
|
||
'Response.Write "p_sub_type : " & p_sub_type & "<BR>"
|
||
'Response.Write "est : " & est & "<BR>"
|
||
|
||
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 & "<br>"
|
||
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 & "<br>"
|
||
|
||
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) & "<br>"
|
||
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 & "<br>"
|
||
|
||
'먼저 지 출 결 의 서의 문서번호 생성
|
||
''///===============
|
||
''문서번호 정보
|
||
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) & "<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" -->
|
||
<%
|
||
if( Request.ServerVariables("REMOTE_ADDR") = "10.10.13.79" or Request.ServerVariables("REMOTE_ADDR") = "10.10.13.115" )then
|
||
response.write "<br> d_orders = "& d_orders
|
||
response.write "<br> d_order_cnt = "& d_order_cnt
|
||
response.write "<br> my_pos = "& my_pos
|
||
response.write "<br> tmp_dcode = "& tmp_dcode(d_code, 1)
|
||
response.write "<br> d_order4 = "& tmp_ess(tmp_dcode(d_code, 1), 0)
|
||
response.write "<br> 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) 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') "
|
||
'Response.Write query & "<br>"
|
||
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 & "<BR>"
|
||
'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) &"<BR>"
|
||
'response.Write "gap("&i&", 2) : " & gap(i, 2) &"<BR>"
|
||
'response.Write "gap("&i&", 5) : " & gap(i, 5) &"<BR>"
|
||
'response.Write "gap("&i&", 6) : " & gap(i, 6) &"<BR>"
|
||
'response.Write "gap("&i&", 7) : " & gap(i, 7) &"<BR>"
|
||
'response.Write "gap("&i&", 9) : " & gap(i, 9) &"<BR>"
|
||
'response.Write "gap("&i&", 10) : " & gap(i, 10) &"<BR>"
|
||
|
||
'response.Write "hangmok : " & hangmok &"<BR>"
|
||
'response.Write "sebu : " & sebu &"<BR>"
|
||
'response.Write "expence_company : " & expence_company &"<BR>"
|
||
'response.Write "expence_date : " & expence_date &"<BR>"
|
||
|
||
'response.Write "d_cost_type : " & d_cost_type &"<BR>"
|
||
'response.Write "cost_type : " & cost_type &"<BR>"
|
||
|
||
' 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 & "<BR>"
|
||
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 "<br> my_type = "& tmp_type
|
||
response.write "<br> d_order_cnt = "& d_order_cnt
|
||
response.write "<br> my_pos = "& my_pos
|
||
response.write "<br> tmp_dcode = "& tmp_dcode(d_code, 1)
|
||
response.write "<br> d_order4 = "& tmp_ess(tmp_dcode(d_code, 1), 0)
|
||
response.write "<br> d_order5 = "& tmp_ess(0, 0)
|
||
end if
|
||
response.write my_pos
|
||
%>
|
||
|
||
<html>
|
||
<head>
|
||
<title><%=GNB_TITLE%></title>
|
||
<link rel="stylesheet" type="text/css" href="/css/basic.css">
|
||
<style>
|
||
.attach_div{
|
||
display: flex;
|
||
width: 100%;
|
||
}
|
||
.attach_preview{
|
||
display: flex;
|
||
width: 15%;
|
||
height: 70px;
|
||
border: 1px solid #ccc;
|
||
box-shadow: 1px 1px 2px 1px #b9b9b9;
|
||
justify-content: center;
|
||
align-items: center;
|
||
cursor: pointer;
|
||
margin: 4px;
|
||
}
|
||
.attach_preview > img{
|
||
max-width: 100%;
|
||
max-height: 100%;
|
||
}
|
||
</style>
|
||
</head>
|
||
|
||
|
||
<script src="/js/jquery.min.js"></script>
|
||
<script src="/js/jquery-ajax-call.js"></script>
|
||
<script src="/js/jquery.form.min.js"></script>
|
||
|
||
<script language=javascript>
|
||
function win_close()
|
||
{
|
||
window.close();
|
||
}
|
||
|
||
function subit()
|
||
{
|
||
$("#subit_btn").css("display", "none");
|
||
if(!confirm("결재 요청하시겠습니까?")){
|
||
$("#subit_btn").css("display", "");
|
||
return;
|
||
}
|
||
var expence_date = document.frm_money.expence_date.value;
|
||
var expence_way = document.frm_money.expence_way.value;
|
||
var expence_company = document.frm_money.expence_company.value;
|
||
|
||
var title_type = document.frm_money.title_type.value;
|
||
var hangmok = document.frm_money.hangmok.value;
|
||
var sebu = document.frm_money.sebu.value;
|
||
|
||
<%
|
||
if tmp_admin_chk = "1" then
|
||
%>
|
||
var txt_d_no = document.frm_money.txt_d_no.value;
|
||
<%
|
||
end if
|
||
%>
|
||
var url = "doc_expense2_print_2014.asp"
|
||
url = url + "?hangmok=" + hangmok;
|
||
url = url + "&sebu=" + sebu;
|
||
|
||
url = url + "&expence_date=" + expence_date;
|
||
url = url + "&expence_way=" + expence_way;
|
||
|
||
url = url + "&expence_company=" + expence_company;
|
||
url = url + "&print_type=2";
|
||
url = url + "&title_type=" + title_type;
|
||
|
||
<%
|
||
if tmp_admin_chk = "1" then
|
||
%>
|
||
url = url + "&txt_d_no=" + txt_d_no;
|
||
<%
|
||
end if
|
||
%>
|
||
document.frm_money.action=url;
|
||
|
||
var project_mapping_check = document.frm_money.project_mapping_check.value;
|
||
if(project_mapping_check == "True"){
|
||
document.frm_money.submit();
|
||
}else{
|
||
alert("프로젝트 코드 맵핑 오류 건이 존재 합니다.\n입력 정보를 다시 확인 하십시오.");
|
||
}
|
||
}
|
||
|
||
|
||
function clsit()
|
||
{
|
||
alert('결재요청 되었습니다');
|
||
opener.location.href="doc_list.asp?title=신규 지출결의서";
|
||
self.close();
|
||
}
|
||
|
||
//-->
|
||
|
||
</script>
|
||
<body topmargin="10" leftmargin="10" <%if cint(print_type) = 2 then%> onLoad="clsit();" <% end if %>>
|
||
<form method='post' name='frm_money' enctype='multipart/form-data'>
|
||
<input type=hidden name = "p_subject" value="">
|
||
<input type=hidden name = "txt_d_no" value="<%=attach_d_no%>">
|
||
|
||
<input type=hidden name = "hangmok" value="<%=hangmok%>">
|
||
<input type=hidden name = "sebu" value="<%=sebu%>">
|
||
<input type=hidden name = "expence_company" value="<%=expence_company%>">
|
||
<input type=hidden name = "expence_date" value="<%=expence_date%>">
|
||
<input type=hidden name = "expence_way" value="<%=expence_way%>">
|
||
|
||
<input type=hidden name = "expence_num" value="<%=expence_num%>">
|
||
<input type=hidden name = "expence_company_num" value="<%=expence_company_num%>">
|
||
<input type=hidden name = "expence_taxtype" value="<%=expence_taxtype%>">
|
||
<input type=hidden name = "expence_item" value="<%=expence_item%>">
|
||
|
||
<input type=hidden name = "k_company" value="<%=k_company%>">
|
||
|
||
<input type=hidden name = "contents_cnt" value="<%=contents_cnt%>">
|
||
<input type=hidden name = "cost_type" value="<%=cost_type%>">
|
||
|
||
<input type=hidden name = "title_type" value='<%=title_type%>'>
|
||
|
||
<input type=hidden name = "print_type" value='2'>
|
||
|
||
<% For i = 1 To contents_cnt %>
|
||
<input type="hidden" name="p_sn" value="<%=gap(i, 1)%>">
|
||
<input type="hidden" name="expence_money" value="<%=gap(i, 5)%>">
|
||
<input type="hidden" name="expence_vat" value="<%=gap(i, 6)%>">
|
||
<input type="hidden" name="expence_sum" value="<%=gap(i, 7)%>">
|
||
<input type="hidden" name="expence_reason" value="<%=gap(i, 10)%>">
|
||
<% Next %>
|
||
|
||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||
<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;">
|
||
<%if approval_chk = "true" then%>
|
||
<img src="/images/common/btn_approve.jpg" onClick="subit()" id="subit_btn" style="CURSOR:pointer;" title='결재신청'>
|
||
<%else
|
||
Response.Write "<font color='red' size=4><b>본부가 혼재된 프로젝트는 결재 상신이 안됩니다. 본부를 구분하세요</b></font>"
|
||
end if%>
|
||
<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="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 title_type = "지출" then%>
|
||
<img src="/images/approval/doc_stit08.jpg">
|
||
<%else%>
|
||
<img src="/images/approval/doc_stit24.jpg">
|
||
<%end if%>
|
||
</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>
|
||
<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"><%=tmp_title%></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"><%=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_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
|
||
%>
|
||
<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%>">
|
||
<tr height="35">
|
||
<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>
|
||
<tr height="18">
|
||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt6%></td>
|
||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt7%></td>
|
||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt8%></td>
|
||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt9%></td>
|
||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt10%></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>
|
||
<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 10 0;font-size:14;font-family:dotum;"><b>하기의 프로젝트(업무)와 관련하여, <%=title_type%>을 결의하오니 승인하여 주시기 바랍니다.</b></td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" align="center" style="padding:10 0 0 0">
|
||
<table width="100%" cellpadding="5" cellspacing="0" border="0" style="border-collapse:collapse;">
|
||
<tr>
|
||
<td width="20%" class="tit2" align="center">비용항목</td>
|
||
<td width="35%" class="tit7" align="center"><font class="tahoma"><%=hangmok_name%></font></td>
|
||
<td width="15%" class="tit2" align="center">세부내용</td>
|
||
<td width="30%" class="tit7" align="center"><font class="tahoma"><%=sebu_name%></font></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="20%" class="tit2" align="center">거래처</td>
|
||
<td width="35%" class="tit7" align="center"><font class="tahoma"><%=expence_company%></font></td>
|
||
<td width="15%" class="tit2" align="center">증빙일자</td>
|
||
<td width="30%" class="tit7" align="center"><font class="tahoma"><%=expence_date%></font></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="20%" class="tit2" align="center">증빙서류</td>
|
||
<td width="35%" class="tit7" align="center"><font class="tahoma"><%=expence_way%></font></td>
|
||
<td width="15%" class="tit2" align="center">증빙번호</td>
|
||
<td width="30%" class="tit7" align="center"><font class="tahoma"><a href='javascript:taxInvoiceView();'><%=expence_num%></a></font></td>
|
||
</tr>
|
||
<% if cint(print_type) = 1 then %>
|
||
<tr>
|
||
<td class="tit2" align="center">증빙첨부</td>
|
||
<td colspan="3" class="tit7">
|
||
<div class="attach_div">
|
||
<% 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)
|
||
%>
|
||
<input type="hidden" name="doc_attach_file" value="<%=tmpFileName%>" />
|
||
<div class="attach_preview">
|
||
<img src="<%=tmpFileName%>" />
|
||
</div>
|
||
<%
|
||
End If
|
||
Next
|
||
Set objImage = Nothing
|
||
%>
|
||
<% End If %>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<% End If %>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2" align="center" style="padding:10 0 0 0">
|
||
<table width="100%" cellpadding="5" cellspacing="0" border="0" style="border-collapse:collapse;">
|
||
<tr>
|
||
<td width="27%" class="tit2" align="center">프로젝트</td>
|
||
<td width="11%" class="tit2" align="center">공급가액</td>
|
||
<td width="11%" class="tit2" align="center">부가세액</td>
|
||
<td width="11%" class="tit2" align="center">지출총액</td>
|
||
<td width="40%" class="tit2" align="center">비고(내용, 수량, 단가)</td>
|
||
</tr>
|
||
|
||
<%
|
||
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
|
||
%>
|
||
<tr>
|
||
<%
|
||
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 = "<font color='red'>프로젝트 코드 맵핑 오류</font>"
|
||
project_mapping_check = false
|
||
End if
|
||
%>
|
||
<td class="tit7" align="center"><font class="tahoma"><%=tmp_p_subject&" ("&gap(i, 1)&")"%></font></td>
|
||
<td class="tit7" align="right"><font class="tahoma"><%=gap(i, 5)%></font></td>
|
||
<td class="tit7" align="right"><font class="tahoma"><%=gap(i, 6)%></font></td>
|
||
<td class="tit7" align="right"><font class="tahoma"><%=gap(i, 7)%></font></td>
|
||
<td class="tit7" align="left"><font class="tahoma"><%=ViewWord(gap(i, 10))%></td>
|
||
<%
|
||
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), ",", ""))
|
||
%>
|
||
</tr>
|
||
<%
|
||
Next
|
||
%>
|
||
|
||
<tr>
|
||
<td align="center" class="tit7"><font class="tahoma">합계</font></td>
|
||
<td align="right" class="tit7"><font class="tahoma"><%=FormatNumber(total_expence_money, 0)%></font></td>
|
||
<td align="right" class="tit7"><font class="tahoma"><%=FormatNumber(total_expence_vat, 0)%></font></td>
|
||
<td align="right" class="tit7"><font class="tahoma"><%=FormatNumber(total_expence_sum, 0)%></font></td>
|
||
<td style="text-align: right;" class="tit7"> </td>
|
||
|
||
<input type="hidden" name="total_expence_money" value="<%=total_expence_money%>">
|
||
<input type="hidden" name="total_expence_vat" value="<%=total_expence_vat%>">
|
||
<input type="hidden" name="total_expence_sum" value="<%=total_expence_sum%>">
|
||
</tr>
|
||
</table>
|
||
<input type="hidden" name="project_mapping_check" value="<%=project_mapping_check%>">
|
||
</td>
|
||
</tr>
|
||
|
||
<%
|
||
if attach_d_no <> "" then
|
||
%>
|
||
<tr>
|
||
<td colspan="2" align="center" style="padding:20 0 0 0">
|
||
<table width="100%" cellpadding="5" cellspacing="0" border="0" style="border-collapse:collapse;">
|
||
<tr>
|
||
<td width="15%" class="tit2" align="center">품의문서</td>
|
||
<td width="85%" class="tit7" colspan="4">
|
||
<font class="tahoma"><%=attach_d_no%> [ 품의문서 금액 : <%=FormatNumber(pre_Approval_money, 0)%>원 ], [ 남은금액 :
|
||
<% If CDbl(before_Approval_money) < 0 Then %>
|
||
<font color="red"> <%=FormatNumber(before_Approval_money, 0)%> </font>
|
||
<% Else %>
|
||
<%=FormatNumber(before_Approval_money, 0)%>
|
||
<% End If %>
|
||
원 ]</font>
|
||
</td>
|
||
</tr>
|
||
<%
|
||
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")
|
||
%>
|
||
<tr>
|
||
<td width="100%" align="center" colspan="5">
|
||
<font class="tahoma">품의서를 이용한 지출결의서 사용 내역</font>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%" class="tit2" align="center">문서제목</td>
|
||
<td width="17%" class="tit2" align="center">문서번호</td>
|
||
<td width="17%" class="tit2" align="center">지출금액(VAT별도)</td>
|
||
<td width="17%" class="tit2" align="center">증빙일/작성자</td>
|
||
<td width="34%" class="tit2" align="center">비고(내용, 수량, 단가)</td>
|
||
</tr>
|
||
<%
|
||
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
|
||
%>
|
||
<tr>
|
||
<td class="tit7" align="center"><font class="tahoma"><%=adoRs("문서제목")%></font></td>
|
||
<td class="tit7" align="center"><font class="tahoma"><%=adoRs("문서번호")%></font></td>
|
||
<td class="tit7" align="right"><font class="tahoma"><%=FormatNumber(approval_money, 0)%></font></td>
|
||
<td class="tit7" align="center"><font class="tahoma"><%=adoRs("target3")%> / <%=adoRs("login_이름")%></font></td>
|
||
<td class="tit7"><font class="tahoma"><%=remark%></font></td>
|
||
</tr>
|
||
<%
|
||
adors.moveNext
|
||
next
|
||
end if
|
||
adors.close
|
||
%>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<%
|
||
end if
|
||
%>
|
||
|
||
<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>
|
||
|
||
<script>
|
||
var ntsUrl = "";
|
||
var ntsNum = "<%=expence_num%>";
|
||
$(document).ready(function (){
|
||
var d_cost_type = "<%=d_cost_type%>";
|
||
if(d_cost_type == "support"){
|
||
$(".expenseTotal").css("display", "none");
|
||
}
|
||
$(document).on("click", ".attach_preview", function(){
|
||
window.open($(this).children("img").attr("src"), "_blank", "popup=1");
|
||
})
|
||
|
||
taxInvoicePopup();
|
||
});
|
||
|
||
function taxInvoicePopup(){
|
||
if(ntsNum != ""){
|
||
ajaxCallJson("/barobill/baro_api.asp", {"command":"GetTaxInvoicePopUpURLNK", "NTSConfirmNum":ntsNum, "Company":"kri"}, "", "POST", "taxInvoiceUrl()");
|
||
ajaxCallJson("/barobill/baro_api.asp", {"command":"GetTaxInvoicePopUpURLNK", "NTSConfirmNum":ntsNum, "Company":"krc"}, "", "POST", "taxInvoiceUrl()");
|
||
ajaxCallJson("/barobill/baro_api.asp", {"command":"GetTaxInvoicePopUpURLNK", "NTSConfirmNum":ntsNum, "Company":"krd"}, "", "POST", "taxInvoiceUrl()");
|
||
}
|
||
}
|
||
function taxInvoiceUrl(){
|
||
if(ajaxResponse != "-21002"){
|
||
ntsUrl = ajaxResponse;
|
||
<% if print_type = "1" Then %>
|
||
createTaxImage();
|
||
<% End If %>
|
||
}
|
||
}
|
||
function taxInvoiceView(){
|
||
if(ntsUrl != ""){
|
||
window.open(ntsUrl, "", "left=150, top=150, menubar=no, location=no, status=no, toolbar=no, width=960, height=800, scrollbars=yes ,resizable=no");
|
||
}else{
|
||
alert("전자세금계산서 번호가 아닙니다.\n종이세금계산서인 경우에는 첨부한 이미지를 확인하시기 바랍니다.");
|
||
}
|
||
}
|
||
|
||
function createTaxImage(){
|
||
$("body").append("<iframe id='taxIframe' style='visibility:hidden;width: 0;height: 0;' src=''></iframe>");
|
||
$("#taxIframe").attr("src", "/barobill/convImg/createTaxImg.asp"+"?ntsurl="+encodeURIComponent(ntsUrl)+"&ntsnum="+ntsNum);
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|
||
|
||
<%
|
||
set uploadform = nothing
|
||
%> |