최초커밋
This commit is contained in:
766
approval/doc_expense_approval_depart.asp
Normal file
766
approval/doc_expense_approval_depart.asp
Normal file
@@ -0,0 +1,766 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
dim Query
|
||||
dim i, j
|
||||
dim title
|
||||
dim Max_length '<27>Է°<D4B7><C2B0><EFBFBD> <20>ټ<EFBFBD><D9BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
dim Gap()
|
||||
dim cost_type(2) ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
dim sel_date, sel_date_st, sel_date_ed, now_month
|
||||
dim depart_cost_type
|
||||
|
||||
cost_type(0) = "<22><><EFBFBD><EFBFBD>"
|
||||
cost_type(1) = "<22><><EFBFBD>ι<EFBFBD><CEB9><EFBFBD>ī<EFBFBD><C4AB>"
|
||||
cost_type(2) = "<22><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>ī<EFBFBD><C4AB>"
|
||||
|
||||
sel_date = request("txt_date")
|
||||
sel_date_st = request("sel_date_st")
|
||||
sel_date_ed = request("sel_date_ed")
|
||||
now_month = request("now_month")
|
||||
|
||||
'response.write now_month
|
||||
|
||||
depart_cost_type = request("depart_cost_type") ' 1:<3A><EFBFBD>Ȱ<EFBFBD><C8B0><EFBFBD><EFBFBD>, 2:<3A><EFBFBD><D7B7><EFBFBD>Ȱ<EFBFBD><C8B0><EFBFBD><EFBFBD>
|
||||
if depart_cost_type = "" Then
|
||||
if session("Depart_Code") = "0" Then
|
||||
depart_cost_type = "2"
|
||||
Else
|
||||
depart_cost_type = "1"
|
||||
end if
|
||||
End if
|
||||
|
||||
title="<22>μ<EFBFBD><CEBC><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>"
|
||||
if sel_date <> "" Then
|
||||
Max_length=5
|
||||
Else
|
||||
Max_length=13
|
||||
End if
|
||||
|
||||
redim gap(Max_length,6) 'x:<3A><><EFBFBD><EFBFBD>, y:1:<3A><><EFBFBD><EFBFBD>, 2:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE>, 3:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 4:<3A>ݾ<EFBFBD>,5:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڵ<EFBFBD>, 6:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, (0,0) : <20>Ѿ<EFBFBD>
|
||||
%>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<style>
|
||||
#mainTb *{
|
||||
font-size: 13px;
|
||||
letter-spacing: 0px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#mainTb{
|
||||
border-collapse:collapse;
|
||||
}
|
||||
#mainTb > tbody > tr:nth-child(2) > td{
|
||||
background-color: #eaeaea;
|
||||
border: 1px solid #cacaca;
|
||||
color: #000;
|
||||
}
|
||||
#mainTb > tbody > tr:nth-child(n + 3) > td{
|
||||
padding: 2px 1px;
|
||||
}
|
||||
#mainTb > tbody > tr:nth-last-child(2) > td{
|
||||
background-color: #eaeaea;
|
||||
border: 1px solid #c8ccc8;
|
||||
color: black;
|
||||
}
|
||||
|
||||
#topTb{
|
||||
margin-bottom: 5px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
#topTb > tbody > tr:first-child > td{
|
||||
background-color: #eaeaea;
|
||||
color: black;
|
||||
border: 1px solid #d5d5d5;
|
||||
}
|
||||
#topTb > tbody > tr:nth-child(n + 2) > td{
|
||||
background-color: #fefefe;
|
||||
color: black;
|
||||
border: 1px solid #d5d5d5;
|
||||
}
|
||||
#topTb > tbody > tr > td > input[type=text]{
|
||||
width:100%;
|
||||
border: none;
|
||||
}
|
||||
#topTb > tbody > tr > td{
|
||||
padding: 5px 2px;
|
||||
}
|
||||
|
||||
#print_btn{
|
||||
padding: 5px 25px;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.prj_row_select{
|
||||
width: 100%;
|
||||
}
|
||||
.prj_row_select:disabled, .job_content_select:disabled{
|
||||
color: #0047b1;
|
||||
cursor:not-allowed !important;
|
||||
}
|
||||
#prj_div{
|
||||
height: 600px;
|
||||
width: 600px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
border: 3px solid #eaeaea;
|
||||
padding: 2px;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 2px 2px 3px 0px #bdbdbd;
|
||||
z-index:10;
|
||||
display:none;
|
||||
}
|
||||
#prj_list{
|
||||
list-style: none;
|
||||
padding-left: 0px;
|
||||
}
|
||||
#prj_list li{
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
padding: 1px 0px 3px 6px;
|
||||
-webkit-touch-callout: none; /* iOS Safari */
|
||||
-webkit-user-select: none; /* Safari */
|
||||
-khtml-user-select: none; /* Konqueror HTML */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none; /* Non-prefixed version, currently
|
||||
supported by Chrome and Opera */
|
||||
}
|
||||
#prj_list li:hover{
|
||||
background-color: #d6e1f9;
|
||||
}
|
||||
#prj_list li.prj_selected{
|
||||
background-color: #172f59;
|
||||
color: white;
|
||||
}
|
||||
#prj_list li.prj_selected:hover{
|
||||
background-color: #3e5a8a;
|
||||
}
|
||||
</style>
|
||||
<!-- Main content -->
|
||||
<!-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><EFBFBD><D7B7><EFBFBD><EEBFB5> - <20><><EFBFBD>̺<EFBFBD> 25<32><35> <20><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD>&<26><>Ÿ -->
|
||||
<div class="content-body p-0">
|
||||
<div class="content pb-3">
|
||||
<div class="container-fluid">
|
||||
<div class="row row-0">
|
||||
<div class="col-12">
|
||||
<form method='post' name='frm_money_clean'>
|
||||
<input type="hidden" name="cutmenu" value="1" />
|
||||
<input type="hidden" name="txt_Max_length" value="<%=Max_length%>">
|
||||
<table width="700" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td style="padding:10 0 0 0">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" id="mainTb">
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<input type="button" value="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><>" id="prj_setting_btn" style="display:none;" />
|
||||
<div id="prj_div">
|
||||
<ul id="prj_list">
|
||||
</ul>
|
||||
</div>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors" id="topTb">
|
||||
<tr>
|
||||
<td width="10%" align="center"><%=now_month %></td>
|
||||
<td width="13%" align="center"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" align="center"><3E>Ĵ<EFBFBD></td>
|
||||
<td width="11%" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" align="center">ȸ<>ĺ<EFBFBD></td>
|
||||
<td width="11%" align="center"><3E><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD></td>
|
||||
<td width="11%" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" align="center"><3E><>Ÿ</td>
|
||||
<td width="11%" align="center"><3E>հ<EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
Dim depart_cd_string
|
||||
Dim total_est, total_use, total_res
|
||||
Dim hang1_res_cost, hang2_res_cost, hang3_res_cost, hang4_res_cost, hang5_res_cost, hang6_res_cost
|
||||
depart_cd_string = ""
|
||||
total_est = 0
|
||||
total_use = 0
|
||||
total_res = 0
|
||||
over_hang = ""
|
||||
'2023-05-15 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><EFBFBD><D7B7><EFBFBD> & <20><><EFBFBD>볻<EFBFBD><EBB3BB> <20><><EFBFBD><EFBFBD> (<28><> <20><EFBFBD><D7B7><EFBFBD><EFBFBD><EFBFBD> 2<><32> <20><> <20>̻<EFBFBD><CCBB><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ջ<EFBFBD><D5BB>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
' ex) msbu1,2 = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> msbu3,4 = <20><><EFBFBD>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD>, psbu1,4 = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>λ<EFBFBD><CEBB><EFBFBD>, psbu2, aibd = <20>Ż<EFBFBD><C5BB><EFBFBD> <20><><EFBFBD><EFBFBD>, dco = <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
'2023-05-31 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> [ Session("User_Number") = "20151203" ]<5D><> <20><>Ʈ<EFBFBD>ʰ<EFBFBD> <20>ƴ<EFBFBD><C6B4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ʷ<EFBFBD> <20><><EFBFBD><EFBFBD> V_GROUP_COST_NEW <20><> <20><><EFBFBD>̺<EFBFBD><CCBA><EFBFBD> <20>ϵ<EFBFBD><CFB5>ڵ<EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
' ä<><C3A4><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [ Session("User_Number") = "20031102" ]<5D><> <20><>Ʈ<EFBFBD>ʰ<EFBFBD> <20>ƴ<EFBFBD><C6B4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ʷ<EFBFBD> <20><><EFBFBD><EFBFBD> V_GROUP_COST_NEW <20><> <20><><EFBFBD>̺<EFBFBD><CCBA><EFBFBD> <20>ϵ<EFBFBD><CFB5>ڵ<EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
Query = ""
|
||||
If Session("User_Number") = "20151203" OR Session("User_Number") = "20031102" OR Session("N_Depart") = "E" Then
|
||||
Query = Query & " Select 'GROUP_SUM' as depart_nm "
|
||||
Query = Query & " ,''''+STRING_AGG(depart_cd,''',''')+'''' as depart_cd_string "
|
||||
Query = Query & " ,ISNULL(SUM(hang1_cost),0) as hang1_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang2_cost),0) as hang2_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang3_cost),0) as hang3_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang4_cost),0) as hang4_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang5_cost),0) as hang5_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang6_cost),0) as hang6_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang1_use_cost),0) as hang1_use_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang2_use_cost),0) as hang2_use_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang3_use_cost),0) as hang3_use_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang4_use_cost),0) as hang4_use_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang5_use_cost),0) as hang5_use_cost "
|
||||
Query = Query & " ,ISNULL(SUM(hang6_use_cost),0) as hang6_use_cost "
|
||||
Query = Query & " from( "
|
||||
END IF
|
||||
Query = Query & " SELECT GCE.depart_nm, GCE.depart_cd, hang1_cost, hang2_cost, hang3_cost, hang4_cost, hang5_cost, hang6_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = '<27>Ĵ<EFBFBD>' THEN VGC.cost ELSE 0 END), 0) AS hang1_use_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' THEN VGC.cost ELSE 0 END), 0) AS hang2_use_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = 'ȸ<>ĺ<EFBFBD>' THEN VGC.cost ELSE 0 END), 0) AS hang3_use_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = '<27><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD>' THEN VGC.cost ELSE 0 END), 0) AS hang4_use_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' THEN VGC.cost ELSE 0 END), 0) AS hang5_use_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = '<27><>Ÿ' THEN VGC.cost ELSE 0 END), 0) AS hang6_use_cost "
|
||||
Query = Query & " FROM GROUP_COST_EST GCE LEFT JOIN V_GROUP_COST_NEW VGC "
|
||||
Query = Query & " ON CHARINDEX(VGC.d_code, GCE.depart_cd) > 0 AND VGC.cost_date BETWEEN GCE.st_date AND GCE.ed_date "
|
||||
Query = Query & " WHERE use_yn = '1' "
|
||||
'<27><><EFBFBD>ؼ<EFBFBD> 2023-05-02 <20><>Ʈ<EFBFBD>ʵ<EFBFBD> <20>ѵ<EFBFBD> <20>߰<EFBFBD>
|
||||
If Session("User_Number") = "20151203" OR Session("User_Number") = "20031102" OR Session("N_Depart") = "E" Then
|
||||
Query = Query & " AND GCE.partner_no = '" & Session("User_Number") & "' "
|
||||
Else
|
||||
Query = Query & " AND CHARINDEX('" & Session("N_depart") & Session("N_team") & "', GCE.depart_cd) > 0 "
|
||||
End If
|
||||
|
||||
Query = Query & " AND '" & now_month & "-01' BETWEEN GCE.st_date AND GCE.ed_date "
|
||||
Query = Query & " GROUP BY GCE.depart_nm, GCE.depart_cd, hang1_cost, hang2_cost, hang3_cost, hang4_cost, hang5_cost, hang6_cost "
|
||||
'2023-05-15 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><EFBFBD><D7B7><EFBFBD> & <20><><EFBFBD>볻<EFBFBD><EBB3BB> <20><><EFBFBD><EFBFBD> (<28><> <20><EFBFBD><D7B7><EFBFBD><EFBFBD><EFBFBD> 2<><32> <20><> <20>̻<EFBFBD><CCBB><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ջ<EFBFBD><D5BB>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
If Session("User_Number") = "20151203" OR Session("User_Number") = "20031102" OR Session("N_Depart") = "E" Then
|
||||
Query = Query & " ) GROUP_COST "
|
||||
END IF
|
||||
'Response.Write Query
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
if adoRs.recordCount > 0 Then
|
||||
If Session("User_Number") = "20151203" OR Session("User_Number") = "20031102" OR Session("N_Depart") = "E" Then
|
||||
depart_cd_string = adoRs("depart_cd_string")
|
||||
END IF
|
||||
|
||||
total_est = adoRs("hang1_cost") + adoRs("hang2_cost") + adoRs("hang3_cost") + adoRs("hang4_cost") + adoRs("hang5_cost") + adoRs("hang6_cost")
|
||||
total_use = adoRs("hang1_use_cost") + adoRs("hang2_use_cost") + adoRs("hang3_use_cost") + adoRs("hang4_use_cost") + adoRs("hang5_use_cost") + adoRs("hang6_use_cost")
|
||||
total_res = total_est - total_use
|
||||
|
||||
hang1_res_cost = adoRs("hang1_cost") - adoRs("hang1_use_cost")
|
||||
hang2_res_cost = adoRs("hang2_cost") - adoRs("hang2_use_cost")
|
||||
hang3_res_cost = adoRs("hang3_cost") - adoRs("hang3_use_cost")
|
||||
hang4_res_cost = adoRs("hang4_cost") - adoRs("hang4_use_cost")
|
||||
hang5_res_cost = adoRs("hang5_cost") - adoRs("hang5_use_cost")
|
||||
hang6_res_cost = adoRs("hang6_cost") - adoRs("hang6_use_cost")
|
||||
%>
|
||||
|
||||
|
||||
<tr>
|
||||
<td align="center" rowspan="3">
|
||||
<input type="hidden" name="sel_date" id="sel_date" value="<%= sel_date%>" />
|
||||
<%
|
||||
if Session("User_Number") = "20151203" OR Session("User_Number") = "20031102" OR session("Depart_Code") <> "0" OR Session("N_Depart") = "E" then
|
||||
%>
|
||||
<input type="button" id="departDetail_btn" value="<22><><EFBFBD>볻<EFBFBD><EBB3BB> <20><><EFBFBD><EFBFBD>" style="cursor:pointer;"/>
|
||||
<div id="departDetail_dialog">
|
||||
</div>
|
||||
<% end if %>
|
||||
</td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang1_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang2_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang3_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang4_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang5_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang6_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:78px; font-size:12px; text-align:right;" value="<%= FormatNumber(total_est, 0) %>" readonly /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang1_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang2_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang3_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang4_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang5_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang6_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:78px; font-size:12px; text-align:right;" value="<%= FormatNumber(total_use, 0) %>" readonly /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" ><3E>ܿ<EFBFBD></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang1_res_cost, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang2_res_cost, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang3_res_cost, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang4_res_cost, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang5_res_cost, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang6_res_cost, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:78px; font-size:12px; text-align:right;" value="<%= FormatNumber(total_res, 0) %>" readonly /></td>
|
||||
</tr>
|
||||
<%
|
||||
End if
|
||||
adoRs.close
|
||||
%>
|
||||
</table>
|
||||
<!-- 2023-05-15 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ʷ<EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD> <20><> <20><>Ʈ<EFBFBD><C6AE> <20>ҵ<EFBFBD><D2B5><EFBFBD> <20><><EFBFBD>̰<EFBFBD> -->
|
||||
<%If Session("User_Number") = "20151203" OR Session("User_Number") = "20031102" OR Session("N_Depart") = "E" Then %>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors" id="topTb">
|
||||
<tr>
|
||||
<td width="10%" align="center"><%=now_month %></td>
|
||||
<td width="13%" align="center"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" align="center"><3E>Ĵ<EFBFBD></td>
|
||||
<td width="11%" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" align="center">ȸ<>ĺ<EFBFBD></td>
|
||||
<td width="11%" align="center"><3E><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD></td>
|
||||
<td width="11%" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" align="center"><3E><>Ÿ</td>
|
||||
<td width="11%" align="center"><3E>հ<EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
Dim total_est2, total_use2, total_res2
|
||||
Dim hang1_res_cost2, hang2_res_cost2, hang3_res_cost2, hang4_res_cost2, hang5_res_cost2, hang6_res_cost2
|
||||
total_est2 = 0
|
||||
total_use2 = 0
|
||||
total_res2 = 0
|
||||
over_hang = ""
|
||||
|
||||
Query = ""
|
||||
Query = Query & " SELECT GCE.depart_nm, hang1_cost, hang2_cost, hang3_cost, hang4_cost, hang5_cost, hang6_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = '<27>Ĵ<EFBFBD>' THEN VGC.cost ELSE 0 END), 0) AS hang1_use_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' THEN VGC.cost ELSE 0 END), 0) AS hang2_use_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = 'ȸ<>ĺ<EFBFBD>' THEN VGC.cost ELSE 0 END), 0) AS hang3_use_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = '<27><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD>' THEN VGC.cost ELSE 0 END), 0) AS hang4_use_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' THEN VGC.cost ELSE 0 END), 0) AS hang5_use_cost, "
|
||||
Query = Query & " ISNULL(SUM(CASE WHEN VGC.txt_hangmok = '<27><>Ÿ' THEN VGC.cost ELSE 0 END), 0) AS hang6_use_cost "
|
||||
Query = Query & " FROM GROUP_COST_EST GCE LEFT JOIN V_GROUP_COST_NEW VGC "
|
||||
IF Session("User_Number") = "20151203" OR Session("User_Number") = "20031102" OR Session("N_Depart") = "E" THEN
|
||||
Query = Query & " ON VGC.d_code = 'E101' AND VGC.cost_date BETWEEN GCE.st_date AND GCE.ed_date "
|
||||
END IF
|
||||
'IF Session("User_Number") = "20000201" OR Session("User_Number") = "20160205" THEN '<27><><EFBFBD>ؼ<EFBFBD> 2023-05-02 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ư<><C6AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> E102<30><32> <20><><EFBFBD><EFBFBD>
|
||||
' Query = Query & " ON VGC.d_code = 'E101' AND VGC.cost_date BETWEEN GCE.st_date AND GCE.ed_date "
|
||||
'ELSE
|
||||
' Query = Query & " ON CHARINDEX(VGC.d_code, GCE.depart_cd) > 0 AND VGC.cost_date BETWEEN GCE.st_date AND GCE.ed_date "
|
||||
'END IF
|
||||
Query = Query & " AND VGC.p_no = '" & Session("User_Number") & "' "
|
||||
Query = Query & " WHERE use_yn = '1' "
|
||||
Query = Query & " AND GCE.depart_cd='" & Session("User_Number") & "'"
|
||||
Query = Query & " AND '" & now_month & "-01' BETWEEN GCE.st_date AND GCE.ed_date "
|
||||
Query = Query & " GROUP BY GCE.depart_nm, hang1_cost, hang2_cost, hang3_cost, hang4_cost, hang5_cost, hang6_cost "
|
||||
|
||||
'Response.Write Query
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
if adoRs.recordCount > 0 Then
|
||||
total_est2 = adoRs("hang1_cost") + adoRs("hang2_cost") + adoRs("hang3_cost") + adoRs("hang4_cost") + adoRs("hang5_cost") + adoRs("hang6_cost")
|
||||
total_use2 = adoRs("hang1_use_cost") + adoRs("hang2_use_cost") + adoRs("hang3_use_cost") + adoRs("hang4_use_cost") + adoRs("hang5_use_cost") + adoRs("hang6_use_cost")
|
||||
total_res2 = total_est2 - total_use2
|
||||
|
||||
hang1_res_cost2 = adoRs("hang1_cost") - adoRs("hang1_use_cost")
|
||||
hang2_res_cost2 = adoRs("hang2_cost") - adoRs("hang2_use_cost")
|
||||
hang3_res_cost2 = adoRs("hang3_cost") - adoRs("hang3_use_cost")
|
||||
hang4_res_cost2 = adoRs("hang4_cost") - adoRs("hang4_use_cost")
|
||||
hang5_res_cost2 = adoRs("hang5_cost") - adoRs("hang5_use_cost")
|
||||
hang6_res_cost2 = adoRs("hang6_cost") - adoRs("hang6_use_cost")
|
||||
%>
|
||||
<tr>
|
||||
<td align="center" rowspan="3" class="align-middle">
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br>Ȱ<><C8B0><EFBFBD><EFBFBD>
|
||||
<input type="hidden" name="sel_date" id="sel_date" value="<%= sel_date%>" />
|
||||
<%
|
||||
if Session("User_Number") = "20151203" OR Session("User_Number") = "20031102" OR session("Depart_Code") <> "0" then
|
||||
%>
|
||||
<!--<input type="button" id="departDetail_btn" value="<22><><EFBFBD>볻<EFBFBD><EBB3BB> <20><><EFBFBD><EFBFBD>" style="cursor:pointer;"/>-->
|
||||
<div id="departDetail_dialog">
|
||||
</div>
|
||||
<% end if %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang1_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang2_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang3_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang4_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang5_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(adoRs("hang6_use_cost"), 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:78px; font-size:12px; text-align:right;" value="<%= FormatNumber(total_use2, 0) %>" readonly /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" ><3E>ܿ<EFBFBD></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang1_res_cost2, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang2_res_cost2, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang3_res_cost2, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang4_res_cost2, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang5_res_cost2, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:70px; font-size:12px; text-align:right;" value="<%= FormatNumber(hang6_res_cost2, 0) %>" readonly /></td>
|
||||
<td align="center" ><input type="text" class="number" style="width:78px; font-size:12px; text-align:right;" value="<%= FormatNumber(total_res2, 0) %>" readonly /></td>
|
||||
</tr>
|
||||
<%
|
||||
End if
|
||||
adoRs.close
|
||||
%>
|
||||
</table>
|
||||
<% End if%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr height="24">
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td>
|
||||
<td align="center" ><3E><EFBFBD></td>
|
||||
<td align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td align="center" ><3E>ݾ<EFBFBD></td>
|
||||
</tr>
|
||||
<!-- loop start -->
|
||||
<%for i=1 to Max_length%>
|
||||
<tr>
|
||||
<td align="center" >
|
||||
<% if sel_date <> "" Then %>
|
||||
<%=sel_date %>
|
||||
<input type="hidden" name="txt_date" value="<%=sel_date %>" />
|
||||
<% else %>
|
||||
<select name="txt_date" style="width:100px;">
|
||||
<option value=""><3E><><EFBFBD><EFBFBD></option>
|
||||
<% for j = cdate(sel_date_st) To cdate(sel_date_ed) %>
|
||||
<option value="<%=j%>"><%=j%></option>
|
||||
<% next %>
|
||||
</select>
|
||||
<% End if %>
|
||||
</td>
|
||||
|
||||
<td align="center" id="exap_td_<%=i %>" >
|
||||
<!-- <input type="text" style="width:200;padding-left:4px;" name="txt_pjt" value="" />-->
|
||||
</td>
|
||||
<td align="center" >
|
||||
<select name="txt_HangMok" style="width:100px;">
|
||||
<option value=""><3E><><EFBFBD><EFBFBD></option>
|
||||
<option value="<22>Ĵ<EFBFBD>"><3E>Ĵ<EFBFBD></option>
|
||||
<option value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
||||
<option value="ȸ<>ĺ<EFBFBD>">ȸ<>ĺ<EFBFBD></option>
|
||||
<option value="<22><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD>"><3E><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD></option>
|
||||
<option value="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></option>
|
||||
<option value="<22><>Ÿ"><3E><>Ÿ</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td align="center" >
|
||||
<input type="text" style="width:100;padding-left:4px;" name="txt_bigo" value="" />
|
||||
</td>
|
||||
<td align="center" >
|
||||
<input type="text" style="width:80;text-align:right;padding-right:4px;" name="txt_cost" onkeyup="OnlyNumber(this);check_comma(this.value,'<%=i%>');" value="" />
|
||||
</td>
|
||||
|
||||
<td align="center" style="display:none;" >
|
||||
<input type="hidden" name="cost_type" value="<22><><EFBFBD>ι<EFBFBD><CEB9><EFBFBD>ī<EFBFBD><C4AB>" >
|
||||
<!-- <select name="cost_type"><! --== <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ==-- >
|
||||
<%for j=0 to ubound(cost_type)%>
|
||||
<option value="<%=cost_type(j)%>"><%=cost_type(j)%></option>
|
||||
<%next%>
|
||||
</select> -->
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<%next%>
|
||||
<!-- loop end -->
|
||||
<tr>
|
||||
<td align="center" colspan="4"><3E><> <20><></td>
|
||||
<td align="center" >
|
||||
<input type="text" class="gray" value="" style="width:80;text-align:right;" name="txt_cost_sum" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" align="center">
|
||||
<input type="button" class="mt-2" id="print_btn" onclick="goPrint();" value="<22><> <20><>" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<%
|
||||
dim timeQuery, prjQuery, prevSaveQuery, foodQuery, preCostQuery, preGroupfeeQuery
|
||||
|
||||
prjQuery = ""
|
||||
prjQuery = prjQuery & " SELECT VPM.p_child_sn, p_subject, CASE WHEN JP.p_child_sn IS NOT NULL THEN '1' ELSE '0' END AS user_sel "
|
||||
prjQuery = prjQuery & " FROM V_PROJECT_METHOD VPM LEFT JOIN "
|
||||
prjQuery = prjQuery & " (SELECT DISTINCT p_child_sn, p_user FROM Job_ProjectList) JP "
|
||||
prjQuery = prjQuery & " ON VPM.p_child_sn = JP.p_child_sn AND JP.p_user = '" & Session("User_Number") & "' "
|
||||
prjQuery = prjQuery & " WHERE ISNULL(VPM.p_child_sn, '') > '" & RIGHT(cstr(year(date)-2), 2) & "' "
|
||||
prjQuery = prjQuery & " AND (p_research_complete IS NULL OR p_field_complete IS NULL OR p_dp_complete IS NULL) "
|
||||
prjQuery = prjQuery & " AND VPM.p_progress_status > '001' "
|
||||
prjQuery = prjQuery & " ORDER BY VPM.p_child_sn "
|
||||
|
||||
preGroupfeeQuery = ""
|
||||
preGroupfeeQuery = preGroupfeeQuery & " SELECT d_no, hangmok, gubun, cost_date, txt_pjt , txt_hangmok, contents, cost "
|
||||
preGroupfeeQuery = preGroupfeeQuery & " ,depart, depart_cd, write_name "
|
||||
preGroupfeeQuery = preGroupfeeQuery & " FROM V_GROUP_COST_NEW "
|
||||
preGroupfeeQuery = preGroupfeeQuery & " where 1=1 "
|
||||
preGroupfeeQuery = preGroupfeeQuery & " AND left(cost_date,7) = '" & now_month & "' " '//-- 20220630 hwkim
|
||||
if session("Depart_Code") = "18" then '//-- <20>濵<EFBFBD><E6BFB5>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD> & <20><><EFBFBD><EFBFBD><EFBFBD>ͼַ<CDBC><D6B7><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
if session("job_code") = "08" then
|
||||
preGroupfeeQuery = preGroupfeeQuery & " and depart_cd = '18' and p_job_part = '08'"
|
||||
else
|
||||
preGroupfeeQuery = preGroupfeeQuery & " and depart_cd = '18' and p_job_part <> '08' "
|
||||
end if
|
||||
Elseif depart_cd_string <> "" then
|
||||
' 2023-05-15 <20><><EFBFBD>ؼ<EFBFBD> <20><>Ʈ<EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD> <20><> <20><EFBFBD><D7B7><EFBFBD> <20><><EFBFBD>볻<EFBFBD><EBB3BB> <20><> <20><> <20>ְ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڱ<EFBFBD><DAB1><EFBFBD> <20><><EFBFBD>볻<EFBFBD><EBB3BB><EFBFBD><EFBFBD> <20><> <20><>
|
||||
preGroupfeeQuery = preGroupfeeQuery & " and d_code in (" & depart_cd_string & ") "
|
||||
Elseif Session("User_Number") = "20151203" OR Session("User_Number") = "20031102" OR session("Depart_Code") = "0" then
|
||||
preGroupfeeQuery = preGroupfeeQuery & " and p_no = '" & session("User_Number") & "' "
|
||||
'Elseif session("Depart_Code") = "17" Or session("Depart_Code") = "19" Then
|
||||
' preGroupfeeQuery = preGroupfeeQuery & " and (depart_cd = '17' OR (depart_cd = '18' and p_job_part = '08') OR depart_cd = '19') "
|
||||
Else
|
||||
preGroupfeeQuery = preGroupfeeQuery & " and depart_cd = '" & session("Depart_Code") & "' "
|
||||
end if
|
||||
preGroupfeeQuery = preGroupfeeQuery & " order by cost_date asc "
|
||||
|
||||
'response.write preGroupfeeQuery
|
||||
|
||||
%>
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
$(function(){
|
||||
var departDetail_dialog = $("#departDetail_dialog").dialog({
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
height: 300,
|
||||
width: 600,
|
||||
title: '<27><EFBFBD><F3BCBCBC><EFBFBD>'
|
||||
});
|
||||
|
||||
departDetail_dialog.dialog("option", "position", {
|
||||
my: 'center',
|
||||
at: 'center',
|
||||
of: window
|
||||
});
|
||||
|
||||
$("#departDetail_btn").on("click", function(){
|
||||
departDetail_dialog.dialog("open");
|
||||
});
|
||||
|
||||
$("input[name=depart_cost_type]").on("click", function(){
|
||||
var depart_cost_type = $(this).val();
|
||||
var sel_date = "<%=sel_date%>";
|
||||
var sel_date_st = "<%=sel_date_st%>";
|
||||
var sel_date_ed = "<%=sel_date_ed%>";
|
||||
|
||||
var url = "./doc_expense_approval_depart.asp?cutmenu=1&depart_cost_type=" + depart_cost_type;
|
||||
if(sel_date != ""){
|
||||
url += "&txt_date=" + sel_date;
|
||||
}else{
|
||||
url += "&sel_date_st=" + sel_date_st + "&sel_date_ed=" + sel_date_ed;
|
||||
}
|
||||
location.href = url;
|
||||
});
|
||||
});
|
||||
|
||||
function goPrint(){
|
||||
var txt_Max_length = document.frm_money_clean.txt_Max_length.value;
|
||||
var txt_date = new Array();
|
||||
var txt_HangMok = new Array();
|
||||
var txt_cost = new Array();
|
||||
var cost_type = new Array();
|
||||
var txt_pjt = new Array();
|
||||
var txt_bigo = new Array();
|
||||
|
||||
var tmp_use_sum = {};
|
||||
|
||||
var depart_cost_type = "<%=depart_cost_type %>";
|
||||
var tmp_cost_sum = document.frm_money_clean.txt_cost_sum.value.replace(/,/gi, "").replace("<22><>", "");
|
||||
|
||||
for (var i=0;i<txt_Max_length; i++){
|
||||
txt_date[i] = document.frm_money_clean.txt_date[i].value;
|
||||
txt_HangMok[i] = document.frm_money_clean.txt_HangMok[i].value;
|
||||
txt_cost[i] = document.frm_money_clean.txt_cost[i].value;
|
||||
cost_type[i] = document.frm_money_clean.cost_type[i].value;
|
||||
txt_pjt[i] = document.frm_money_clean.txt_pjt[i].value;
|
||||
txt_bigo[i] = document.frm_money_clean.txt_bigo[i].value;
|
||||
if (txt_cost[i] == "") {
|
||||
txt_date[i] = "";
|
||||
}
|
||||
}
|
||||
for(var i=0;i<txt_Max_length; i++){
|
||||
|
||||
if(txt_cost[i] != "" && txt_HangMok[i] == ""){
|
||||
alert("<22>ݾ<EFBFBD><DDBE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7B8><EFBFBD> <20>־<EFBFBD><D6BE><EFBFBD> <20>˴ϴ<CBB4>.");
|
||||
document.frm_money_clean.txt_HangMok[i].focus();
|
||||
return false;
|
||||
}
|
||||
if(txt_cost[i] == "" && txt_HangMok[i] != ""){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݾ<EFBFBD><DDBE><EFBFBD> <20>־<EFBFBD><D6BE><EFBFBD> <20>˴ϴ<CBB4>.");
|
||||
document.frm_money_clean.txt_cost[i].focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(txt_date[i] == "" && (txt_cost[i] != "" || txt_HangMok[i] != "")){
|
||||
alert("<22><>¥<EFBFBD><C2A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
document.frm_money_clean.txt_date[i].focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(txt_pjt[i] == "" && txt_HangMok[i] != ""){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD>.");
|
||||
document.frm_money_clean.txt_pjt[i].focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(txt_bigo[i] == "" && txt_HangMok[i] == "<22><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD>"){
|
||||
alert("<22><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD><D4BA><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7B8><EFBFBD> <20>Է<EFBFBD><D4B7>ϼ<EFBFBD><CFBC><EFBFBD>.");
|
||||
document.frm_money_clean.txt_bigo[i].focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
tmp_use_sum[txt_HangMok[i]] = (tmp_use_sum[txt_HangMok[i]] || 0) + +(txt_cost[i].replace(/,/gi, ""))
|
||||
}
|
||||
|
||||
|
||||
<%
|
||||
'20240429 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û<EFBFBD><C3BB><EFBFBD><EFBFBD> <20><>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD> <20><>ǥ<EFBFBD><C7A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ܾ<EFBFBD><DCBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
'20240503 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û<EFBFBD><C3BB><EFBFBD><EFBFBD> <20>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ܾ<EFBFBD><DCBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
IF Session("User_Number") = "20080101" OR Session("User_Number") = "20190301" OR Session("User_Number") = "20000201" THEN
|
||||
'20240426 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û<EFBFBD><C3BB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><D4B5><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
ELSEIf Session("Depart_code") = "0" Then
|
||||
%>
|
||||
if(<%= total_res2 %> - ((+tmp_use_sum["<22>Ĵ<EFBFBD>"] || 0) + (+tmp_use_sum["<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"] || 0) + (+tmp_use_sum["ȸ<>ĺ<EFBFBD>"] || 0) + (+tmp_use_sum["<22><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD>"] || 0) + (+tmp_use_sum["<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"] || 0) + (+tmp_use_sum["<22><>Ÿ"] || 0)) < 0){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD><CAB0>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
<% ELSE %>
|
||||
if(<%= hang1_res_cost %> - +(tmp_use_sum["<22>Ĵ<EFBFBD>"] || 0) < 0){
|
||||
alert("<22>Ĵ<EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD><CAB0>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n");
|
||||
return false;
|
||||
}
|
||||
if(<%= hang2_res_cost %> - +(tmp_use_sum["<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"] || 0) < 0){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD><CAB0>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n");
|
||||
return false;
|
||||
}
|
||||
if(<%= hang3_res_cost %> - +(tmp_use_sum["ȸ<>ĺ<EFBFBD>"] || 0) < 0){
|
||||
alert("ȸ<>ĺ<EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD><CAB0>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n");
|
||||
return false;
|
||||
}
|
||||
if(<%= hang4_res_cost %> - +(tmp_use_sum["<22><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD>"] || 0) < 0){
|
||||
alert("<22><>ǰ<EFBFBD><C7B0><EFBFBD>Ժ<EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD><CAB0>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n");
|
||||
return false;
|
||||
}
|
||||
if(<%= hang5_res_cost %> - +(tmp_use_sum["<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"] || 0) < 0){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD><CAB0>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n");
|
||||
return false;
|
||||
}
|
||||
if(<%= hang6_res_cost %> - +(tmp_use_sum["<22><>Ÿ"] || 0) < 0){
|
||||
alert("<22><>Ÿ <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD><CAB0>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n");
|
||||
return false;
|
||||
}
|
||||
<% End If %>
|
||||
|
||||
|
||||
|
||||
if (tmp_cost_sum * 1 == 0) {
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Է<EFBFBD><D4B7>ϼ<EFBFBD><CFBC><EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
var url = "doc_expense_approval_depart_print.asp";
|
||||
url = url + "?txt_Max_length=" + txt_Max_length;
|
||||
url = url + "&print_type=1";
|
||||
url = url + "&depart_cost_type=" + depart_cost_type;
|
||||
|
||||
document.frm_money_clean.action=url;
|
||||
document.frm_money_clean.submit();
|
||||
}
|
||||
|
||||
function check_comma(txt,posi) {
|
||||
txt=txt.trim();
|
||||
var txt_cost_sum = 0;
|
||||
var Max_length = document.frm_money_clean.txt_Max_length.value;
|
||||
|
||||
for(var i=0;i<txt.length;i++){
|
||||
txt = txt.replace(',','')
|
||||
txt = txt.replace(' ','')
|
||||
}
|
||||
document.frm_money_clean.txt_cost[eval(posi)-1].value = commify(txt);
|
||||
|
||||
for(i=0; i<Max_length;i++){
|
||||
var txt_cost = document.frm_money_clean.txt_cost[i].value;
|
||||
for(var j=0;j<txt_cost.length;j++){
|
||||
txt_cost = txt_cost.replace(',','')
|
||||
txt_cost = txt_cost.replace(' ','')
|
||||
}
|
||||
if (txt_cost != ""){
|
||||
txt_cost_sum = eval(txt_cost_sum) + eval(txt_cost);
|
||||
}
|
||||
}
|
||||
document.frm_money_clean.txt_cost_sum.value = "<22><>" + commify(txt_cost_sum);
|
||||
}
|
||||
function addJobRow(rown){
|
||||
var tmpHTML = "";
|
||||
tmpHTML += "<select id='prj_row_" + rown + "' class='prj_row_select' name='txt_pjt' style='width:200px;' >";
|
||||
tmpHTML += "</select>";
|
||||
$("#exap_td_" + rown).append(tmpHTML);
|
||||
|
||||
var tmpHTML = "";
|
||||
tmpHTML += "<option value=''><3E><> <20><></option>";
|
||||
$.each($("#prj_list li.prj_selected"), function(idx, obj){
|
||||
tmpHTML += "<option value='" + $(obj).data("p_child_sn") + "'>" + $(obj).text() + "</option>";
|
||||
});
|
||||
tmpHTML += "<option value='99999'><3E>Ϲ<EFBFBD>/<2F><><EFBFBD><EFBFBD></option>";
|
||||
$("#prj_row_" + rown).html(tmpHTML);
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#prj_setting_btn").on("click", function(){
|
||||
if($(this).val() == "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><>"){
|
||||
$(this).val("<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><>");
|
||||
$("#prj_div").stop(true, true).fadeIn();
|
||||
}else{
|
||||
$(this).val("<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><>");
|
||||
$("#prj_div").stop(true, true).fadeOut();
|
||||
}
|
||||
});
|
||||
|
||||
var prjJsonArr = <%=queryToJson(prjQuery)%>;
|
||||
var tmpHTML = "";
|
||||
$.each(prjJsonArr, function(idx, obj){
|
||||
tmpHTML += "<li title='" + obj.p_subject + "' data-p_child_sn='" + obj.p_child_sn + "' " + (obj.user_sel == "1" ? "class='prj_selected' " : "") + ">[" + obj.p_child_sn + "] " + obj.p_subject + "</li>";
|
||||
});
|
||||
$("#prj_list").html(tmpHTML);
|
||||
|
||||
for(var i=1; i<=<%=Max_length %>; i++){
|
||||
addJobRow(i);
|
||||
}
|
||||
|
||||
|
||||
var prevGroupfeeArr = <%=queryToJson(preGroupfeeQuery)%>; // <20><EFBFBD>(<28><>)Ȱ<><C8B0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD> <20>ҷ<EFBFBD><D2B7><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
var tmpHTML = "";
|
||||
if(prevGroupfeeArr.length > 0 ){
|
||||
//tmpHTML = prevGroupfeeArr;
|
||||
tmpHTML += "<table style='width: 100%;' class='table table-sm table-sm2 table-bordered table-head tr-colors' > ";
|
||||
tmpHTML += "<tr>";
|
||||
tmpHTML += "<th scope='row' class='text-center'><3E><><EFBFBD><EFBFBD></td> ";
|
||||
tmpHTML += "<th scope='row' class='text-center'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td> ";
|
||||
tmpHTML += "<th scope='row' class='text-center'><3E><EFBFBD></td> ";
|
||||
tmpHTML += "<th scope='row' class='text-center'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td> ";
|
||||
tmpHTML += "<th scope='row' class='text-center'><3E>ݾ<EFBFBD></td> ";
|
||||
tmpHTML += "<th scope='row' class='text-center'><3E>ۼ<EFBFBD><DBBC><EFBFBD></td> ";
|
||||
tmpHTML += "</tr> ";
|
||||
}
|
||||
$.each( prevGroupfeeArr , function(idx, obj){
|
||||
//console.log(idx, obj);
|
||||
tmpHTML += "<tr><td class='text-center' style='width:100px;'>";
|
||||
tmpHTML += obj["cost_date"] + "</td><td class='text-center'>";
|
||||
tmpHTML += obj["txt_pjt"] + "</td><td class='text-center'>";
|
||||
tmpHTML += obj["txt_hangmok"] + "</td><td class='text-center'>";
|
||||
tmpHTML += obj["contents"] + "</td><td class='text-center'>";
|
||||
tmpHTML += commify(obj["cost"]) + " </td><td class='text-center'>";
|
||||
tmpHTML += obj["write_name"] + "</td>";
|
||||
tmpHTML += "</tr> ";
|
||||
});
|
||||
tmpHTML += "</table> ";
|
||||
$("#topTb").after(tmpHTML);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
Reference in New Issue
Block a user