diff --git a/statistics/projectlist_cost.asp b/statistics/projectlist_cost.asp index d06164e..e7c7bde 100644 --- a/statistics/projectlist_cost.asp +++ b/statistics/projectlist_cost.asp @@ -9,6 +9,8 @@ If p_statistics = "" Then End If End If nowDate = now() + +p_costType = request("p_costType") %>
@@ -105,6 +107,12 @@ nowDate = now() + + + 범례 - 집행직접비율   65-75% :    @@ -172,7 +180,11 @@ nowDate = now() query = query & " TPM.p_child_sn, TPM.p_subject, VCC.p_cli_company_nm, " & vbCrLf query = query & " TPM.p_method_cd, TPMC.p_method_nm, ISNULL(TPM.p_sample, 0) as p_sample, " & vbCrLf query = query & " TPM.p_cont_cost, ISNULL(DC.sum_est, 0) AS sum_est, " & vbCrLf - query = query & " (ISNULL(DC.sum_act, 0) + ISNULL(MC.marketing_cost, 0) + ISNULL(JC.job_money, 0)) AS sum_act, " & vbCrLf + If LCase(Trim(p_costType)) = "field" Then + query = query & " ISNULL(DC.sum_act, 0) AS sum_act, " & vbCrLf + Else + query = query & " (ISNULL(DC.sum_act, 0) + ISNULL(MC.marketing_cost, 0) + ISNULL(JC.job_money, 0)) AS sum_act, " & vbCrLf + End If query = query & " ISNULL(DC.sum_act, 0) AS sum_act_tmp, " & vbCrLf query = query & " TPM.p_con_date_st, TPM.p_con_date_end, " & vbCrLf query = query & " TPM.p_progress_status, TPM.p_input_complete, " & vbCrLf @@ -194,6 +206,9 @@ nowDate = now() query = query & " sum(CONVERT(money, act_money)) AS sum_act " & vbCrLf query = query & " FROM project2.dbo.direct_cost " & vbCrLf query = query & " WHERE p_child_sn > '17' AND del_yes_no = 'no' " & vbCrLf + If LCase(Trim(p_costType)) = "field" Then + query = query & " AND cost_type = 'field' " & vbCrLf + End If query = query & " GROUP BY p_child_sn " & vbCrLf query = query & " ) DC ON TPM.p_child_sn = DC.p_child_sn LEFT JOIN " & vbCrLf query = query & " ( " & vbCrLf @@ -440,8 +455,8 @@ nowDate = now() e.preventDefault(); }); - $("#p_statistics").on("change", function(){ - location.href="./projectlist_cost.asp?p_statistics=" + $("#p_statistics option:selected").val(); + $("#p_statistics, #p_costType").on("change", function(){ + location.href="./projectlist_cost.asp?p_statistics=" + $("#p_statistics option:selected").val()+"&p_costType="+$("#p_costType option:selected").val(); }); });