Files
KIN/ess/direct_cost_print_2014_ajax.asp
2025-09-29 17:55:08 +09:00

134 lines
5.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- #include virtual = "lib/config.asp" -->
<%
Response.CharSet="euc-kr"
Session.codepage="949"
Response.codepage="949"
Response.ContentType="text/html;charset=euc-kr"
Dim url
Dim x
Dim p_sn : p_sn = Request("p_sn")
Dim hangmok : hangmok = Request("sebu_hangmok")
Dim sebu : sebu = Request("sebu_name")
If hangmok = "¸éÁ¢¿øÀΰǺñ" OR sebu = "ÇØµ¶¿ø" Then
url = "/ess/doc_myun_pay_print2.asp"
x="2"
Else
url = "/ess/doc_myun_pay_print.asp"
x=""
End If
%>
<script type="text/javascript">
var agent = navigator.userAgent.toLowerCase();
var chromeChk = false;
if (agent.indexOf("chrome") != -1) {
chromeChk = true;
}
$(document).ready(function () {
//console.log($("inpit[name=minus_money_flag]"));
$(".d_no").each(function () {
$(this).mouseover(function () {
$(this).css("color", "blue");
$(this).css("font-weight", "bold");
});
$(this).mouseout(function () {
$(this).css("color", "");
$(this).css("font-weight", "");
});
$(this).click(function () {
$("#m_d_no *").remove();
var d_no = $(this).text().replace(' ', '');
if (d_no.indexOf('-i-') > 0) {
var url = "doc_expense_print_2014.asp";
} else {
var url = "<%=url %>";
var x = "<%=x %>";
}
var view_chk = "1";
var title_type = "undefined";
url = url + "?d_no=" + d_no + "&view_chk=" + view_chk + "&x=" + x + "&title_type+" + title_type;
if(chromeChk == false){
window.open(url,'','left=0,top=0,width=1000,height=1000,scrollbars=yes,resizable=yes');
return;
}
$.ajax({
url: url,
type: "get",
contentType: 'application/x-www-form-urlencoded; charset=euc-kr',
data:
{
"p_child_sn": "<%=p_child_sn %>",
"startDT": "<%=startDT %>",
"endDT": "<%=endDT %>",
"sv": "<%=sv %>",
"pay_type": "<%=pay_type %>",
"cost_type": "<%=cost_type %>",
"krc_no": "<%=krc_no %>"
},
success: function (response, textStatus, jqXHR) {
$("#m_d_no").append(response);
},
error: function (error) {
console.log(error);
alert("Web Service Error.");
}
});
});
});
});
</script>
<table width="100%" cellpadding="2" cellspacing="0" border="1" style="border-collapse:collapse;text-align:center;">
<tbody>
<tr>
<td >ÇÁ·ÎÁ§Æ®ÄÚµå</td>
<td >´ã´çS/V</td>
<td >¼¼ºÎ³»¿ë</td>
<td >¹®¼­¹øÈ£</td>
<td >°ø±Þ°¡¾×</td>
</tr>
<%
SQL = ""
SQL = SQL & " select a.p_sn, a.p_name, a.sebu, a.attribute05, sum(a.d_cost) as d_cost from "&VbCrlf
SQL = SQL & " ( "&VbCrlf
SQL = SQL & " select sum(s_sum) as d_cost, p_sn, (select p_name from person where p_no=insert_user) as p_name, s_gubun as sebu, attribute05 "&VbCrlf
SQL = SQL & " from T_NEAKEUN_PAY where attribute01 in (select cast(id as varchar) from neakeun_work) "&VbCrlf
SQL = SQL & " GROUP BY p_sn, insert_user, s_gubun, attribute05 "&VbCrlf
SQL = SQL & " union all "&VbCrlf
SQL = SQL & " select sum(s_sum) as d_cost, p_sn, (select p_name from person where p_no=insert_user) as p_name, est_money as sebu,attribute05 "&VbCrlf
SQL = SQL & " from T_MYUN_PAY where confirm_yn='Y' "&VbCrlf
SQL = SQL & " GROUP BY p_sn, insert_user, est_money, attribute05 "&VbCrlf
SQL = SQL & " union all "&VbCrlf
SQL = SQL & " select cast(target5 as varchar) as d_cost, cast(target10 as varchar) as p_sn, login_À̸§ as p_name, (select d_cost_name from direct_costcode where id in (cast(cast(target12 as varchar) as int ))) as sebu, ¹®¼­¹øÈ£ as attribute05 "&VbCrlf
SQL = SQL & " from ¹®¼­³»¿ë where ¹®¼­Á¦¸ñ='ÁöÃâ°áÀǼ­' and del_yes_no = 'no' and cast(target10 as varchar) <> '' "&VbCrlf
SQL = SQL & " ) a "&VbCrlf
SQL = SQL & " where a.p_sn = '" & p_sn & "' and a.sebu = '" & sebu & "' "&VbCrlf
SQL = SQL & " group by a.p_sn, a.p_name, a.sebu, a.attribute05 "&VbCrlf
SQL = SQL & " order by a.p_name, a.attribute05 "
'Response.Write sql
adoRs.Open SQL, adoconn, 1
while not adoRs.eof
%>
<tr>
<td ><%=adoRs("p_sn") %></td>
<td ><%=adoRs("p_name") %></td>
<td ><%=adoRs("sebu") %></td>
<td ><span class="d_no" style="cursor:pointer;"><%=adoRs("attribute05") %></span></td>
<td ><%=formatnumber(adoRs("d_cost"), 0) %> ¿ø</td>
</tr>
<%
adoRs.movenext
wend
adoRs.close
%>
</tbody>
</table>
<br /><br />
<div id="m_d_no"></div>