최초커밋
This commit is contained in:
117
business/busi_approval_ok.asp
Normal file
117
business/busi_approval_ok.asp
Normal file
@@ -0,0 +1,117 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<!-- #include virtual = "lib/json2.asp" -->
|
||||
<%
|
||||
Response.CharSet = "EUC-KR" '<27>ѱ<EFBFBD>
|
||||
Response.AddHeader "Pragma","no-cache"
|
||||
Response.AddHeader "cache-control", "no-staff"
|
||||
Response.Expires = -1
|
||||
|
||||
dim info : set info = JSON.parse(request("data"))
|
||||
dim query, d_no, tmpstr, tmp, tmp2, tmp_i
|
||||
dim d_order_cnt, d_orders, target99, target100
|
||||
dim executeCount : executeCount = 0
|
||||
|
||||
d_no = info.d_no
|
||||
|
||||
query = "SELECT * "
|
||||
query = query & "FROM Document as a "
|
||||
query = query & " INNER JOIN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as b on a.d_no = b.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ "
|
||||
query = query & "WHERE a.d_no='" & d_no & "' "
|
||||
|
||||
adors.Open query, adoConn, 1
|
||||
if adors.RecordCount > 0 then
|
||||
'----------------------------------------------------
|
||||
tmp = split(adors("target99"), "^^")
|
||||
for i = 0 to ubound(tmp)
|
||||
if trim(tmp(i)) = "" then
|
||||
tmp(i) = Session("loginuser") & "<BR>" & replace(date(), "-", "") & "<BR>" & Session("User_Number")
|
||||
tmp_i = i
|
||||
exit for
|
||||
end if
|
||||
next
|
||||
'----------------------------------------------------
|
||||
'target100<30><30> <20><>¥ <20><><EFBFBD><EFBFBD>
|
||||
tmp2 = split(adors("target100"), "^^")
|
||||
tmp2(tmp_i) = month(now()) & " / " & day(now())
|
||||
'----------------------------------------------------
|
||||
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD> <20><><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0><EFBFBD><EFBFBD> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>
|
||||
tmp_i = tmp_i + 1
|
||||
|
||||
for i = int(adors("d_order_cnt")) + 1 to ubound(tmp) + 1
|
||||
if adors("d_order" & i) = "<22><><EFBFBD><EFBFBD>" or adors("d_order" & i) = "NO" then
|
||||
tmp_order_value = "<22><><EFBFBD><EFBFBD>"
|
||||
|
||||
if adors("d_order" & i) = "<22><><EFBFBD><EFBFBD>" then
|
||||
tmp_1 = "1"
|
||||
else
|
||||
tmp_1 = "0"
|
||||
end if
|
||||
|
||||
if tmp_1 = "1" then
|
||||
tmp(tmp_i) = tmp_order_value
|
||||
tmp_i = tmp_i + 1
|
||||
end if
|
||||
else
|
||||
d_order_cnt = i
|
||||
d_orders = adors("d_order" & i)
|
||||
exit for
|
||||
end if
|
||||
next
|
||||
|
||||
'<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD>
|
||||
if i > ubound(tmp) + 1 then
|
||||
d_order_cnt = "77"
|
||||
d_orders = adors("login_p_no")
|
||||
end if
|
||||
|
||||
target99 = ""
|
||||
for i = 0 to ubound(tmp)
|
||||
if i <> 0 then
|
||||
target99 = target99 & "^^"
|
||||
end if
|
||||
target99 = target99 & tmp(i)
|
||||
next
|
||||
|
||||
target100 = ""
|
||||
for i = 0 to ubound(tmp2)
|
||||
if i <> 0 then
|
||||
target100 = target100 & "^^"
|
||||
end if
|
||||
target100 = target100 & tmp2(i)
|
||||
next
|
||||
|
||||
query = " UPDATE Document "
|
||||
query = query & " SET "
|
||||
query = query & " d_order_cnt = '" & d_order_cnt & "', "
|
||||
query = query & " d_orders = '" & d_orders & "' "
|
||||
query = query & " WHERE d_no = '" & d_no & "' "
|
||||
query = query & " OR d_no IN ( "
|
||||
query = query & " SELECT DISTINCT d_no "
|
||||
query = query & " FROM V_GROUP_COST_NEW "
|
||||
query = query & " WHERE cost_date BETWEEN '" & adors("target3") & "' AND '" & adors("target4") & "' "
|
||||
query = query & " AND p_no = '" & adors("login_p_no") & "' "
|
||||
query = query & " ); "
|
||||
query = query & " UPDATE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
|
||||
query = query & " SET "
|
||||
query = query & " target99 = '" & target99 & "', "
|
||||
query = query & " target100 = '" & target100 & "' "
|
||||
query = query & " WHERE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = '" & d_no & "' "
|
||||
query = query & " OR <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ IN ( "
|
||||
query = query & " SELECT DISTINCT d_no "
|
||||
query = query & " FROM V_GROUP_COST_NEW "
|
||||
query = query & " WHERE cost_date BETWEEN '" & adors("target3") & "' AND '" & adors("target4") & "' "
|
||||
query = query & " AND p_no = '" & adors("login_p_no") & "' "
|
||||
query = query & " ) "
|
||||
|
||||
adoconn.execute query, executeCount
|
||||
End if
|
||||
|
||||
Response.Clear
|
||||
if executeCount > 0 then
|
||||
Response.Write "1"
|
||||
else
|
||||
Response.Write "0"
|
||||
end if
|
||||
adors.Close
|
||||
|
||||
%>
|
||||
Reference in New Issue
Block a user