96 lines
4.0 KiB
Plaintext
96 lines
4.0 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<%
|
|
set dbin = server.CreateObject("ADODB.CONNECTION")
|
|
|
|
dbin.Open adoConn
|
|
|
|
Dim add_count
|
|
Dim add_money
|
|
DIm s_pay_unit
|
|
Dim s_ot_pay
|
|
DIm est_money
|
|
'response.Write "cnt : " & request("cnt") &"<BR>"
|
|
|
|
p_field_date_st = request("p_field_date_st")
|
|
p_field_date_end = request("p_field_date_end")
|
|
p_child_sn = request("p_child_sn")
|
|
|
|
|
|
for i=1 to request("record_cnt") + 30
|
|
d_order_cnt = request("approvalYN_" & cstr(i))
|
|
'response.Write "---------------------------------------------------------------------------"&"<BR>"
|
|
'response.Write "i : "& i & "<BR>"
|
|
'response.Write "d_order_cnt : " & request("d_order_cnt")(i) & "<BR>"
|
|
'response.Write "add_count : " & request("add_count")(i) & "<BR>"
|
|
'response.Write "add_count_memo : " & request("add_count_memo")(i) & "<BR>"
|
|
'response.Write "chk_work_confirm : " & request("chk_work_confirm_"&i) & "<BR>"
|
|
|
|
if (d_order_cnt = "결재 반려" OR d_order_cnt = "" OR isnull(d_order_cnt)) and request("txtName_"&i) <> "" then
|
|
s_pay_unit = 0
|
|
s_ot_pay = 0
|
|
|
|
If Trim(request("add_money_"&i)) = "" Then
|
|
add_money = 0
|
|
Else
|
|
add_money = Cstr(request("add_money_"&i))
|
|
End if
|
|
|
|
if request("s_pay_unit_" & i) = "" then
|
|
s_pay_unit = 0
|
|
else
|
|
s_pay_unit = replace(request("s_pay_unit_" & i),",","")
|
|
end if
|
|
|
|
if request("count_" & i) = "" then
|
|
count = 0
|
|
else
|
|
count = request("count_" & i)
|
|
end if
|
|
|
|
'원인 파악 전까지는 update X
|
|
if request("id_"&i) <> "" then
|
|
query = " update T_MYUN_PAY "
|
|
query = query & " set p_sn = '" & p_child_sn & "', money_type = '" & request("workType_"&i) & "', m_name = '" & request("txtName_"&i) & "', "
|
|
query = query & " m_jumin = '" & request("txtJumin_"&i) & "', work_dt = '" & request("work_date_"&i) & "', "
|
|
query = query & " est_money = '" & request("est_money_"&i) & "', s_pay_unit = '" & s_pay_unit & "', "
|
|
query = query & " s_wan = '" & count & "', s_sum = '" & (cdbl(count) * cdbl(s_pay_unit)) + cdbl(add_money) & "', "
|
|
query = query & " confirm_yn = '" & request("confirm_"&i) & "', add_money = '" & add_money & "', "
|
|
query = query & " add_money_memo = '" & request("add_money_memo_"&i) & "', insert_dt = getdate() "
|
|
query = query & " where id = '"& request("id_"&i) &"' "
|
|
Else
|
|
query = " insert into T_MYUN_PAY( "
|
|
query = query & " pay_type, p_sn, money_type, m_name, m_jumin, work_dt, s_gubun, s_pay_unit, s_wan, "
|
|
query = query & " s_sum, confirm_yn, est_money, add_money, add_money_memo, insert_dt, insert_user "
|
|
query = query & " ) values ( "
|
|
query = query & " '2', '" & p_child_sn & "', '" & request("workType_"&i) & "', '" & request("txtName_"&i) & "', '" & request("txtJumin_"&i) & "'"
|
|
query = query & " , '" & request("work_date_"&i) & "', "
|
|
query = query & " 'ETC', "
|
|
query = query & " '" & s_pay_unit & "', "
|
|
query = query & " '" & count & "', "
|
|
query = query & " '" & (cdbl(count) * cdbl(s_pay_unit)) + cdbl(add_money) & "', '" & request("confirm_"&i) & "', '" & request("est_money_"&i) & "', "
|
|
query = query & " '" & add_money & "', '" & request("add_money_memo_"&i) & "', getdate(), '" & Session("User_Number") & "') "
|
|
end if
|
|
|
|
'response.Write query & "<BR>"
|
|
dbin.Execute query
|
|
END if
|
|
next
|
|
|
|
dbin.Close
|
|
%>
|
|
<html>
|
|
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
|
|
<script>
|
|
function goit() {
|
|
alert('저장되었습니다');
|
|
document.pms.action = 'etc_confirm.asp?p_child_sn=<%=p_child_sn %>';
|
|
document.pms.submit();
|
|
}
|
|
</script>
|
|
<body onLoad="goit()">
|
|
<form name="pms" method="post">
|
|
<input type="hidden" name="p_subject" value="<%=request("p_subject") %>" />
|
|
</form>
|
|
</body>
|
|
</html>
|