<% dim command command = Request("command") if command <> "excel" then %>

그룹운영비 그룹별 집계

<% end if job_month = Request("job_month") search_depart = Request("search_depart") if command = "excel" Then Response.CacheControl = "public" Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-Disposition","attachment;filename=그룹운영비용정산_" & job_month & ".xls" end if %>
<%if command <> "excel" then%> <% end if %> <% if command <> "" then %> <% end if %>
<% if Session("depart_code") = "18" or session("teamplace") = "6" Then %> <% End If %>
<% query = "" query = query & " SELECT depart , sum(cost) as cost, count(1) as cnt " query = query & " FROM V_GROUP_COST_NEW with(nolock) " query = query & " where 1 = 1 " query = query & " AND left(cost_date,7) = '" & job_month & "' " if( search_depart <> "" )then query = query & " and depart = '" & search_depart & "' " end if if session("depart_code") <> "18" and session("teamplace") <> "6" Then query = query & " and ((depart_cd = '" & Session("depart_code") & "' " query = query & " and depart_cd <> '0') OR " query = query & " depart = '" & Session("loginuser") & "') " End If query = query & " group by depart " query = query & " order by depart asc " Adors.open query, adoconn, adopenstatic, adlockreadonly if Adors.RecordCount > 0 Then sum_money = 0 %> <% For i=1 to Adors.recordcount IF list_bgcolor="#FFFFFF" Then list_bgcolor="floralwhite" Else list_bgcolor="#FFFFFF" End IF %> <% sum_money = sum_money + CDbl(Adors("cost")) adors.movenext next AdoRs.close %> <% Else %> <% End if %>
부서 금액
<%=Adors("depart") %> <%=Formatnumber(Adors("cost"), 0) %>
합 계 <%= Formatnumber(sum_money, 0) %>
부서 금액
검색결과가 없습니다
합 계 0
<% if command <> "excel" then%>
<% end if %>