<%
Response.Expires = 0
'url로 넘어오는 변수값 처리
chk_opt = request("chk_opt")
sc_year = request("sc_year")
sc_month = request("sc_month")
sc_team = request("sc_team")
sc_name = request("sc_name")
sc_method = request("sc_method")
cost_type = request("cost_type")
p_method_cd = trim(request("p_method_cd"))
p_child_sn = request("p_sn")
p_sub_type = request("p_sub_type")
if p_sub_type = "" then
p_sub_type = "C"
end if
if Instr(p_child_sn,"@") > 0 then
list_p_sn = split(p_child_sn,"@")
p_child_sn = list_p_sn(0)
p_sub_type = list_p_sn(1)
end if
if Instr(p_method_cd,"@") > 0 then
list_p_sn = split(p_method_cd,"@")
p_method_cd = list_p_sn(0)
p_child_sn = list_p_sn(1)
end if
if cost_type = "" then
cost_type = "field"
end if
if cost_type = "field" then
cost_type_name = "실사"
elseif cost_type = "research" then
cost_type_name = "연구"
elseif cost_type = "dp" then
cost_type_name = "DP" '##### DP팀의 코딩 Part 직접비 입력 (2018-02-27 김종휘)
else
cost_type_name = "버그....."
end if
sql = "select * from person where p_no = '" & Session("user_number") & "'"
Rs.open sql, adoconn, adopenstatic, adlockreadonly
user_depart = rs("p_depart")
user_team = rs("p_team")
Rs.close
p_sn = trim(request("p_sn"))
p_sn = left(p_sn,7)
query = " SELECT p_sn, p_child_sn, TPM.p_method_cd, TPM.p_progress_status, TPMC.p_method_nm, p_subject, p_sub_type, TPMC.p_method_cd, TPM.p_field_dept, TPM.p_is_dept "
query = query & " FROM T_PROJECT_METHOD TPM LEFT OUTER JOIN T_PROJECT_METHOD_CD TPMC ON TPM.p_method_cd = TPMC.p_method_cd "
if p_sub_type = "C" then
query = query & " WHERE p_child_sn = '"& p_child_sn &"' "
elseif p_sub_type = "M" then
query = query & " WHERE p_sn = '"& p_sn &"' "
end if
adors.Open query, adoConn, 1
if cost_type = "research" then
p_method_cd = adors("p_method_cd")
end if
if cost_type = "field" then
p_field_dept = adors("p_field_dept")
end if
if cost_type = "dp" then
p_is_dept = adors("p_is_dept") '##### dp팀(코딩) 2017-02-27 김종휘
end if
adors.Close
if p_sub_type = "M" then
query = " SELECT p_sn "
query = query & " , p_subject "
query = query & " , TCCD_E.c_code_name as p_export_range "
query = query & " , p_cont_cost "
query = query & " FROM T_PROJECT_BASE TPB "
query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E ON TCCD_E.c_kind_code = '011' AND TPB.p_export_range = TCCD_E.c_common_code"
query = query & " WHERE p_sn = '"& p_sn &"'"
'Response.Write query & "
" elseif p_sub_type = "C" then query = " SELECT p_sn " query = query & " , p_subject " query = query & " , TCCD_E.c_code_name as p_export_range " query = query & " , p_cont_cost " query = query & " FROM T_PROJECT_METHOD TPM " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E ON TCCD_E.c_kind_code = '011' AND TPM.p_export_range = TCCD_E.c_common_code" query = query & " WHERE p_child_sn = '"& p_child_sn &"'" 'Response.Write query & "
" end if AdoRs.Open query,adoconn, 1 p_sn = adors("p_sn") p_subject = adors.fields("p_subject") p_export_range = adors("p_export_range") p_cont_cost = adors("p_cont_cost") adors.Close '기본정보 초기값 셋팅 query = " SELECT p_method_cd, TPM.p_sn, p_child_sn, p_sub_type, TCCD_A.c_code_name as p_sur_area, TCCD_T.c_code_name as p_sur_target, TPM.p_sample, p_research_date_st, p_research_date_end, " query = query & " TCCD_P.c_code_name as p_sur_part, TCCD_F.c_code_name as p_field_process, TPM.p_cont_cost, ISNULL(TCCD_E1.c_code_name,TCCD_E2.c_code_name) as p_export_range " query = query & " FROM T_PROJECT_METHOD TPM " query = query & " LEFT OUTER JOIN T_PROJECT_BASE TPB ON TPM.p_sn = TPB.p_sn " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E1 ON TCCD_E1.c_kind_code = '011' AND TPM.p_export_range = TCCD_E1.c_common_code " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E2 ON TCCD_E2.c_kind_code = '011' AND TPB.p_export_range = TCCD_E2.c_common_code " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_A ON TCCD_A.c_kind_code = '012' AND TPM.p_sur_area = TCCD_A.c_common_code " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_T ON TCCD_T.c_kind_code = '013' AND TPM.p_sur_target = TCCD_T.c_common_code " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_P ON TCCD_P.c_kind_code = '014' AND TPM.p_sur_part = TCCD_P.c_common_code " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_F ON TCCD_F.c_kind_code = '015' AND TPM.p_field_process = TCCD_F.c_common_code " 'if p_sub_type = "C" then if len(p_child_sn) > 7 then query = query & " WHERE TPM.p_child_sn = '"& p_child_sn &"' " elseif p_sub_type = "M" then query = query & " WHERE TPM.p_sn = '"& p_sn &"' " end if if p_method_cd <> "" then query = query & " AND TPM.p_method_cd = '"&p_method_cd&"' " end if 'Response.Write query &"
" rs.Open query,adoconn, 1 if rs.recordCount > 0 then p_sur_area = rs("p_sur_area") p_sur_target = rs("p_sur_target") If IsNull(rs("p_sample")) Then p_sample = 0 Else p_sample = Cdbl(rs("p_sample")) End if p_research_date_st = rs("p_research_date_st") p_research_date_end = rs("p_research_date_end") p_sur_part = rs("p_sur_part") p_field_process = rs("p_field_process") p_child_sn = rs("p_child_sn") p_sub_type = rs("p_sub_type") if p_sub_type = "C" Then If IsNull(rs("p_cont_cost")) Then p_cont_cost = 0 Else p_cont_cost = rs("p_cont_cost") End if end if p_export_range = rs("p_export_range") else p_sur_area = "" p_sur_target = "" p_sample = 1 est_sum = 0 p_research_date_st = "" p_research_date_end = "" p_sur_part = "" p_field_process = "" p_export_range = "" end if rs.close p_input_complete = "no" field_sub_complete = "" query = " SELECT tpm.p_sn, tpm.p_child_sn, p_sub_type, p_input_complete " if cost_type = "field" then query = query & " , d_order_cnt, isnull(sv_prog, '') as sv_prog, isnull(qc_prog, '') as qc_prog " end if query = query & " FROM T_PROJECT_METHOD tpm " if cost_type = "field" then query = query & " left outer join 문서내용 a on tpm.p_child_sn = cast(a.target1 as varchar(20)) and cast(a.target2 as varchar(20)) = 'field' and 문서제목 = '프로젝트수행계획서' and del_yes_no = 'no' " if p_field_dept <> "8" then query = query & " and cast(a.target3 as varchar(20)) = 'SV' " else query = query & " and cast(a.target3 as varchar(20)) = 'QC' " end if query = query & " left outer join Document d on a.문서번호 = d.d_no and d_delok = 'N' " query = query & " left join direct_cost_field DCF ON tpm.p_child_sn = DCF.p_child_sn AND DCF.del_yn = 'n' " end if query = query & " WHERE tpm.p_child_sn = '"& p_child_sn &"' " if not(p_sub_type = "M" AND cost_type = "research") AND (p_method_cd <> "" or isnull(p_method_cd)) then query = query & " AND p_method_cd = '"& p_method_cd &"' " end if adors.Open query, adoconn, 1 if adors.recordCount > 0 then if cost_type = "research" then do while not adors.EOF if mid(adors("p_input_complete"), 1, 1) = "o" then p_input_complete = "yes" end if adors.movenext loop elseif cost_type = "field" then if mid(adors("p_input_complete"), 2, 1) = "o" or adors("d_order_cnt") <> "99" then p_input_complete = "yes" Else if adors("sv_prog") = "complete" then field_sub_complete = "SV" End If if adors("qc_prog") = "complete" then if field_sub_complete <> "" Then field_sub_complete = field_sub_complete & ", " End If field_sub_complete = field_sub_complete & "QC" End If if p_field_dept = "8" then if user_team = "8" then if adors("qc_prog") = "complete" then p_input_complete = "yes" End If End if Else if user_team = "8" then if adors("qc_prog") = "complete" then p_input_complete = "yes" End If Elseif session("p_teamplace") = "0" Then if adors("sv_prog") = "complete" then p_input_complete = "yes" End If End if End If End if end if end if adors.close query = " SELECT dc1.d_cost_name, dc2.id, dc2.d_cost_name, "&VbCrlf query = query & " dc.id, dc.p_sn, dc.krc_no, dc.p_subject, dc.p_type_code, dc.hangmok, isnull(dc.sebu, '') as sebu, "&VbCrlf query = query & " isnull(dc.est_danga,'') as est_danga, isnull(dc.est_bu_or_cnt,'') as est_bu_or_cnt, isnull(dc.est_dosu_or_time,'') as est_dosu_or_time, isnull(dc.est_money,'') as est_money, "&VbCrlf query = query & " isnull(dc.act_danga,'') as act_danga, isnull(dc.act_bu_or_cnt,'') as act_bu_or_cnt, isnull(dc.act_dosu_or_time,'') as act_dosu_or_time, isnull(dc.act_money,'') as act_money, isnull(dc.cha_money,'') as cha_money, "&VbCrlf query = query & " dc.memo, dc.confirm_yn, dc.modify_date, dc.modify_time, dc.modify_user, dc.modify_user_code, dc.modify_ip, dc.write_count, "&VbCrlf query = query & " dc.del_yes_no, dc.del_date, dc.del_time,dc.del_user, dc.del_user_code, dc.del_ip, dc.p_subject_group, dc.p_sn_group, dc.cost_type, dc.p_child_sn "&VbCrlf query = query & " FROM "&VbCrlf query = query & " direct_costcode dc1 INNER JOIN direct_costcode dc2 "&VbCrlf query = query & " ON dc1.d_cost_parents = dc2.d_cost_code AND dc1.d_cost_kind = dc2.d_cost_kind "&VbCrlf query = query & " left outer join direct_cost dc on dc2.id = dc.hangmok and dc1.d_cost_name = dc.sebu "&VbCrlf query = query & " and dc.p_sn = '" & p_sn & "' "&VbCrlf query = query & " AND dc.del_yes_no = 'no' "&VbCrlf query = query & " AND dc.cost_type = '" & cost_type & "' "&VbCrlf if LEN(p_child_sn) > 8 then query = query & " AND dc.p_child_sn = '" & p_child_sn & "' "&VbCrlf end if query = query & " AND dc.hangmok NOT IN ('메모', '메모_경영지원실') "&VbCrlf query = query & " WHERE dc1.d_cost_parents != '0' "&VbCrlf query = query & " AND dc1.d_cost_kind = '" & cost_type & "' "&VbCrlf query = query & " AND dc2.d_cost_parents = '0' "&VbCrlf query = query & " and dc2.d_cost_useyn = 'Y' "&VbCrlf query = query & " and dc1.d_cost_useyn = 'Y' "&VbCrlf query = query & " ORDER BY CONVERT(INT,dc2.attribute01), CONVERT(INT,dc1.attribute01) "&VbCrlf 'response.Write query adors.Open query, adoconn, 1'adOpenStatic,adLockReadOnly '총 줄수를 저장 line_total = adors.recordcount redim pay_Array_new(line_total, 14) 'x:순서, y:1:항목, 2:세부내용, 3:예상의 원, 4:예상의 부/명, 5:예상의 도수/시간, 6:예상의 금액,7:실제의 원, 8:실제의 부/명, 9:실제의 도수/시간, 10:실제의 금액,11:실제금액-예상금액의 차이 '0:메모, 13:경영지원실 전용 메모 '각 컬럼의 초기값 설정 for i=1 to line_total for j=1 to 13 pay_Array_new(i,j) = "" next next i = -1 do while not adors.EOF txt_p_subject_group = "" txt_p_sn_group = "" i = i + 1 if adors("sebu") <> "" then pay_Array_new(i,1) = adors("hangmok") pay_Array_new(i,2) = adors("sebu") pay_Array_new(i,3) = adors("est_danga") pay_Array_new(i,4) = adors("est_bu_or_cnt") pay_Array_new(i,5) = adors("est_dosu_or_time") pay_Array_new(i,6) = adors("est_money") pay_Array_new(i,7) = adors("act_danga") pay_Array_new(i,8) = adors("act_bu_or_cnt") pay_Array_new(i,9) = adors("act_dosu_or_time") pay_Array_new(i,10) = adors("act_money") pay_Array_new(i,11) = adors("cha_money") pay_Array_new(i,12) = adors("memo") if trim(pay_Array_new(i,6)) = "" then else est_sum = cdbl(est_sum) + cdbl(pay_Array_new(i,6)) '예상직접비 누계 end if if pay_Array_new(i,10) <> "" then act_sum = cdbl(act_sum) + cdbl(pay_Array_new(i,10)) '실제직접비 누계 end if end if adors.movenext loop adors.close query = " SELECT * " query = query & " FROM direct_cost " query = query & " WHERE p_sn = '" & p_sn & "' " query = query & " AND del_yes_no = 'no' " query = query & " AND cost_type = '" & cost_type & "' " query = query & " AND p_child_sn = '" & p_child_sn & "' " query = query & " AND hangmok IN ('메모', '메모_경영지원실') " query = query & " ORDER BY id " adors.Open query, adoconn, 1 do while not adors.EOF if adors("hangmok") = "메모" then pay_Array_new(0,0) = adors("memo") elseif adors("hangmok") = "메모_경영지원실" then pay_Array_new(0,13) = adors("memo") end if adors.movenext loop adors.close edit_yes_no = "yes" '기본적으로 처음일때는 수정가능으로 정의 if Len(p_child_sn) > 8 or (p_sub_type = "M" and cost_type = "research") then query = " SELECT p_input_complete " query = query & " FROM T_PROJECT_METHOD " if p_sub_type = "M" and cost_type = "research" and len(p_child_sn) < 8 then query = query & " WHERE p_sn = '"& p_child_sn &"' " else query = query & " WHERE p_child_sn = '"& p_child_sn &"' " end if adors.Open query, adoconn, 1 If cost_type_name = "연구" Then If mid(adoRs("p_input_complete"), 1,1) = "o" Then p_progress_status = "직접비 예산 입력 완료" Else p_progress_status = "직접비 예산 입력 중" End if ElseIf cost_type_name = "실사" Then If mid(adoRs("p_input_complete"), 2,1) = "o" Then p_progress_status = "직접비 예산 입력 완료" Else p_progress_status = "직접비 예산 입력 중" if field_sub_complete <> "" Then p_progress_status = p_progress_status & " - " & field_sub_complete & " 입력 완료" End If End if End If adoRs.close end if %>
" elseif p_sub_type = "C" then query = " SELECT p_sn " query = query & " , p_subject " query = query & " , TCCD_E.c_code_name as p_export_range " query = query & " , p_cont_cost " query = query & " FROM T_PROJECT_METHOD TPM " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E ON TCCD_E.c_kind_code = '011' AND TPM.p_export_range = TCCD_E.c_common_code" query = query & " WHERE p_child_sn = '"& p_child_sn &"'" 'Response.Write query & "
" end if AdoRs.Open query,adoconn, 1 p_sn = adors("p_sn") p_subject = adors.fields("p_subject") p_export_range = adors("p_export_range") p_cont_cost = adors("p_cont_cost") adors.Close '기본정보 초기값 셋팅 query = " SELECT p_method_cd, TPM.p_sn, p_child_sn, p_sub_type, TCCD_A.c_code_name as p_sur_area, TCCD_T.c_code_name as p_sur_target, TPM.p_sample, p_research_date_st, p_research_date_end, " query = query & " TCCD_P.c_code_name as p_sur_part, TCCD_F.c_code_name as p_field_process, TPM.p_cont_cost, ISNULL(TCCD_E1.c_code_name,TCCD_E2.c_code_name) as p_export_range " query = query & " FROM T_PROJECT_METHOD TPM " query = query & " LEFT OUTER JOIN T_PROJECT_BASE TPB ON TPM.p_sn = TPB.p_sn " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E1 ON TCCD_E1.c_kind_code = '011' AND TPM.p_export_range = TCCD_E1.c_common_code " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E2 ON TCCD_E2.c_kind_code = '011' AND TPB.p_export_range = TCCD_E2.c_common_code " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_A ON TCCD_A.c_kind_code = '012' AND TPM.p_sur_area = TCCD_A.c_common_code " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_T ON TCCD_T.c_kind_code = '013' AND TPM.p_sur_target = TCCD_T.c_common_code " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_P ON TCCD_P.c_kind_code = '014' AND TPM.p_sur_part = TCCD_P.c_common_code " query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_F ON TCCD_F.c_kind_code = '015' AND TPM.p_field_process = TCCD_F.c_common_code " 'if p_sub_type = "C" then if len(p_child_sn) > 7 then query = query & " WHERE TPM.p_child_sn = '"& p_child_sn &"' " elseif p_sub_type = "M" then query = query & " WHERE TPM.p_sn = '"& p_sn &"' " end if if p_method_cd <> "" then query = query & " AND TPM.p_method_cd = '"&p_method_cd&"' " end if 'Response.Write query &"
" rs.Open query,adoconn, 1 if rs.recordCount > 0 then p_sur_area = rs("p_sur_area") p_sur_target = rs("p_sur_target") If IsNull(rs("p_sample")) Then p_sample = 0 Else p_sample = Cdbl(rs("p_sample")) End if p_research_date_st = rs("p_research_date_st") p_research_date_end = rs("p_research_date_end") p_sur_part = rs("p_sur_part") p_field_process = rs("p_field_process") p_child_sn = rs("p_child_sn") p_sub_type = rs("p_sub_type") if p_sub_type = "C" Then If IsNull(rs("p_cont_cost")) Then p_cont_cost = 0 Else p_cont_cost = rs("p_cont_cost") End if end if p_export_range = rs("p_export_range") else p_sur_area = "" p_sur_target = "" p_sample = 1 est_sum = 0 p_research_date_st = "" p_research_date_end = "" p_sur_part = "" p_field_process = "" p_export_range = "" end if rs.close p_input_complete = "no" field_sub_complete = "" query = " SELECT tpm.p_sn, tpm.p_child_sn, p_sub_type, p_input_complete " if cost_type = "field" then query = query & " , d_order_cnt, isnull(sv_prog, '') as sv_prog, isnull(qc_prog, '') as qc_prog " end if query = query & " FROM T_PROJECT_METHOD tpm " if cost_type = "field" then query = query & " left outer join 문서내용 a on tpm.p_child_sn = cast(a.target1 as varchar(20)) and cast(a.target2 as varchar(20)) = 'field' and 문서제목 = '프로젝트수행계획서' and del_yes_no = 'no' " if p_field_dept <> "8" then query = query & " and cast(a.target3 as varchar(20)) = 'SV' " else query = query & " and cast(a.target3 as varchar(20)) = 'QC' " end if query = query & " left outer join Document d on a.문서번호 = d.d_no and d_delok = 'N' " query = query & " left join direct_cost_field DCF ON tpm.p_child_sn = DCF.p_child_sn AND DCF.del_yn = 'n' " end if query = query & " WHERE tpm.p_child_sn = '"& p_child_sn &"' " if not(p_sub_type = "M" AND cost_type = "research") AND (p_method_cd <> "" or isnull(p_method_cd)) then query = query & " AND p_method_cd = '"& p_method_cd &"' " end if adors.Open query, adoconn, 1 if adors.recordCount > 0 then if cost_type = "research" then do while not adors.EOF if mid(adors("p_input_complete"), 1, 1) = "o" then p_input_complete = "yes" end if adors.movenext loop elseif cost_type = "field" then if mid(adors("p_input_complete"), 2, 1) = "o" or adors("d_order_cnt") <> "99" then p_input_complete = "yes" Else if adors("sv_prog") = "complete" then field_sub_complete = "SV" End If if adors("qc_prog") = "complete" then if field_sub_complete <> "" Then field_sub_complete = field_sub_complete & ", " End If field_sub_complete = field_sub_complete & "QC" End If if p_field_dept = "8" then if user_team = "8" then if adors("qc_prog") = "complete" then p_input_complete = "yes" End If End if Else if user_team = "8" then if adors("qc_prog") = "complete" then p_input_complete = "yes" End If Elseif session("p_teamplace") = "0" Then if adors("sv_prog") = "complete" then p_input_complete = "yes" End If End if End If End if end if end if adors.close query = " SELECT dc1.d_cost_name, dc2.id, dc2.d_cost_name, "&VbCrlf query = query & " dc.id, dc.p_sn, dc.krc_no, dc.p_subject, dc.p_type_code, dc.hangmok, isnull(dc.sebu, '') as sebu, "&VbCrlf query = query & " isnull(dc.est_danga,'') as est_danga, isnull(dc.est_bu_or_cnt,'') as est_bu_or_cnt, isnull(dc.est_dosu_or_time,'') as est_dosu_or_time, isnull(dc.est_money,'') as est_money, "&VbCrlf query = query & " isnull(dc.act_danga,'') as act_danga, isnull(dc.act_bu_or_cnt,'') as act_bu_or_cnt, isnull(dc.act_dosu_or_time,'') as act_dosu_or_time, isnull(dc.act_money,'') as act_money, isnull(dc.cha_money,'') as cha_money, "&VbCrlf query = query & " dc.memo, dc.confirm_yn, dc.modify_date, dc.modify_time, dc.modify_user, dc.modify_user_code, dc.modify_ip, dc.write_count, "&VbCrlf query = query & " dc.del_yes_no, dc.del_date, dc.del_time,dc.del_user, dc.del_user_code, dc.del_ip, dc.p_subject_group, dc.p_sn_group, dc.cost_type, dc.p_child_sn "&VbCrlf query = query & " FROM "&VbCrlf query = query & " direct_costcode dc1 INNER JOIN direct_costcode dc2 "&VbCrlf query = query & " ON dc1.d_cost_parents = dc2.d_cost_code AND dc1.d_cost_kind = dc2.d_cost_kind "&VbCrlf query = query & " left outer join direct_cost dc on dc2.id = dc.hangmok and dc1.d_cost_name = dc.sebu "&VbCrlf query = query & " and dc.p_sn = '" & p_sn & "' "&VbCrlf query = query & " AND dc.del_yes_no = 'no' "&VbCrlf query = query & " AND dc.cost_type = '" & cost_type & "' "&VbCrlf if LEN(p_child_sn) > 8 then query = query & " AND dc.p_child_sn = '" & p_child_sn & "' "&VbCrlf end if query = query & " AND dc.hangmok NOT IN ('메모', '메모_경영지원실') "&VbCrlf query = query & " WHERE dc1.d_cost_parents != '0' "&VbCrlf query = query & " AND dc1.d_cost_kind = '" & cost_type & "' "&VbCrlf query = query & " AND dc2.d_cost_parents = '0' "&VbCrlf query = query & " and dc2.d_cost_useyn = 'Y' "&VbCrlf query = query & " and dc1.d_cost_useyn = 'Y' "&VbCrlf query = query & " ORDER BY CONVERT(INT,dc2.attribute01), CONVERT(INT,dc1.attribute01) "&VbCrlf 'response.Write query adors.Open query, adoconn, 1'adOpenStatic,adLockReadOnly '총 줄수를 저장 line_total = adors.recordcount redim pay_Array_new(line_total, 14) 'x:순서, y:1:항목, 2:세부내용, 3:예상의 원, 4:예상의 부/명, 5:예상의 도수/시간, 6:예상의 금액,7:실제의 원, 8:실제의 부/명, 9:실제의 도수/시간, 10:실제의 금액,11:실제금액-예상금액의 차이 '0:메모, 13:경영지원실 전용 메모 '각 컬럼의 초기값 설정 for i=1 to line_total for j=1 to 13 pay_Array_new(i,j) = "" next next i = -1 do while not adors.EOF txt_p_subject_group = "" txt_p_sn_group = "" i = i + 1 if adors("sebu") <> "" then pay_Array_new(i,1) = adors("hangmok") pay_Array_new(i,2) = adors("sebu") pay_Array_new(i,3) = adors("est_danga") pay_Array_new(i,4) = adors("est_bu_or_cnt") pay_Array_new(i,5) = adors("est_dosu_or_time") pay_Array_new(i,6) = adors("est_money") pay_Array_new(i,7) = adors("act_danga") pay_Array_new(i,8) = adors("act_bu_or_cnt") pay_Array_new(i,9) = adors("act_dosu_or_time") pay_Array_new(i,10) = adors("act_money") pay_Array_new(i,11) = adors("cha_money") pay_Array_new(i,12) = adors("memo") if trim(pay_Array_new(i,6)) = "" then else est_sum = cdbl(est_sum) + cdbl(pay_Array_new(i,6)) '예상직접비 누계 end if if pay_Array_new(i,10) <> "" then act_sum = cdbl(act_sum) + cdbl(pay_Array_new(i,10)) '실제직접비 누계 end if end if adors.movenext loop adors.close query = " SELECT * " query = query & " FROM direct_cost " query = query & " WHERE p_sn = '" & p_sn & "' " query = query & " AND del_yes_no = 'no' " query = query & " AND cost_type = '" & cost_type & "' " query = query & " AND p_child_sn = '" & p_child_sn & "' " query = query & " AND hangmok IN ('메모', '메모_경영지원실') " query = query & " ORDER BY id " adors.Open query, adoconn, 1 do while not adors.EOF if adors("hangmok") = "메모" then pay_Array_new(0,0) = adors("memo") elseif adors("hangmok") = "메모_경영지원실" then pay_Array_new(0,13) = adors("memo") end if adors.movenext loop adors.close edit_yes_no = "yes" '기본적으로 처음일때는 수정가능으로 정의 if Len(p_child_sn) > 8 or (p_sub_type = "M" and cost_type = "research") then query = " SELECT p_input_complete " query = query & " FROM T_PROJECT_METHOD " if p_sub_type = "M" and cost_type = "research" and len(p_child_sn) < 8 then query = query & " WHERE p_sn = '"& p_child_sn &"' " else query = query & " WHERE p_child_sn = '"& p_child_sn &"' " end if adors.Open query, adoconn, 1 If cost_type_name = "연구" Then If mid(adoRs("p_input_complete"), 1,1) = "o" Then p_progress_status = "직접비 예산 입력 완료" Else p_progress_status = "직접비 예산 입력 중" End if ElseIf cost_type_name = "실사" Then If mid(adoRs("p_input_complete"), 2,1) = "o" Then p_progress_status = "직접비 예산 입력 완료" Else p_progress_status = "직접비 예산 입력 중" if field_sub_complete <> "" Then p_progress_status = p_progress_status & " - " & field_sub_complete & " 입력 완료" End If End if End If adoRs.close end if %>