%
dim Query
dim i,j
dim user_name(4) '현재 사용자,0:사원코드, 1:이름,2:직급,3:전화번호, 4:부서코드(명)
dim Curr_date '오늘날짜
dim Company(6)
dim Gap()
dim Max_length '입력가능 줄수정의
dim print_type '1:보기, 2:진짜프린트
dim depart_cost_type
dim depart_gubun
dim y_m
dim cost_type(2) ''지출방법 구분
cost_type(1) = "개인법인카드"
cost_type(2) = "현금/개인카드"
print_type = request("print_type")
depart_cost_type = request("depart_div")
depart_gubun = "팀"
if depart_cost_type = "2" then
depart_gubun = "장"
end if
y_m = request("y_m")
if y_m = "" then
y_m = LEFT(date, 7)
end if
Curr_date = year(date) & "년 " & zeroformat(month(date),2) & "월 " & zeroformat(day(date),2) & "일"
Query = ""
Query = Query & " SELECT VGC.cost_date, VGC.p_no, VGC.txt_pjt, ISNULL(TPM.p_subject, '일반업무') AS p_subject, VGC.txt_hangmok, VGC.contents, VGC.cost, M.target97, M.target99 "
Query = Query & " FROM V_GROUP_COST_NEW VGC LEFT JOIN T_PROJECT_METHOD TPM ON VGC.txt_pjt = TPM.p_child_sn "
Query = Query & " LEFT JOIN 문서내용 M ON VGC.d_no = M.문서번호 "
Query = Query & " WHERE VGC.p_no = '" & session("User_Number") & "' "
Query = Query & " AND CONVERT(VARCHAR(7), VGC.cost_date) = '" & y_m & "' "
Query = Query & " ORDER BY VGC.cost_date "
'response.Write query
rsc.Open query, adoConn, 1
tmp_0 = split(rsc("target97"), "^^")
user_name(0) = rsc("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_7 = split(rsc("target99"), "^^")
if trim(tmp_7(0)) <> "전결" and trim(tmp_7(0)) <> "" then
tmp_t1 = split(tmp_7(0), "
")
tmp_txt1 = "
"
else
tmp_txt1 = trim(tmp_7(0))
end if
if trim(tmp_7(1)) <> "전결" and trim(tmp_7(1)) <> "" then
tmp_t2 = split(tmp_7(1), "
")
tmp_txt2 = "
"
else
tmp_txt2 = trim(tmp_7(1))
end if
if trim(tmp_7(2)) <> "전결" and trim(tmp_7(2)) <> "" then
tmp_t3 = split(tmp_7(2), "
")
tmp_txt3 = "
"
else
tmp_txt3 = trim(tmp_7(2))
end if
if trim(tmp_7(3)) <> "전결" and trim(tmp_7(3)) <> "" then
tmp_t4 = split(tmp_7(3), "
")
tmp_txt4 = "
"
else
tmp_txt4 = trim(tmp_7(3))
end if
if trim(tmp_7(4)) <> "전결" and trim(tmp_7(4)) <> "" then
tmp_t5 = split(tmp_7(4), "
")
tmp_txt5 = "
"
else
tmp_txt5 = trim(tmp_7(4))
end if
%>