최초커밋
This commit is contained in:
468
approval/doc_myun_pay_detail2.asp
Normal file
468
approval/doc_myun_pay_detail2.asp
Normal file
@@ -0,0 +1,468 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<%
|
||||
|
||||
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
|
||||
|
||||
dim tmpstr
|
||||
dim Query
|
||||
dim i
|
||||
dim user_name(4) '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0:<3A><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>, 1:<3A≯<EFBFBD>,2:<3A><><EFBFBD><EFBFBD>,3:<3A><>ȭ<EFBFBD><C8AD>ȣ, 4:<3A>μ<EFBFBD><CEBC>ڵ<EFBFBD>(<28><>)
|
||||
dim Max_Width
|
||||
dim title
|
||||
dim title2
|
||||
dim target_name '<27>߱<DFB1><DEB4><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD>
|
||||
dim Curr_date '<27><><EFBFBD>ó<EFBFBD>¥
|
||||
dim Company(6)
|
||||
dim Gap(10) '1:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>ڵ<EFBFBD>, 2:<3A><><EFBFBD><EFBFBD>(<28>Ա<EFBFBD>)<29><><EFBFBD><EFBFBD>, 3:<3A><><EFBFBD><EFBFBD>(<28>Ա<EFBFBD>)<29><><EFBFBD><EFBFBD>, 4:<3A><><EFBFBD><EFBFBD>(<28>Ա<EFBFBD>)<29><><EFBFBD><EFBFBD>, 5:<3A><><EFBFBD>ް<EFBFBD><DEB0><EFBFBD>, 6:<3A>ΰ<EFBFBD><CEB0><EFBFBD><EFBFBD><EFBFBD>, 7:<3A>Ѿ<EFBFBD>, 8:<3A>ŷ<EFBFBD>ó, 9:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>ڵ<EFBFBD>, 10:ǰ<>Ǽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ
|
||||
dim krc_no
|
||||
dim db_table_name
|
||||
dim approval_chk
|
||||
dim title_type
|
||||
|
||||
db_table_name = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
approval_chk = "true"
|
||||
|
||||
p_child_sn = request("p_child_sn")
|
||||
pay_type = request("pay_type")
|
||||
cost_type = request("cost_type")
|
||||
startDT = request("startDT")
|
||||
endDT = request("endDT")
|
||||
sv = request("sv")
|
||||
krc_no = request("krc_no")
|
||||
|
||||
' response.write "pay_type : " & request("pay_type") & "<br>"
|
||||
' response.write "startDT : " & request("startDT") & "<br>"
|
||||
' response.write "endDT : " & request("endDT") & "<br>"
|
||||
|
||||
If pay_type = 1 Then
|
||||
title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>γ<EFBFBD><CEB3><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>"
|
||||
title2 = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǻ<EFBFBD><C7BA><EFBFBD>"
|
||||
Else
|
||||
title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>γ<EFBFBD><CEB3><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>"
|
||||
title2 = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǻ<EFBFBD><C7BA><EFBFBD>"
|
||||
End if
|
||||
|
||||
|
||||
d_no = request("d_no")
|
||||
|
||||
query = "SELECT * "
|
||||
query = query & " FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as a "
|
||||
query = query & " INNER JOIN Document as b on a.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = b.d_no "
|
||||
query = query & " WHERE a.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ='" & d_no & "' "
|
||||
query = query & " AND b.d_delok = 'N' "
|
||||
|
||||
rsc.Open query, adoConn, 1
|
||||
if rsc.RecordCount > 0 Then
|
||||
If rsc("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>" Then
|
||||
pay_type = "1"
|
||||
Else
|
||||
pay_type = "2"
|
||||
End If
|
||||
|
||||
startDT = rsc("target10")
|
||||
endDT = rsc("target11")
|
||||
overMoney_reason = rsc("target17")
|
||||
End if
|
||||
|
||||
title_type = mid(replace(title," ",""), 1, 7)
|
||||
|
||||
Max_Width =750
|
||||
Curr_date = year(date) & "<22><> " & zeroformat(month(date),2) & "<22><> " & zeroformat(day(date),2) & "<22><>"
|
||||
|
||||
set rsm = server.CreateObject("ADODB.RECORDSET")
|
||||
|
||||
|
||||
''//===============
|
||||
''ȸ<><C8B8> ȸ<><C8B8><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5>Ϲ<EFBFBD>ȣ, <20><>ǥ<EFBFBD>ڸ<EFBFBD>, <20>ּ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
Query = "select * from company"
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
Company(1) = adors("com_name")
|
||||
Company(2) = adors("<22><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5>Ϲ<EFBFBD>ȣ")
|
||||
Company(3) = adors("<22><>ǥ<EFBFBD>ڸ<EFBFBD>")
|
||||
Company(4) = adors("<22>ּ<EFBFBD>")
|
||||
Company(5) = adors("<22><><EFBFBD>ε<EFBFBD><CEB5>Ϲ<EFBFBD>ȣ")
|
||||
Company(6) = adors("ȸ<><C8B8><EFBFBD><EFBFBD>ǥ<EFBFBD><C7A5>ȭ<EFBFBD><C8AD>ȣ")
|
||||
adoRs.close
|
||||
|
||||
|
||||
''///===============
|
||||
''<27>α<EFBFBD><CEB1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
'user_name(0) = Session("User_Number")
|
||||
user_name(0) = Session("User_Number")
|
||||
Query = "SELECT p_name, p_team_name, p_rank_name, p_tel3 FROM project2.dbo.V_Person WHERE p_no = '" & user_name(0) & "'"
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
user_name(1) = adoRs("p_name") '<27≯<EFBFBD>
|
||||
user_name(2) = adoRs("p_rank_name") '<27><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>
|
||||
user_name(3) = adoRs("p_tel3") '<27><><EFBFBD><EFBFBD> <20><>ȭ
|
||||
user_name(4) = adoRs("p_team_name") '<27>μ<EFBFBD><CEBC>ڵ<EFBFBD>
|
||||
adoRs.close
|
||||
|
||||
|
||||
''////////========================
|
||||
''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
gap(1) = request("txt_prj_name")
|
||||
gap(2) = request("txt_pay_target")
|
||||
gap(3) = request("txt_date")
|
||||
gap(4) = request("sel_pay_type")
|
||||
gap(5) = request("txt_pay")
|
||||
gap(6) = request("txt_pay_vat")
|
||||
gap(7) = request("txt_pay_tot")
|
||||
gap(8) = request("txt_client")
|
||||
gap(9) = request("txt_p_sn")
|
||||
gap(10) = request("txt_d_no")
|
||||
|
||||
' Response.Write "gap(1) : " & gap(1) & "<BR>"
|
||||
' Response.Write "gap(2) : " & gap(2) & "<BR>"
|
||||
' Response.Write "gap(3) : " & gap(3) & "<BR>"
|
||||
' Response.Write "gap(4) : " & gap(4) & "<BR>"
|
||||
' Response.Write "gap(5) : " & gap(5) & "<BR>"
|
||||
' Response.Write "gap(6) : " & gap(6) & "<BR>"
|
||||
' Response.Write "gap(7) : " & gap(7) & "<BR>"
|
||||
' Response.Write "gap(8) : " & gap(8) & "<BR>"
|
||||
' Response.Write "gap(9) : " & gap(9) & "<BR>"
|
||||
' Response.Write "gap(10) : " & gap(10) & "<BR>"
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title><%=GNB_TITLE%></title>
|
||||
<link rel="stylesheet" type="text/css" href="/css/basic.css">
|
||||
</head>
|
||||
|
||||
<script language=javascript>
|
||||
function win_close()
|
||||
{
|
||||
window.close();
|
||||
}
|
||||
|
||||
function menuChange(menuNum) {
|
||||
|
||||
//alert(menuNum);
|
||||
if (menuNum == "1") {
|
||||
document.getElementById("menu1").style.color = "#0000FF";
|
||||
document.getElementById("menu1").style.backgroundColor = "#F7D172";
|
||||
document.getElementById("table1").style.display = "";
|
||||
|
||||
document.getElementById("menu2").style.color = "#3030FF";
|
||||
document.getElementById("menu2").style.backgroundColor = "#EEEEEE";
|
||||
document.getElementById("table2").style.display = "none";
|
||||
} else {
|
||||
document.getElementById("menu1").style.color = "#3030FF";
|
||||
document.getElementById("menu1").style.backgroundColor = "#EEEEEE";
|
||||
document.getElementById("table1").style.display = "none";
|
||||
|
||||
document.getElementById("menu2").style.color = "#0000FF";
|
||||
document.getElementById("menu2").style.backgroundColor = "#F7D172";
|
||||
document.getElementById("table2").style.display = "";
|
||||
}
|
||||
}
|
||||
function detail_reason(m_name, m_jumin, d_no, p_child_sn) {
|
||||
var url = "../approval/doc_myun_pay_detail_reason.asp?m_name=" + m_name + "&m_jumin=" + m_jumin + "&d_no=" + d_no + "&p_child_sn=" + p_child_sn;
|
||||
window.open(url, "", "left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=780, height=600 ,scrollbars=yes ,resizable=yes");
|
||||
}
|
||||
</script>
|
||||
|
||||
<body topmargin="10" leftmargin="10">
|
||||
|
||||
<form method='post' name='frm_money'>
|
||||
<table width="99%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><img src="/images/approval/docbg_top.jpg"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="715" align="center" style="padding:10;border-left:1px solid #dedede;border-right:1px solid #dedede;">
|
||||
<table width="97%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td colspan="2" style="padding:0 0 10 0">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
|
||||
<tr>
|
||||
<td width="50%" align="left">
|
||||
<div id="menu1" align="center" onclick="menuChange('1')" style="background-color:#F7D172;width:100%;height:30px;vertical-align:middle;line-height:30px;cursor:pointer;color:#0000FF;font-size:15px;"><b><%=title%> <20><><EFBFBD><EFBFBD></b></div>
|
||||
</td>
|
||||
<td width="50%" align="right">
|
||||
<div id="menu2" align="center" onclick="menuChange('2')" style="background-color:#EEEEEE;width:100%;height:30px;vertical-align:middle;line-height:30px;cursor:pointer;color:#3030FF;font-size:15px;"><b><%=title2%> <20><><EFBFBD><EFBFBD></b></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#d8d8d8" height="2"></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
Dim pay_apply_username
|
||||
pay_apply_username = ""
|
||||
|
||||
set adors2 = server.CreateObject("ADODB.RECORDSET")
|
||||
query = "select p_name from person where p_no = '" & sv & "' "
|
||||
adors2.open query, adoconn, adopenstatic, adlockreadonly
|
||||
|
||||
If adors2.recordCount > 0 Then
|
||||
pay_apply_username = adors2("p_name")
|
||||
End If
|
||||
adors2.close
|
||||
%>
|
||||
<tr>
|
||||
<td colspan="2" align="center" style="padding:10 0 0 0">
|
||||
<table width="100%" cellpadding="5" cellspacing="0" border="0" style="border-collapse:collapse;">
|
||||
<tr>
|
||||
<td width="17%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ⱓ</td>
|
||||
<td width="24%" class="tit7" align="center"><font class="tahoma"><%if startDT <> "" then %><%=startDT%> ~ <%=endDT%><% else %><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><%end if %></font></td>
|
||||
<td width="17%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="42%" class="tit7" align="center"><font class="tahoma"><%=pay_apply_username%></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="17%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڵ<EFBFBD></td>
|
||||
<td width="24%" class="tit7" align="center"><font class="tahoma"><%=p_child_sn%></font></td>
|
||||
<td width="17%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><></td>
|
||||
<%
|
||||
Query = " select p_sn, p_child_sn, p_subject from v_project_method "
|
||||
Query = Query & " where p_child_sn = '" & p_child_sn & "' "
|
||||
'Response.Write query & "<BR>"
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
Dim tmp_p_subject
|
||||
tmp_p_subject = ""
|
||||
if adoRs.recordcount > 0 Then
|
||||
tmp_p_subject = adoRs("p_subject")
|
||||
End If
|
||||
adoRs.close
|
||||
%>
|
||||
<td width="42%" class="tit7" align="center"><font class="tahoma"><%=tmp_p_subject%></font></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center" style="padding:10 0 0 0">
|
||||
<table width="100%" cellpadding="5" cellspacing="0" border="0" style="border-collapse:collapse;">
|
||||
<tr><td>
|
||||
<table id="table1" width="100%" cellpadding="5" cellspacing="0" border="0" style="border-collapse:collapse;display:;">
|
||||
<tr>
|
||||
<td width="20%" class="tit2" align="center"><3E><><EFBFBD>뼼<EFBFBD><EBBCBC><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǻ<EFBFBD><C7BA><EFBFBD></td>
|
||||
<td width="20%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="20%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)</td>
|
||||
<td width="20%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD>ܾ<EFBFBD></td>
|
||||
</tr>
|
||||
<%
|
||||
Query = " select p_method_cd from T_PROJECT_METHOD where p_child_sn = '" & p_child_sn & "' "
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
if adoRs.recordcount > 0 Then
|
||||
p_method_cd = adoRs("p_method_cd")
|
||||
end if
|
||||
adoRs.close
|
||||
%>
|
||||
<%
|
||||
Query = " select p_child_sn, sebu, sum(est_money) as est_money, sum(accumulate_pay) as accumulate_pay, sum(pay) as pay "
|
||||
Query = Query & " from ( "
|
||||
Query = Query & " select p_child_sn, sebu, convert(numeric(18,0), est_money) as est_money, 0 as accumulate_pay, 0 as pay "
|
||||
Query = Query & " from ( "
|
||||
Query = Query & " select * from direct_cost where left(p_sn, 2) >= '15' and hangmok = '48' and del_yes_no = 'no' and p_child_sn = '" & p_child_sn & "' union all"
|
||||
Query = Query & " select * from direct_cost where left(p_sn, 2) >= '15' and hangmok = '49' and sebu = '<27>ص<EFBFBD><D8B5><EFBFBD>' and del_yes_no = 'no' and p_child_sn = '" & p_child_sn & "' "
|
||||
Query = Query & " ) as T1 "
|
||||
|
||||
Query = Query & " union all "
|
||||
|
||||
Query = Query & " select p_sn as p_child_sn, est_money as sebu, "
|
||||
Query = Query & " 0 as est_money, isnull("
|
||||
Query = Query & " case when s_gubun = 'FF' then s_sum - s_sum + add_money + (s_pay_unit * (s_wan + add_count)) else s_sum end"
|
||||
Query = Query & " , 0) as accumulate_pay, 0 as pay "
|
||||
Query = Query & " from t_myun_pay "
|
||||
Query = Query & " where pay_type = 2 and isnull(attribute05,'') <> '' and p_sn = '" & p_child_sn & "' "
|
||||
|
||||
Query = Query & " union all "
|
||||
|
||||
Query = Query & " select p_sn as p_child_sn, est_money as sebu, "
|
||||
Query = Query & " 0 as est_money, 0 as accumulate_pay, isnull("
|
||||
Query = Query & " case when s_gubun = 'FF' then s_sum - s_sum + add_money + (s_pay_unit * (s_wan + add_count)) else s_sum end"
|
||||
Query = Query & " , 0) as pay "
|
||||
Query = Query & " from t_myun_pay "
|
||||
Query = Query & " where pay_type = 2 and isnull(attribute05,'') = '" & krc_no & "' and p_sn = '" & p_child_sn & "' and confirm_yn = 'Y' "
|
||||
|
||||
Query = Query & " union all "
|
||||
|
||||
Query = Query & " select '" & p_child_sn & "' as p_child_sn, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' as sebu, "
|
||||
Query = Query & " 0 as est_money, isnull((select sum(s_sum - add_money - (s_pay_unit * (s_wan + add_count))) from T_MYUN_PAY where p_sn = '" & p_child_sn & "' and pay_type = 2 and isnull(attribute05,'') <> '' and s_ot = 'Y' and confirm_yn = 'Y'), 0) as accumulate_pay, 0 as pay "
|
||||
|
||||
Query = Query & " union all "
|
||||
|
||||
Query = Query & " select '" & p_child_sn & "' as p_child_sn, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' as sebu, "
|
||||
Query = Query & " 0 as est_money, 0 as accumulate_pay, isnull((select sum(s_sum - add_money - (s_pay_unit * (s_wan + add_count))) from T_MYUN_PAY where p_sn = '" & p_child_sn & "' and pay_type = 2 and isnull(attribute05,'') = '" & krc_no & "' and s_ot = 'Y' and confirm_yn = 'Y'),'0') as pay "
|
||||
|
||||
Query = Query & " union all "
|
||||
|
||||
Query = Query & " SELECT CONVERT(varchar, target10) AS p_sn, DC.d_cost_name, "
|
||||
Query = Query & " 0 AS est_money, sum(CONVERT(NUMERIC(18, 0), CONVERT(varchar, target5))) AS accumulate_pay, "
|
||||
Query = Query & " 0 AS pay "
|
||||
Query = Query & " FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> M LEFT JOIN direct_costcode DC ON CONVERT(integer, CONVERT(varchar, M.target12)) = DC.id "
|
||||
Query = Query & " WHERE del_yes_no='no' AND (target11 LIKE '48' OR (target11 LIKE '49' AND target12 LIKE '77')) "
|
||||
Query = Query & " AND CONVERT(varchar, target10) = '" & p_child_sn & "' "
|
||||
Query = Query & " GROUP BY CONVERT(varchar, target10), DC.d_cost_name "
|
||||
|
||||
Query = Query & " ) as T2 "
|
||||
Query = Query & " group by p_child_sn, sebu "
|
||||
Query = Query & " order by est_money desc "
|
||||
|
||||
'Response.Write query & "<BR>"
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
Dim total_estimate_money, total_currentMoney, total_Pay, total_chaPay
|
||||
total_estimate_money = 0
|
||||
total_currentMoney = 0
|
||||
total_Pay = 0
|
||||
total_chaPay = 0
|
||||
|
||||
Dim minus_money_flag, dataCount
|
||||
dataCount = 0
|
||||
if adoRs.recordcount > 0 Then
|
||||
dataCount = adoRs.recordcount
|
||||
do while not adoRs.eof
|
||||
'-- <20>̻<EFBFBD><CCBB><EFBFBD> if p_method_cd <> "2" and adoRs("sebu") = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" Then '-- <20>ش<EFBFBD><D8B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȳ<EFBFBD><C8B3><EFBFBD><EFBFBD><EFBFBD> <20><>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ұ<EFBFBD><D2B0><EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)<29><> <20>ּ<EFBFBD>ó<EFBFBD><C3B3> <20>Ұ<EFBFBD>!!(20171217) --> <20>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
'-- <20>̻<EFBFBD><CCBB><EFBFBD> else
|
||||
%>
|
||||
<tr>
|
||||
<td class="tit7" align="center" ><font class="tahoma"><%=adoRs("sebu")%></font></td>
|
||||
<td class="tit7" align="right" ><font class="tahoma"><%=FormatNumber(CDbl(adoRs("pay")), 0)%></font></td>
|
||||
<td class="tit7" align="right" ><font class="tahoma"><%=FormatNumber(CDbl(adoRs("est_money")), 0)%></font></td>
|
||||
<td class="tit7" align="right" ><font class="tahoma"><%=FormatNumber(CDbl(adoRs("accumulate_pay")), 0)%></font></td>
|
||||
<td class="tit7" align="right" >
|
||||
<% chaPay = CDbl(adoRs("est_money")) - CDbl(adoRs("accumulate_pay")) %>
|
||||
<font class="tahoma" <% if CDbl(chaPay) < 0 then %> color="red" <% end if %>><%=FormatNumber(CDbl(chaPay), 0)%></font></td>
|
||||
<%
|
||||
total_estimate_money = total_estimate_money + CDbl(adoRs("est_money"))
|
||||
total_currentMoney = total_currentMoney + CDbl(adoRs("accumulate_pay"))
|
||||
total_Pay = total_Pay + CDbl(adoRs("pay"))
|
||||
total_chaPay = total_chaPay + CDbl(chaPay)
|
||||
%>
|
||||
</tr>
|
||||
<%
|
||||
'-- <20>̻<EFBFBD><CCBB><EFBFBD> end if
|
||||
adoRs.movenext
|
||||
loop
|
||||
end if
|
||||
adoRs.close
|
||||
%>
|
||||
<tr>
|
||||
<td align="center" class="tit2"><font class="tahoma"><3E>հ<EFBFBD></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"><%=FormatNumber(total_Pay, 0)%></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"><%=FormatNumber(total_estimate_money, 0)%></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"><%=FormatNumber(total_currentMoney, 0)%></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"><%=FormatNumber(total_chaPay, 0)%></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="5"><font class="tahoma" color="red"><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ܾ<EFBFBD><DCBE><EFBFBD> <20>ٸ<EFBFBD><D9B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type=hidden name = "dataCount" value='<%=dataCount%>'>
|
||||
<table id="table2" width="100%" cellpadding="5" cellspacing="0" border="0" style="border-collapse:collapse;display:none;">
|
||||
<tr>
|
||||
<td colspan="10" ><3E>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> [<span style="background-color:#F6CEF5;"><3E><><EFBFBD><EFBFBD></span>] <20><> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Դϴ<D4B4>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="10%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="10%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="9%" class="tit2" align="center"><3E>μ<EFBFBD>/<2F>ϴ<EFBFBD></td>
|
||||
<td width="10%" class="tit2" align="center"><3E>ܰ<EFBFBD></td>
|
||||
<td width="11%" class="tit2" align="center">TOK(<28><> <20><>)</td>
|
||||
<td width="10%" class="tit2" align="center"><3E>߰<EFBFBD><DFB0>μ<EFBFBD></td>
|
||||
<td width="11%" class="tit2" align="center"><3E>߰<EFBFBD><DFB0><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="10%" class="tit2" align="center"><%if p_method_cd = "1" then %><3E>߰<EFBFBD>(TS)<% else %><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><% end if %></td>
|
||||
<td width="11%" class="tit2" align="center"><3E>հ<EFBFBD></td>
|
||||
<td width="8%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
Query = " select m_name, m_jumin, sum(s_wan) as s_wan, s_pay_unit, count(*) as day_cnt, isnull(money_type, case when T.s_gubun = 'ETC' then '<27><>Ÿ' else '' end) as money_type, SUM(food_cost) as food_cost, SUM(s_sum) as s_sum, sum(add_count) as add_count, sum(add_money) as add_money, sum(total_sum) as total_sum, sum(nw_cnt) as nw_cnt from "&VbCrlf
|
||||
Query = Query & " (select m_name, left(m_jumin,6) as m_jumin, s_wan, s_pay_unit, money_type, s_gubun, "&VbCrlf
|
||||
Query = Query & " case when money_type = '<27>μ<EFBFBD>' and lunch = 'Y' then 5000 else 0 end + case when money_type = '<27>μ<EFBFBD>' and dinner = 'Y' then 5000 else 0 end + "&VbCrlf
|
||||
Query = Query & " case when isnull(s_ot,'N') <> 'N' then s_sum - (s_pay_unit * (add_count + s_wan) + add_money) else 0 end as food_cost, "&VbCrlf
|
||||
Query = Query & " s_sum - (case when money_type = '<27>μ<EFBFBD>' and lunch = 'Y' then 5000 else 0 end + case when money_type = '<27>μ<EFBFBD>' and dinner = 'Y' then 5000 else 0 end + "&VbCrlf
|
||||
Query = Query & " case when isnull(s_ot,'N') <> 'N' then s_sum - (s_pay_unit * (add_count + s_wan) + add_money) else 0 end ) - (s_pay_unit * add_count) - add_money as s_sum , isnull(add_count,'0') as add_count, add_money, s_sum as total_sum, isnull(nwc.nw_cnt, 0) as nw_cnt "&VbCrlf
|
||||
Query = Query & " from T_MYUN_PAY TMP "&VbCrlf
|
||||
Query = Query & " left outer join ( "&VbCrlf
|
||||
Query = Query & " SELECT neakeun_name, LEFT(neakeun_jumin, 6) as neakeun_jumin, date, COUNT(*) as nw_cnt "&VbCrlf
|
||||
Query = Query & " FROM neakeun_work "&VbCrlf
|
||||
Query = Query & " GROUP BY neakeun_name, LEFT(neakeun_jumin, 6), date "&VbCrlf
|
||||
Query = Query & " ) nwc on TMP.m_name = nwc.neakeun_name AND LEFT(TMP.m_jumin, 6) = nwc.neakeun_jumin AND TMP.work_dt = nwc.date "&VbCrlf
|
||||
Query = Query & " where pay_type = 2 and isnull(attribute05,'') = '" & krc_no & "' and p_sn = '" & p_child_sn & "' and confirm_yn = 'Y' ) T "&VbCrlf
|
||||
Query = Query & " group by m_name, m_jumin, s_pay_unit, money_type, s_gubun "&VbCrlf
|
||||
Query = Query & " order by m_name, money_type, s_pay_unit "&VbCrlf
|
||||
'Response.Write query & "<BR>"
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
dim total_s_wan
|
||||
dim total_food_cost, total_total_sum, total_add_count, total_add_money
|
||||
total_s_wan = 0
|
||||
total_food_cost = 0
|
||||
total_total_sum = 0
|
||||
total_add_count = 0
|
||||
total_add_money = 0
|
||||
|
||||
if adoRs.recordcount > 0 Then
|
||||
do while not adoRs.eof
|
||||
%>
|
||||
<tr>
|
||||
<td class="tit7" align="center" <% if cint(adoRs("nw_cnt")) <> 0 then %> style="background-color:#F6CEF5;" <% end if %>><font class="tahoma"><%=adoRs("m_name") %></font></td>
|
||||
<td class="tit7" align="center" <% if cint(adoRs("nw_cnt")) <> 0 then %> style="background-color:#F6CEF5;" <% end if %>><font class="tahoma"><%=adoRs("m_jumin") %></font></td>
|
||||
<td class="tit7" align="center" <% if cint(adoRs("nw_cnt")) <> 0 then %> style="background-color:#F6CEF5;" <% end if %>><font class="tahoma" <%if adoRs("money_type") = "<22>ϴ<EFBFBD>" then %> color="blue" <% end if %>><%=adoRs("money_type") %></font></td>
|
||||
<td class="tit7" align="right" <% if cint(adoRs("nw_cnt")) <> 0 then %> style="background-color:#F6CEF5;" <% end if %>><font class="tahoma"><%=FormatNumber(adoRs("s_pay_unit"), 0) %></font></td>
|
||||
<td class="tit7" align="right" <% if cint(adoRs("nw_cnt")) <> 0 then %> style="background-color:#F6CEF5;" <% end if %>><font class="tahoma"><% if adoRs("money_type") <> "<22>ϴ<EFBFBD>" then %><%=FormatNumber(adoRs("s_wan"), 1) %><%else %><%= FormatNumber(adoRs("day_cnt"), 0)%><% end if %></font></td>
|
||||
<td class="tit7" align="right" <% if cint(adoRs("nw_cnt")) <> 0 then %> style="background-color:#F6CEF5;" <% end if %>><font class="tahoma"><% if adoRs("money_type") <> "<22>ϴ<EFBFBD>" then %><%=FormatNumber(adoRs("add_count"), 0) %><% end if %></font></td>
|
||||
<td class="tit7" align="right" <% if cint(adoRs("nw_cnt")) <> 0 then %> style="background-color:#F6CEF5;" <% end if %>><font class="tahoma"><%=FormatNumber(adoRs("add_money"), 0) %></font></td>
|
||||
<td class="tit7" align="right" <% if cint(adoRs("nw_cnt")) <> 0 then %> style="background-color:#F6CEF5;" <% end if %>><font class="tahoma"><% if adoRs("money_type") <> "<22>ϴ<EFBFBD>" then %><%=FormatNumber(adoRs("food_cost"), 0) %><% end if %></font></td>
|
||||
<td class="tit7" align="right" <% if cint(adoRs("nw_cnt")) <> 0 then %> style="background-color:#F6CEF5;" <% end if %>><font class="tahoma"><%=FormatNumber(adoRs("total_sum"), 0) %></font></td>
|
||||
<td class="tit7" align="center" <% if cint(adoRs("nw_cnt")) <> 0 then %> style="background-color:#F6CEF5;" <% end if %>><font class="tahoma"><%if FormatNumber(adoRs("add_count"), 0) <> 0 OR FormatNumber(adoRs("add_money"), 0) <> 0 then %><a href="javascript:detail_reason('<%=adoRs("m_name") %>', '<%=adoRs("m_jumin") %>', '<%= krc_no %>', '<%= p_child_sn %>');"><3E><><EFBFBD><EFBFBD></a><%else %><3E><><EFBFBD><EFBFBD><%end if %></font></td>
|
||||
</tr>
|
||||
<%
|
||||
total_s_wan = total_s_wan + cdbl(adoRs("s_wan"))
|
||||
total_food_cost = total_food_cost + cdbl(adoRs("food_cost"))
|
||||
total_total_sum = total_total_sum + cdbl(adoRs("total_sum"))
|
||||
total_add_count = total_add_count + cdbl(adoRs("add_count"))
|
||||
total_add_money = total_add_money + cdbl(adoRs("add_money"))
|
||||
|
||||
adoRs.movenext
|
||||
loop
|
||||
end if
|
||||
adoRs.close
|
||||
%>
|
||||
<tr>
|
||||
<td align="center" class="tit2" colspan="4"><font class="tahoma"><3E>հ<EFBFBD></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"><%=FormatNumber(total_s_wan, 1)%></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"><%=FormatNumber(total_add_count, 0)%></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"><%=FormatNumber(total_add_money, 0)%></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"><%=FormatNumber(total_food_cost, 0)%></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"><%=FormatNumber(total_total_sum, 0)%></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"> </font></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center" style="padding:15 0 5 0"><!-- #include virtual= "approval/inc_logo.asp" --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="/images/approval/docbg_btm.jpg"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user