최초커밋
This commit is contained in:
996
approval/doc_myun_pay_print2.asp
Normal file
996
approval/doc_myun_pay_print2.asp
Normal file
@@ -0,0 +1,996 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<%
|
||||
''//=====================
|
||||
''//=====================
|
||||
''2013<31><33> 9<><39> 27<32><37><EFBFBD>ڷ<EFBFBD>
|
||||
' <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ǽ<EFBFBD><C7BC><EFBFBD> <20>Աݰ<D4B1><DDB0>Ǽ<EFBFBD><C7BC><EFBFBD> <20>߰<EFBFBD><DFB0>Ͽ<EFBFBD> 2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
'' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> titie<69><65> title_type<70><65> <20><><EFBFBD><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 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 print_type '1:<3A><><EFBFBD><EFBFBD>, 2:<3A><>¥<EFBFBD><C2A5><EFBFBD><EFBFBD>Ʈ
|
||||
dim db_table_name
|
||||
dim approval_chk
|
||||
dim title_type
|
||||
dim p_sn
|
||||
dim d_p_subject
|
||||
dim d_p_child_sn
|
||||
dim d_estimate_money
|
||||
dim d_currentMoney
|
||||
dim d_totalPay
|
||||
dim d_chaPay
|
||||
dim d_sotPay
|
||||
|
||||
db_table_name = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
approval_chk = "true"
|
||||
|
||||
pay_type = request("pay_type")
|
||||
startDT = request("startDT")
|
||||
endDT = request("endDT")
|
||||
sv = request("sv")
|
||||
print_type = request("print_type")
|
||||
p_sn = request("p_sn")
|
||||
|
||||
' response.write "pay_type : " & request("pay_type") & "<br>"
|
||||
' response.write "startDT : " & request("startDT") & "<br>"
|
||||
' response.write "endDT : " & request("endDT") & "<br>"
|
||||
' response.write "print_type : " & request("print_type") & "<br>"
|
||||
dim pay_month
|
||||
dim key_day
|
||||
|
||||
if Session("loginuser") = "<22>Ż<EFBFBD><C5BB><EFBFBD>" or Session("loginuser") = "<22>翵<EFBFBD><E7BFB5>" then
|
||||
sql = "select ver as key_day from information where program='<27><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Է±<D4B7><C2B1>س<EFBFBD><D8B3><EFBFBD>(<28>濵<EFBFBD><E6BFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)'"
|
||||
elseif Session("loginuser") = "<22><>ȫ<EFBFBD><C8AB>" then
|
||||
sql = "select ver as key_day from information where program='<27><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Է±<D4B7><C2B1>س<EFBFBD><D8B3><EFBFBD>(<28><>ȫ<EFBFBD>ٸ<EFBFBD>)'"
|
||||
else
|
||||
sql = "select ver as key_day from information where program='<27><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Է±<D4B7><C2B1>س<EFBFBD><D8B3><EFBFBD>(<28>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)'"
|
||||
end if
|
||||
rsc.open sql, adoConn,adopenstatic, adlockreadonly
|
||||
key_day = rsc.fields("key_day")
|
||||
rsc.close
|
||||
|
||||
|
||||
if cint(day(date)) >= 1 and cint(day(date)) <= cint(key_day) then '1<><31> <20><><EFBFBD><EFBFBD> 5<><35> <20><><EFBFBD≯<EFBFBD> <20><><EFBFBD>ᳯ¥<E1B3AF><C2A5> <20>ݹ<EFBFBD><DDB9><EFBFBD> 5<><35><EFBFBD>ΰ<EFBFBD> ã<><C3A3>
|
||||
if cint(month(date)) = 1 then '1<><31> <20≯<EFBFBD> <20><><EFBFBD> 12<31><32> <20>ڷ<EFBFBD>
|
||||
'<27><><EFBFBD><EFBFBD> <20>Է½<D4B7> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><>¥~! <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>¥<EFBFBD><C2A5> <20>ȴ<EFBFBD>~!
|
||||
pay_month = year(date) & "-01-15"
|
||||
else
|
||||
'<27><><EFBFBD><EFBFBD> <20>Է½<D4B7> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><>¥~! <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>¥<EFBFBD><C2A5> <20>ȴ<EFBFBD>~!
|
||||
pay_month = year(date) & "-" & zeroformat(month(date),2) & "-15"
|
||||
end If
|
||||
else
|
||||
if cint(month(date)) = 12 then '12<31><32> <20≯<EFBFBD> <20><><EFBFBD>ᳯ¥<E1B3AF><C2A5> <20><><EFBFBD><EFBFBD><EFBFBD> 1<><31>5<EFBFBD><35> <20>ΰ<EFBFBD> ã<><C3A3>
|
||||
'<27><><EFBFBD><EFBFBD> <20>Է½<D4B7> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><>¥~! <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>¥<EFBFBD><C2A5> <20>ȴ<EFBFBD>~!
|
||||
pay_month = year(date) + 1 & "-01-15"
|
||||
Else
|
||||
'<27><><EFBFBD><EFBFBD> <20>Է½<D4B7> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><>¥~! <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>¥<EFBFBD><C2A5> <20>ȴ<EFBFBD>~!
|
||||
pay_month = year(date) & "-" & zeroformat(month(date)+1,2) & "-15"
|
||||
end If
|
||||
end if
|
||||
|
||||
If pay_type = 1 Then
|
||||
title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>"
|
||||
Else
|
||||
title="<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>"
|
||||
End if
|
||||
|
||||
|
||||
If cint(print_type) = 0 Then
|
||||
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
|
||||
tmp_d_order_cnt = rsc("d_order_cnt")
|
||||
startDT = rsc("target10")
|
||||
endDT = rsc("target11")
|
||||
overMoney_reason = rsc("target17")
|
||||
End if
|
||||
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><>"
|
||||
|
||||
''//===============
|
||||
''ȸ<><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>"
|
||||
|
||||
tmp_txt1 = request("tmp_txt1")
|
||||
tmp_txt2 = request("tmp_txt2")
|
||||
tmp_txt3 = request("tmp_txt3")
|
||||
tmp_txt4 = request("tmp_txt4")
|
||||
tmp_txt5 = request("tmp_txt5")
|
||||
tmp_txt6 = request("tmp_txt6")
|
||||
tmp_txt7 = request("tmp_txt7")
|
||||
tmp_txt8 = request("tmp_txt8")
|
||||
tmp_txt9 = request("tmp_txt9")
|
||||
tmp_txt10 = request("tmp_txt10")
|
||||
|
||||
' Response.Write "tmp_txt1 : " & tmp_txt1 & "<BR>"
|
||||
' Response.Write "tmp_txt2 : " & tmp_txt2 & "<BR>"
|
||||
' Response.Write "tmp_txt3 : " & tmp_txt3 & "<BR>"
|
||||
' Response.Write "tmp_txt4 : " & tmp_txt4 & "<BR>"
|
||||
' Response.Write "tmp_txt5 : " & tmp_txt5 & "<BR>"
|
||||
' Response.Write "tmp_txt6 : " & tmp_txt6 & "<BR>"
|
||||
' Response.Write "tmp_txt7 : " & tmp_txt7 & "<BR>"
|
||||
' Response.Write "tmp_txt8 : " & tmp_txt8 & "<BR>"
|
||||
' Response.Write "tmp_txt9 : " & tmp_txt9 & "<BR>"
|
||||
' Response.Write "tmp_txt10 : " & tmp_txt10 & "<BR>"
|
||||
|
||||
if cint(print_type) = 2 then
|
||||
'<27><><EFBFBD><EFBFBD> <20><> <20><> <20><> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ <20><><EFBFBD><EFBFBD>
|
||||
''///===============
|
||||
''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ <20><><EFBFBD><EFBFBD>
|
||||
Query = "select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ as krc_no from <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
|
||||
query = query & " where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ like 'KRC-" & year(date) & "-t-%' "
|
||||
query = query & " and substring(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ,5,4) = '" & year(date) & "' "
|
||||
query = query & " order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ"
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
if adoRs.recordcount <= 0 then
|
||||
krc_no = 0
|
||||
else
|
||||
adoRs.movelast
|
||||
tmpstr = split(trim(adoRs("krc_no")),"-")
|
||||
krc_no = tmpstr(3)
|
||||
end If
|
||||
|
||||
adoRs.close
|
||||
krc_no = int(krc_no) + 1
|
||||
tmpstr = "KRC-" & year(date) & "-"
|
||||
tmpstr = tmpstr & "t-"
|
||||
krc_no = tmpstr & ZeroFormat(krc_no,5)
|
||||
'Response.Write "krc_no : " & krc_no & "<BR>"
|
||||
|
||||
tmp_p_sn = split(gap(9),",")
|
||||
|
||||
target97 = user_name(1) & "^^" & user_name(2) & "^^" & user_name(3) & "^^" & user_name(4)
|
||||
target98 = Company(1) & "^^" & Company(2) & "^^" & Company(3) & "^^" & Company(4) & "^^" & Company(5) & "^^" & Company(6)
|
||||
'====================================================================
|
||||
dataCount = request("dataCount")
|
||||
overMoney_reason = ""
|
||||
d_estimate_money = ""
|
||||
d_currentMoney = ""
|
||||
d_totalPay = ""
|
||||
d_chaPay = ""
|
||||
d_p_child_sn = ""
|
||||
d_p_subject = ""
|
||||
|
||||
Dim overMoney_reason_count
|
||||
overMoney_reason_count = 0
|
||||
|
||||
For i = 1 To request("overMoney_reason").count
|
||||
If Trim(request("overMoney_reason")(i)) <> "" Then
|
||||
overMoney_reason_count = overMoney_reason_count + 1
|
||||
End if
|
||||
d_p_subject = d_p_subject + ( cstr(i) + "^^" + request("p_subject")(i) + "^//^" )
|
||||
d_p_child_sn = d_p_child_sn + ( cstr(i) + "^^" + request("p_sn")(i) + "^//^" )
|
||||
overMoney_reason = overMoney_reason + ( cstr(i) + "^^" + request("overMoney_reason")(i) + "^//^" )
|
||||
d_estimate_money = d_estimate_money + ( cstr(i) + "^^" + request("estimate_money")(i) + "^//^" )
|
||||
d_currentMoney = d_currentMoney + ( cstr(i) + "^^" + request("currentMoney")(i) + "^//^" )
|
||||
d_totalPay = d_totalPay + ( cstr(i) + "^^" + request("totalPay")(i) + "^//^" )
|
||||
d_chaPay = d_chaPay + ( cstr(i) + "^^" + request("chaPay")(i) + "^//^" )
|
||||
Next
|
||||
%>
|
||||
<!-- #include file = "inc_payapproval.asp" -->
|
||||
<!-- #include file = "inc_payapproval_line.asp" -->
|
||||
<!-- #include file = "inc_preapproval.asp" -->
|
||||
<%
|
||||
target99 = tmp_txt1 & "^^" & tmp_txt2 & "^^" & tmp_txt3 & "^^" & tmp_txt4 & "^^" & tmp_txt5
|
||||
target100 = tmp_txt6 & "^^" & tmp_txt7 & "^^" & tmp_txt8 & "^^" & tmp_txt9 & "^^" & tmp_txt10
|
||||
|
||||
'Document table<6C><65> <20><><EFBFBD><EFBFBD>
|
||||
query = "INSERT INTO Document "
|
||||
query = query & " (d_no, d_name, d_write_name, d_write_date, d_flag, d_type, "
|
||||
query = query & " d_order_cnt, d_orders,"
|
||||
query = query & " d_order1, d_order2, d_order3, d_order4, d_order5, "
|
||||
query = query & " d_order6, d_order7, d_order8, d_order9, d_order10, "
|
||||
query = query & " d_view, d_delok) "
|
||||
query = query & "VALUES "
|
||||
query = query & " ('" & krc_no & "', '" & title_type & "<22><><EFBFBD>Ǽ<EFBFBD>', '" & Session("loginuser") & "', '" & date() & "', '10', '" & d_type & "', "
|
||||
query = query & " '" & d_order_cnt & "', '" & d_orders & "', "
|
||||
query = query & " '" & d_order1 & "', '" & d_order2 & "', '" & d_order3 & "', '" & d_order4 & "', '" & d_order5 & "', "
|
||||
query = query & " '" & d_order6 & "', '" & d_order7 & "', '" & d_order8 & "', '" & d_order9 & "', '" & d_order10 & "', "
|
||||
query = query & " 'Y', 'N') "
|
||||
|
||||
'Response.Write query & "<BR>"
|
||||
adoconn.execute query
|
||||
'====================================================================
|
||||
|
||||
|
||||
'//========================
|
||||
'<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD>
|
||||
'- GET <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD><D1B0><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
'request.QueryString("aa")
|
||||
'- POST <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD><D1B0><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
'request.Form("aa")
|
||||
'- GET <20><><EFBFBD><EFBFBD>, POST <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
'request("aa")
|
||||
|
||||
query = "insert into <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, target1, target2, target3, target4, target5, "
|
||||
query = query & " target6, target7, target8, target9, target10, target11, target12, target13, target14, target15, target16, target17, target20, target21, target97,target98,target99,target100,p_sn, <20>߱<EFBFBD><DFB1><EFBFBD>, <20>߱ð<DEBD>, login_p_no, login_<6E≯<EFBFBD>,login_ip) values ( "
|
||||
query = query & "'" & krc_no & "', "
|
||||
query = query & "'" & replace(title, " ", "") & "', "
|
||||
query = query & "'" & gap(1) & "', "
|
||||
query = query & "'" & CheckWord(gap(2)) & "', "
|
||||
query = query & "'" & gap(3) & "', "
|
||||
query = query & "'" & gap(4) & "', "
|
||||
query = query & "'" & gap(5) & "', "
|
||||
query = query & "'" & gap(6) & "', "
|
||||
query = query & "'" & gap(7) & "', "
|
||||
query = query & "'" & gap(8) & "', "
|
||||
query = query & "'" & gap(10) & "', "
|
||||
|
||||
query = query & "'" & startDT & "', "
|
||||
query = query & "'" & endDT & "', "
|
||||
query = query & "'" & sv & "', "
|
||||
query = query & "'" & d_estimate_money & "', "
|
||||
query = query & "'" & d_currentMoney & "', "
|
||||
query = query & "'" & d_totalPay & "', "
|
||||
query = query & "'" & d_chaPay & "', "
|
||||
query = query & "'" & overMoney_reason & "', "
|
||||
|
||||
query = query & "'" & d_p_child_sn & "', "
|
||||
query = query & "'" & d_p_subject & "', "
|
||||
|
||||
query = query & "'" & target97 & "', "
|
||||
query = query & "'" & target98 & "', "
|
||||
query = query & "'" & target99 & "', "
|
||||
query = query & "'" & target100 & "', "
|
||||
|
||||
query = query & "'" & gap(9) & "', "
|
||||
query = query & "'" & year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2) & "', "
|
||||
query = query & "'" & time() & "', "
|
||||
query = query & "'" & user_name(0) & "', "
|
||||
query = query & "'" & user_name(1) & "', "
|
||||
query = query & "'" & Session("USERIP") & "') "
|
||||
'Response.Write query & "<br>"
|
||||
adoconn.execute query
|
||||
|
||||
''<27>α<EFBFBD><CEB1><EFBFBD><EFBFBD><EFBFBD>
|
||||
query = "insert into " & db_table_name & "_log (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_p_no, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_<EFBFBD≯<EFBFBD>, <20><><EFBFBD><EFBFBD>,"
|
||||
query = query & " <20>߱<EFBFBD><DFB1><EFBFBD>, <20>߱ð<DEBD>, <20>߱<EFBFBD><DFB1><EFBFBD>_p_no, <20>߱<EFBFBD><DFB1><EFBFBD>_<EFBFBD≯<EFBFBD>, <20>߱<EFBFBD><DFB1><EFBFBD>_ip) values ( "
|
||||
query = query & "'" & krc_no & "', "
|
||||
query = query & "'" & replace(title, " ", "") & "', "
|
||||
query = query & "'" & user_name(0) & "', "
|
||||
query = query & "'" & user_name(1) & "', "
|
||||
query = query & "'" & replace(title, " ", "") & "<22>μ<EFBFBD>', "
|
||||
query = query & "'" & year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2) & "', "
|
||||
query = query & "'" & time() & "', "
|
||||
query = query & "'" & user_name(0) & "', "
|
||||
query = query & "'" & user_name(1) & "', "
|
||||
query = query & "'" &Session("USERIP") & "')"
|
||||
'Response.Write query & "<br>"
|
||||
adoconn.execute query
|
||||
''<27><><EFBFBD>ڸ<EFBFBD> '-'<27><><EFBFBD><EFBFBD> <20><>,<2C><><EFBFBD><EFBFBD> <20><>ü
|
||||
gap(3) = mid(gap(3),1,4) & "<22><> " & mid(gap(3),6,2) & "<22><> " & mid(gap(3),9,2) & "<22><>"
|
||||
for i=1 to 9
|
||||
if trim(gap(i)) = "" then
|
||||
gap(i) = " "
|
||||
end if
|
||||
Next
|
||||
|
||||
for i=5 to 7
|
||||
if gap(i) = " " then
|
||||
gap(i) = "0"
|
||||
end if
|
||||
next
|
||||
|
||||
'response.write "krc_no : " & krc_no & "<br>"
|
||||
'response.write "title : " & replace(title, " ", "") & "<br>"
|
||||
'response.write "startDT : " & startDT & "<br>"
|
||||
'response.write "endDT : " & endDT & "<br>"
|
||||
'response.write "sv : " & sv & "<br>"
|
||||
|
||||
|
||||
If replace(title, " ", "") = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>" Or replace(title, " ", "") = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǽ<EFBFBD>" Then
|
||||
|
||||
query = "Update man "
|
||||
query = query & " set m_last_work_date = convert(varchar(10), GETDATE(), 23) "
|
||||
query = query & " where id in "
|
||||
query = query & "(SELECT (select id from man where m_name=T.m_name and left(m_jumin,6)+'0000000' = T.m_jumin) as id FROM "
|
||||
query = query & "T_myun_pay T "
|
||||
query = query & "WHERE p_sn = '" & p_sn & "' and isnull(attribute05,'') = '' "
|
||||
query = query & " group by m_name, m_jumin) "
|
||||
|
||||
adoconn.execute query
|
||||
|
||||
query = "UPDATE t_myun_pay "
|
||||
query = query & "SET attribute05 = '" & krc_no & "' , pay_month = '" & pay_month & "' "
|
||||
query = query & "WHERE p_sn = '" & p_sn & "' and isnull(attribute05,'') = '' and confirm_yn = 'Y' "
|
||||
|
||||
adoconn.execute query
|
||||
End if
|
||||
|
||||
|
||||
|
||||
'2014-12-26 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ǽ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD> ------------------------------------
|
||||
If d_order_cnt = 77 Then
|
||||
if tmp_d_order_cnt <> "77" then
|
||||
|
||||
set dbin = server.CreateObject("ADODB.CONNECTION")
|
||||
|
||||
query = " SELECT p_sn, s_gubun, SUM(s_sum) as s_sum "
|
||||
query = query & " FROM "
|
||||
query = query & " ( "
|
||||
query = query & " select p_sn, m_name, m_jumin, work_dt, est_money as s_gubun, "
|
||||
query = query & " case when s_gubun = 'ff' then s_pay_unit * (s_wan + add_count) + add_money else s_sum end as s_sum, "
|
||||
query = query & " attribute05, confirm_yn, s_ot "
|
||||
query = query & " from t_myun_pay "
|
||||
query = query & " union all "
|
||||
query = query & " select p_sn, m_name, m_jumin, work_dt, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' as s_gubun, "
|
||||
query = query & " case when s_gubun = 'ff' then s_sum - s_pay_unit * (s_wan + add_count) - add_money else 0 end as s_sum, "
|
||||
query = query & " attribute05, confirm_yn, s_ot "
|
||||
query = query & " from t_myun_pay "
|
||||
query = query & " ) t "
|
||||
query = query & " WHERE p_sn = '" & p_sn & "' and isnull(attribute05,'') = '" & krc_no & "' and confirm_yn = 'Y' "
|
||||
query = query & " group by s_gubun, p_sn "
|
||||
|
||||
rsc.open query, adoconn,adopenstatic, adlockreadonly
|
||||
do while not rsc.eof
|
||||
directQuery = " UPDATE direct_cost "
|
||||
directQuery = directQuery & " set act_money = act_money + " & rsc("s_sum") & " , "
|
||||
directQuery = directQuery & " cha_money = cha_money + " & rsc("s_sum") & " "
|
||||
directQuery = directQuery & " where p_child_sn = '" & rsc("p_sn") & "' "
|
||||
directQuery = directQuery & " and del_yes_no = 'no' and sebu = '" & rsc("s_gubun") & "' "
|
||||
|
||||
adoConn.Execute directQuery, i
|
||||
|
||||
if i < 1 then
|
||||
Query = "select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ as krc_no from <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
|
||||
query = query & " where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> = '" & replace(title, " ", "") & "' "
|
||||
query = query & " and substring(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ,5,4) = '" & year(date) & "' "
|
||||
query = query & " order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ"
|
||||
|
||||
Rs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
if Rs.recordcount <= 0 then
|
||||
krc_no = 0
|
||||
else
|
||||
Rs.movelast
|
||||
tmpstr = split(trim(Rs("krc_no")),"-")
|
||||
krc_no = tmpstr(3)
|
||||
end if
|
||||
Rs.close
|
||||
krc_no = int(krc_no) + 1
|
||||
tmpstr = "KRC-" & year(date) & "-"
|
||||
tmpstr = tmpstr & "X-"
|
||||
krc_no = tmpstr & ZeroFormat(krc_no,5)
|
||||
|
||||
Query = " insert into direct_cost(p_sn, krc_no, p_subject, hangmok, sebu, act_money, "
|
||||
Query = Query & " modify_date, modify_time, modify_user, modify_user_code, modify_ip, del_yes_no, cost_type, p_child_sn) "
|
||||
Query = Query & " values( "
|
||||
Query = Query & " left('" & rsc("p_sn") & "',7), "
|
||||
Query = Query & " '" & krc_no & "', "
|
||||
Query = Query & " (select p_subject from T_PROJECT_METHOD where p_child_sn = '" & rsc("p_sn") & "'), "
|
||||
Query = Query & " '48', "
|
||||
Query = Query & " '" & rsc("s_gubun") & "', "
|
||||
Query = Query & " '" & rsc("s_sum") & "', "
|
||||
Query = Query & " convert(char(10),GETDATE(),23), "
|
||||
Query = Query & " convert(char(10),GETDATE(),24), "
|
||||
Query = Query & " '"& Session("loginuser") &"', "
|
||||
Query = Query & " '"& Session("User_Number") &"', "
|
||||
Query = Query & " '"& Session("USERIP") &"', "
|
||||
Query = Query & " 'no', "
|
||||
Query = Query & " 'field', "
|
||||
Query = Query & " '" & rsc("p_sn") & "') "
|
||||
|
||||
'Response.Write "Query :" & Query
|
||||
'dbin.Open adoConn
|
||||
adoConn.Execute Query
|
||||
'dbin.Close
|
||||
end if
|
||||
rsc.movenext
|
||||
loop
|
||||
rsc.close
|
||||
else
|
||||
alert2 "<22>̹<EFBFBD> <20><><EFBFBD>簡 <20>Ϸ<EFBFBD><CFB7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>."
|
||||
end if
|
||||
End if
|
||||
'----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
elseif cint(print_type) = 1 then
|
||||
|
||||
end if
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title><%=GNB_TITLE%></title>
|
||||
<link rel="stylesheet" type="text/css" href="/css/basic.css">
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="/js/jquery-ajax-call.js"></script>
|
||||
<script src="/js/jquery.form.min.js"></script>
|
||||
<link rel="stylesheet" href="/css/jquery-ui.min.css">
|
||||
<script src="/js/jquery-ui.min.js"></script>
|
||||
<script language="javascript" src="/js/common.js"></script>
|
||||
</head>
|
||||
|
||||
<script language=javascript>
|
||||
function win_close()
|
||||
{
|
||||
window.close();
|
||||
}
|
||||
|
||||
function subit() {
|
||||
document.getElementById("img_save").style.display = "none";
|
||||
document.getElementById("img_cancel").style.display = "none";
|
||||
if (!confirm("<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")) {
|
||||
document.getElementById("img_save").style.display = "inline";
|
||||
document.getElementById("img_cancel").style.display = "inline";
|
||||
return false;
|
||||
}
|
||||
|
||||
var url = "doc_myun_pay_print2.asp"
|
||||
url = url + "?print_type=2";
|
||||
document.frm_money.action=url;
|
||||
|
||||
var dataCount = document.frm_money.dataCount.value;
|
||||
var minus_money_flag = "False";
|
||||
|
||||
for (var i = 0; i < dataCount; i++) {
|
||||
if (dataCount > 1) {
|
||||
minus_money_flag = document.frm_money.minus_money_flag[i].value;
|
||||
} else {
|
||||
minus_money_flag = document.frm_money.minus_money_flag.value;
|
||||
}
|
||||
//alert(i+"//"+minus_money_flag);
|
||||
if(minus_money_flag == "True"){
|
||||
if (dataCount > 1) {
|
||||
if(document.frm_money.overMoney_reason[i].value == ""){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD><CAB0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20>մϴ<D5B4>.\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ۼ<EFBFBD> <20>ϼ<EFBFBD><CFBC><EFBFBD>.");
|
||||
document.getElementById("img_save").style.display = "inline";
|
||||
document.getElementById("img_cancel").style.display = "inline";
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if(document.frm_money.overMoney_reason.value == ""){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD><CAB0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20>մϴ<D5B4>.\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ۼ<EFBFBD> <20>ϼ<EFBFBD><CFBC><EFBFBD>.");
|
||||
document.getElementById("img_save").style.display = "inline";
|
||||
document.getElementById("img_cancel").style.display = "inline";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
document.frm_money.submit();
|
||||
}
|
||||
|
||||
function direct_cost_detail(p_child_sn, start_DT, end_DT, sv, pay_type, cost_type, d_no) {
|
||||
//alert(p_child_sn+"//"+start_DT+"//"+cost_type);
|
||||
//url = "../ess/doc_myun_pay_detail.asp?d_no="+d_no+"&view_chk=1&x=1";
|
||||
url = "doc_myun_pay_detail2.asp?p_child_sn=" + p_child_sn + "&startDT=" + start_DT + "&endDT=" + end_DT + "&sv=" + sv + "&pay_type=" + pay_type + "&cost_type=" + cost_type + "&krc_no=" + d_no;
|
||||
window.open(url,"","left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=780, height=600 ,scrollbars=yes ,resizable=yes");
|
||||
}
|
||||
|
||||
|
||||
function print_ie()
|
||||
{
|
||||
|
||||
//
|
||||
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1){ // Chrome Browser Detected?
|
||||
window.PPClose = false; // Clear Close Flag
|
||||
window.onbeforeunload = function(){ // Before Window Close Event
|
||||
if(window.PPClose === false){ // Close not OK?
|
||||
return 'Leaving this page will block the parent window!\nPlease select "Stay on this Page option" and use the\nCancel button instead to close the Print Preview Window.\n';
|
||||
}
|
||||
}
|
||||
window.print(); // Print preview
|
||||
window.PPClose = true; // Set Close Flag to OK.
|
||||
}else{
|
||||
window.print();
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
|
||||
function clsit()
|
||||
{
|
||||
alert('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û <20>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>');
|
||||
self.close();
|
||||
opener.location.reload();
|
||||
}
|
||||
|
||||
//-->
|
||||
|
||||
</script>
|
||||
|
||||
<body topmargin="10" leftmargin="10" <%if cint(print_type) = 2 then%> onLoad="clsit();" <% end if %>>
|
||||
|
||||
<form method='post' name='frm_money'>
|
||||
|
||||
<input type=hidden name = "txt_prj_name" value="<%=gap(1)%>">
|
||||
<input type=hidden name = "txt_pay_target" value="<%=gap(2)%>">
|
||||
<input type=hidden name = "txt_date" value="<%=gap(3)%>">
|
||||
<input type=hidden name = "sel_pay_type" value="<%=gap(4)%>">
|
||||
<input type=hidden name = "txt_pay" value="<%=gap(5)%>">
|
||||
<input type=hidden name = "txt_pay_vat" value="<%=gap(6)%>">
|
||||
<input type=hidden name = "txt_pay_tot" value="<%=gap(7)%>">
|
||||
<input type=hidden name = "txt_client" value="<%=gap(8)%>">
|
||||
<input type=hidden name = "txt_p_sn" value='<%=gap(9)%>'>
|
||||
<input type=hidden name = "txt_d_no" value='<%=gap(10)%>'>
|
||||
<input type=hidden name = "title_type" value='<%=title_type%>'>
|
||||
|
||||
<input type=hidden name = "pay_type" value='<%=pay_type%>'>
|
||||
<input type=hidden name = "startDT" value='<%=startDT%>'>
|
||||
<input type=hidden name = "endDT" value='<%=endDT%>'>
|
||||
<input type=hidden name = "sv" value='<%=sv%>'>
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td colspan="2" style="padding:20;">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<%if cint(print_type) = 1 then%>
|
||||
<tr>
|
||||
<td style="padding:0 0 5 0;">
|
||||
<%if approval_chk = "true" then%>
|
||||
<img src="/images/common/btn_approve.jpg" onClick="subit()" style="CURSOR:pointer;" title='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û' id="img_save">
|
||||
<%else
|
||||
Response.Write "<font color='red' size=4><b><3E><><EFBFBD>ΰ<EFBFBD> ȥ<><C8A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵ˴ϴ<CBB4>. <20><><EFBFBD>θ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><CFBC><EFBFBD></b></font>"
|
||||
end if%>
|
||||
<img src="/images/common/btn_cancel.jpg" onClick="win_close();" style="CURSOR:pointer;" id="img_cancel">
|
||||
</td>
|
||||
</tr>
|
||||
<%end if%>
|
||||
<tr>
|
||||
<td><img src="/images/approval/docbg_top.jpg"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="710" align="center" style="padding:10;border-left:1px solid #dedede;border-right:1px solid #dedede;">
|
||||
<table width="95%" 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="255">
|
||||
<font color="blue" size="3" ><b><%=title%></b></font>
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%" cellpadding="0" cellspacing="1" border="0" style="border-collapse:collapse;" bgcolor="#d8d8d8">
|
||||
<%if cdate(formatdatetime(date,2)) > "2014-01-07" then
|
||||
tmp_title = "<22><>ǥ<EFBFBD>̻<EFBFBD>"
|
||||
else
|
||||
tmp_title = "<22><>ȸ<EFBFBD><C8B8>"
|
||||
end if%>
|
||||
|
||||
<tr>
|
||||
<td colspan="5" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28>ҼӺμ<D3BA>)</td>
|
||||
<td colspan="4" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><CEBC><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E><><EFBFBD><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>μ<EFBFBD><CEBC><EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><3E>ӿ<EFBFBD></td>
|
||||
<td width="11%" class="k_small" align="center" bgcolor="#F1F1F1"><%=tmp_title%></td>
|
||||
</tr>
|
||||
<%
|
||||
'my_pos = "3"
|
||||
'Response.Write "my_pos : " & my_pos & "<BR>"
|
||||
tmp_txt = "<p style='line-height:11pt;font-size:9pt;'>" & Session("loginuser") & "<BR>" & replace(date(), "-","") & "<BR>" & FormatDateTime(time,4)
|
||||
tmp_txt = Session("loginuser") & "<BR>" & replace(date(), "-","") & "<BR>" & Session("User_Number")
|
||||
if my_pos = 6 then '<27><><EFBFBD><EFBFBD>
|
||||
tmp_txt1 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt2 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt3 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt4 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt5 = tmp_txt
|
||||
tmp_txt6 = "/"
|
||||
tmp_txt7 = "/"
|
||||
tmp_txt8 = "/"
|
||||
tmp_txt9 = "/"
|
||||
tmp_txt10 = month(now()) & " / " & day(now())
|
||||
elseif my_pos = 5 then '<27>ӿ<EFBFBD>
|
||||
tmp_txt1 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt2 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt3 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt4 = tmp_txt
|
||||
tmp_txt5 = " "
|
||||
tmp_txt6 = "/"
|
||||
tmp_txt7 = "/"
|
||||
tmp_txt8 = "/"
|
||||
tmp_txt9 = month(now()) & " / " & day(now())
|
||||
tmp_txt10 = "/"
|
||||
elseif my_pos = 3 or my_pos = 4 then '<27>μ<EFBFBD><CEBC><EFBFBD>
|
||||
tmp_txt1 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt2 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt3 = tmp_txt
|
||||
tmp_txt4 = " "
|
||||
tmp_txt5 = " "
|
||||
tmp_txt6 = "/"
|
||||
tmp_txt7 = "/"
|
||||
tmp_txt8 = month(now()) & " / " & day(now())
|
||||
tmp_txt9 = "/"
|
||||
tmp_txt10 = "/"
|
||||
elseif my_pos = 2 then '<27><><EFBFBD><EFBFBD>
|
||||
tmp_txt1 = tmp_txt
|
||||
tmp_txt2 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt3 = " "
|
||||
tmp_txt4 = " "
|
||||
tmp_txt5 = " "
|
||||
tmp_txt6 = month(now()) & " / " & day(now())
|
||||
tmp_txt7 = "/"
|
||||
tmp_txt8 = "/"
|
||||
tmp_txt9 = "/"
|
||||
tmp_txt10 = "/"
|
||||
elseif my_pos = 1 then '<27><> <20><><EFBFBD><EFBFBD>
|
||||
tmp_txt1 = tmp_txt
|
||||
tmp_txt2 = " "
|
||||
tmp_txt3 = " "
|
||||
tmp_txt4 = " "
|
||||
tmp_txt5 = " "
|
||||
tmp_txt6 = month(now()) & " / " & day(now())
|
||||
tmp_txt7 = "/"
|
||||
tmp_txt8 = "/"
|
||||
tmp_txt9 = "/"
|
||||
tmp_txt10 = "/"
|
||||
else '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
tmp_txt1 = tmp_txt
|
||||
tmp_txt2 = "<22><><EFBFBD><EFBFBD>"
|
||||
tmp_txt3 = " "
|
||||
tmp_txt4 = " "
|
||||
tmp_txt5 = " "
|
||||
tmp_txt6 = month(now()) & " / " & day(now())
|
||||
tmp_txt7 = "/"
|
||||
tmp_txt8 = "/"
|
||||
tmp_txt9 = "/"
|
||||
tmp_txt10 = "/"
|
||||
end if
|
||||
%>
|
||||
<input type="hidden" name="tmp_txt1" value="<%=tmp_txt1%>">
|
||||
<input type="hidden" name="tmp_txt2" value="<%=tmp_txt2%>">
|
||||
<input type="hidden" name="tmp_txt3" value="<%=tmp_txt3%>">
|
||||
<input type="hidden" name="tmp_txt4" value="<%=tmp_txt4%>">
|
||||
<input type="hidden" name="tmp_txt5" value="<%=tmp_txt5%>">
|
||||
<input type="hidden" name="tmp_txt6" value="<%=tmp_txt6%>">
|
||||
<input type="hidden" name="tmp_txt7" value="<%=tmp_txt7%>">
|
||||
<input type="hidden" name="tmp_txt8" value="<%=tmp_txt8%>">
|
||||
<input type="hidden" name="tmp_txt9" value="<%=tmp_txt9%>">
|
||||
<input type="hidden" name="tmp_txt10" value="<%=tmp_txt10%>">
|
||||
<tr height="35">
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt1%> </td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt2%> </td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt3%> </td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt4%> </td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt5%> </td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"></td>
|
||||
</tr>
|
||||
<tr height="18">
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt6%></td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt7%></td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt8%></td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt9%></td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small"><%=tmp_txt10%></td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small">/</td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small">/</td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small">/</td>
|
||||
<td bgcolor="#FFFFFF" align="center" class="k_small">/</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="20%" style="padding:7 0 7 20"><b><3E><> <3B><> <3B><> <3B><></b></td>
|
||||
<td width="80%" class="tahoma"><%=Curr_date%></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="20%" style="padding:7 0 7 20"><b><3E><> <3B><></b></td>
|
||||
<td width="80%"><%=user_name(1)%></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="20%" style="padding:7 0 7 20"><b><3E><> <3B><></b></td>
|
||||
<td width="80%"><%=user_name(4)%></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="20%" style="padding:7 0 7 20"><b><3E><> <3B><></b></td>
|
||||
<td width="80%"><%=user_name(2)%></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#d8d8d8" height="1"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="center" style="padding:10 0 10 0;font-size:14;font-family:dotum;"><b><3E>ϱ<EFBFBD><CFB1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ(<28><><EFBFBD><EFBFBD>)<29><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD>, <%=title_type%><3E><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>ֽñ<D6BD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>.</b></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="20%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ⱓ</td>
|
||||
<td width="35%" 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="15%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="30%" class="tit7" align="center"><font class="tahoma"><%=pay_apply_username%></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 width="25%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</td>
|
||||
<td width="9%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="9%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="9%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǻ<EFBFBD><C7BA><EFBFBD></td>
|
||||
<td width="9%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD><EFBFBD>ܾ<EFBFBD></td>
|
||||
<td width="20%" class="tit2" align="center"><3E><><EFBFBD><EFBFBD></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
Query = "select p_sn, isnull(p_subject, (select p_subject from V_PROJECT_METHOD where p_sn = T.p_sn )) as p_subject, isnull(SUM(pay), 0) as pay "
|
||||
Query = Query & "from ( "
|
||||
Query = Query & " select isnull(A.attribute05,'') as d_no, A.p_sn, C.p_subject, s_gubun, '2' as pay_type, isnull(SUM(s_sum), 0) as pay "
|
||||
Query = Query & " from t_myun_pay as A "
|
||||
Query = Query & " left outer join v_project as B "
|
||||
Query = Query & " on A.p_sn = B.p_sn "
|
||||
Query = Query & " left outer join v_project_method as C "
|
||||
Query = Query & " on A.p_sn = C.p_child_sn "
|
||||
Query = Query & " where A.p_sn = '" & p_sn & "' and isnull(A.attribute05,'') = '' "
|
||||
Query = Query & " and A.s_gubun in ('FF', 'CATI', 'ETC') and confirm_yn = 'Y' "
|
||||
Query = Query & " group by isnull(A.attribute05,''), A.p_sn, C.p_subject, s_gubun "
|
||||
Query = Query & ") as T "
|
||||
Query = Query & "group by p_sn, p_subject "
|
||||
|
||||
'Response.Write query & "<BR>"
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
|
||||
Dim total_estimate_money, total_currentMoney, total_Pay, total_chaPay, total_sum
|
||||
total_estimate_money = 0
|
||||
total_currentMoney = 0
|
||||
total_Pay = 0
|
||||
total_chaPay = 0
|
||||
total_sum = 0
|
||||
|
||||
Dim minus_money_flag, dataCount
|
||||
dataCount = 0
|
||||
if adoRs.recordcount > 0 Then
|
||||
dataCount = adoRs.recordcount
|
||||
do while not adoRs.eof
|
||||
minus_money_flag = False
|
||||
|
||||
Query = "select p_sn, p_child_sn, SUM(convert(numeric(18,0), est_money)) as est_money from ( "
|
||||
Query = Query & " select * from direct_cost where p_sn like '" & Left(adoRs("p_sn"), 2) & "%' and hangmok = '48' and del_yes_no = 'no' union all"
|
||||
Query = Query & " select * from direct_cost where p_sn like '" & Left(adoRs("p_sn"), 2) & "%' and hangmok = '49' and sebu = '<27>ص<EFBFBD><D8B5><EFBFBD>' and del_yes_no = 'no' "
|
||||
Query = Query & ") as T "
|
||||
If Len(adoRs("p_sn")) > 9 Then
|
||||
Query = Query & "where p_child_sn = '" & adoRs("p_sn") & "' "
|
||||
Else
|
||||
Query = Query & "where p_sn = '" & adoRs("p_sn") & "' "
|
||||
End If
|
||||
Query = Query & "group by p_sn, p_child_sn "
|
||||
|
||||
'response.Write query
|
||||
|
||||
adors2.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
Dim estimate_money
|
||||
estimate_money = 0
|
||||
if adors2.recordcount > 0 Then
|
||||
estimate_money = adors2("est_money")
|
||||
End If
|
||||
adors2.close
|
||||
Query = "SELECT p_sn, SUM(pay) AS pay FROM "
|
||||
Query = Query & "( "
|
||||
Query = Query & "select p_sn, isnull(sum(s_sum), 0) as pay from t_myun_pay "
|
||||
Query = Query & "where pay_type = 2 "
|
||||
Query = Query & "and isnull(pay_month,'') <> '' "
|
||||
Query = Query & "and p_sn = '" & adoRs("p_sn") & "' "
|
||||
Query = Query & "group by p_sn "
|
||||
|
||||
Query = Query & "UNION ALL "
|
||||
|
||||
Query = Query & "SELECT CONVERT(varchar, target10) AS p_sn, "
|
||||
Query = Query & " sum(CONVERT(NUMERIC(18, 0), CONVERT(varchar, target5))) AS pay "
|
||||
Query = Query & "FROM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
|
||||
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) = '" & adoRs("p_sn") & "' "
|
||||
Query = Query & "GROUP BY CONVERT(varchar, target10) "
|
||||
Query = Query & ") T "
|
||||
Query = Query & "GROUP BY p_sn "
|
||||
'response.Write query & "<br>"
|
||||
|
||||
adors2.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
Dim currentMoney
|
||||
currentMoney = 0
|
||||
|
||||
if adors2.recordcount > 0 Then
|
||||
currentMoney = adors2("pay")
|
||||
End If
|
||||
|
||||
'response.Write adors2.recordcount & "//" & currentMoney & "<br>"
|
||||
adors2.close
|
||||
|
||||
|
||||
Dim totalPay, chaPay
|
||||
totalPay = CDbl(adoRs("pay"))
|
||||
chaPay = CDbl(estimate_money) - CDbl(currentMoney) - CDbl(totalPay)
|
||||
|
||||
If chaPay < 0 Then
|
||||
minus_money_flag = true
|
||||
End if
|
||||
%>
|
||||
<tr>
|
||||
<td class="tit7">
|
||||
<font class="tahoma">[<%=adoRs("p_sn")%>]
|
||||
<img src="/images/common/btn_directcost_view.jpg" align="absmiddle" style="cursor:pointer; height: 14px;" onclick="direct_cost_detail('<%=adoRs("p_sn")%>', '<%=startDT%>', '<%=endDT%>', '<%=sv%>', 2, '<%="field"%>', '<%= d_no %>')">
|
||||
<br><%=adoRs("p_subject")%>
|
||||
</font>
|
||||
<input name = "p_subject" type="hidden" value="<%=adoRs("p_subject")%>" />
|
||||
<input name = "p_sn" type="hidden" value="<%=adoRs("p_sn")%>" />
|
||||
</td>
|
||||
<td class="tit7" style="text-align: right;"><font class="tahoma"><%=FormatNumber(CDbl(estimate_money), 0)%></font></td>
|
||||
<td class="tit7" style="text-align: right;"><font class="tahoma"><%=FormatNumber(CDbl(currentMoney), 0)%></font></td>
|
||||
<td class="tit7" style="text-align: right;"><font class="tahoma"><%=FormatNumber(CDbl(totalPay), 0)%></font></td>
|
||||
<td class="tit7" style="text-align: right;"><font class="tahoma" <% if CDbl(chaPay) < 0 then %> color="red" <% end if %>><%=FormatNumber(CDbl(chaPay), 0)%></font></td>
|
||||
<td class="tit7" style="text-align: right;">
|
||||
<input type=hidden name = "estimate_money" value='<%=FormatNumber(CDbl(estimate_money), 0)%>'>
|
||||
<input type=hidden name = "currentMoney" value='<%=FormatNumber(CDbl(currentMoney), 0)%>'>
|
||||
<input type=hidden name = "totalPay" value='<%=FormatNumber(CDbl(totalPay), 0)%>'>
|
||||
<input type=hidden name = "chaPay" value='<%=FormatNumber(CDbl(chaPay), 0)%>'>
|
||||
<input type=hidden name = "minus_money_flag" value='<%=minus_money_flag%>'>
|
||||
<input type="text" name="overMoney_reason" value="<%=overMoney_reason%>" style="width: 98%;"
|
||||
<% If minus_money_flag = false Then %> readonly <% End If %> />
|
||||
</td>
|
||||
<%
|
||||
total_estimate_money = total_estimate_money + CDbl(estimate_money)
|
||||
total_currentMoney = total_currentMoney + CDbl(currentMoney)
|
||||
total_Pay = total_Pay + CDbl(totalPay)
|
||||
total_chaPay = total_chaPay + CDbl(chaPay)
|
||||
%>
|
||||
</tr>
|
||||
<%
|
||||
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_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_Pay, 0)%></font></td>
|
||||
<td align="right" class="tit2"><font class="tahoma"><%=FormatNumber(total_chaPay, 0)%></font></td>
|
||||
<td width="20%" class="tit2" style="text-align: right;"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<input type=hidden name = "dataCount" value='<%=dataCount%>'>
|
||||
<tr>
|
||||
<td colspan="2" style="padding:20 0 0 0" align="right">
|
||||
<pre><font class="tahoma"> <09><> <20><> <20><> <20><> : <20><> <20><> <20><></font></pre>
|
||||
<pre><font class="tahoma"> <09><> <20><> <20><> : (<28><>)</font></pre>
|
||||
</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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user