<% dim command command = Request("command") p_sn = request("p_sn") p_subject = request("p_subject") work_type = request("work_type") p_depart = request("p_depart") dim tmp_p_sn dim subTime dim allTime dim subPay dim allPay if tmp_month = "" then tmp_month = cstr(month(date())) end if if command <> "excel" then %>

진행 프로젝트 내근직 비용현황

<% End If if command = "excel" then Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-Disposition","attachment;filename=진행프로젝트_내근직_비용현황.xls" end if %> <%if command <> "excel" then%> <% Dim f_menu : f_menu = "np" %> <%End If%>
<%if command <> "excel" then%> <% query = " select *" query = query & " from direct_costcode " query = query & " where d_cost_kind = 'field' " query = query & " and d_cost_useyn = 'y' " query = query & " and d_cost_parents = '2' " Adors.Open query, adoConn, 1 %> <% query = "" query = query & " SELECT DISTINCT before_t_cd1 as d_code, LEFT(T_Name, 8) as d_name " query = query & " FROM project2.dbo.v_Department " query = query & " WHERE before_t_cd1 between 20 and 99 " query = query & " order by LEFT(T_Name, 8) " Adors.Open query, adoConn, 1 %> <%end if %> <% if command <> "" then %> <% end if %>
프로젝트 번호 프로젝트명
업무 연구부서
※누적 비용은 내근직 Confirm이 완료된 기준입니다(실제직접비와 다를 수 있습니다)

<% '--프로젝트 별 내근직 소요비용 검색-종료 프로젝트 query = " select isnull(d2.d_name,d1.d_name) as d_name,ISNULL(nw.p_child_sn, nw.p_sn) as p_child_sn, isnull(tpm.p_subject,p.p_subject) as p_subject, p_sebu, " query = query & " MIN(date) as st_date, isnull(p.p_field_end,tpm.p_field_date_end) as p_field_date_end ,MAX(date) as sv_confirm_date, " query = query & " round(SUM(job_total_time),2) as job_total_time, SUM(s_sum) as s_sum , " query = query & " nw.p_sn, isnull(tpm.p_method_cd,'') as p_method_cd, isnull(tpm.p_sub_type,'') as p_sub_type " query = query & " from (select nk.p_sebu, isnull(p_sebu_code,'') as p_sebu_code, nk.p_sn, DATE, case when left(tn.s_gubun, 4) = '추가수당' then '0' else job_total_time end as job_total_time, isnull(nk.p_child_sn, '') as p_child_sn, isnull(job_confirm_yn, '') as job_confirm_yn, ISNULL(s_sum, 0) as s_sum " query = query & " from neakeun_work nk left outer join T_NEAKEUN_PAY tn on cast(nk.id as varchar) = tn.attribute01 " query = query & " where isnull(nk.p_child_sn, '') <> '') nw left outer join T_PROJECT_METHOD tpm on nw.p_child_sn = tpm.p_child_sn " query = query & " left outer join project p on nw.p_sn = p.p_sn " query = query & " left outer join Depart d1 on tpm.p_rsch_dept = d1.d_code " query = query & " left outer join Depart d2 on p.p_depart = d2.d_code " query = query & " where date != '' " query = query & " AND nw.job_confirm_yn = 'Y' " query = query & " AND ((p.p_field_complete is null or p.p_field_complete != '1') AND (tpm.p_field_complete is null or tpm.p_field_complete != '1')) " if p_sn <> "" then query = query & " AND nw.p_child_sn LIKE '%"& p_sn &"%' " end if if p_subject <> "" then query = query & " AND (p.p_subject LIKE '%"&p_subject&"%' OR tpm.p_subject like '%"&p_subject&"%') " end if if work_type <> "" then query = query & " AND p_sebu_code = '"&work_type&"' " end if if p_depart <> "" then query = query & " AND (p.p_depart = '"&p_depart&"' OR tpm.p_rsch_dept = '"&p_depart&"') " end if query = query & " group by d1.d_name,d2.d_name, nw.p_sn, p_sebu, nw.p_child_sn, p_sebu_code, tpm.p_subject, p.p_subject, p_field_end, p_field_date_end, nw.p_sn, tpm.p_method_cd, tpm.p_sub_type " query = query & " order by nw.p_sn, nw.p_child_sn, p_sebu_code, p_sebu " Adors.open query,adoconn,1 if Adors.recordcount <> 0 then tmp_p_sn = Adors("p_child_sn") end if subTime = 0 sumPay = 0 allTime = 0 allPay = 0 for i=1 to Adors.recordcount if not isnull(Adors("job_total_time")) then subTime = subTime + Adors("job_total_time") allTime = allTime + Adors("job_total_time") end if if not isnull(Adors("s_sum")) then subPay = subPay + Adors("s_sum") allPay = allPay + Adors("s_sum") end if %> <% Adors.movenext if i < Adors.recordcount then if tmp_p_sn <> Adors("p_child_sn") then %> <% tmp_p_sn = Adors("p_child_sn") subTime = 0 subTotal = 0 subPay = 0 subTotalPay = 0 end if else %> <% end if next Adors.close %>
연구부서 프로젝트 번호 프로젝트 명 업무 업무 시작일 실사 종료 예정일 SV 최종 확인 일자 누적 투입 시간 누적 비용
<%= Adors("d_name")%> <%= Adors("p_child_sn")%> ','<%=Adors("p_sub_type")%>','<%=Adors("p_method_cd")%>','<%=Adors("p_child_sn")%>')" class="blue"><%= Adors("p_subject")%> <%= Adors("p_sebu")%> <%= Adors("st_date")%> <%= Adors("p_field_date_end")%> <%= Adors("sv_confirm_date")%> <%= Adors("job_total_time")%> <%= FormatNumber(Adors("s_sum"),0)%>
[<%= tmp_p_sn%>]프로젝트 소계 <%= subTime%> <%= FormatNumber(subPay,0)%>
[<%= tmp_p_sn%>]프로젝트 소계 <%= subTime%> <%= FormatNumber(subPay,0)%>
총 합계 <%= allTime%> <%= FormatNumber(allPay,0)%>
<%if command <> "excel" then%>
<% end if %>