최초커밋
This commit is contained in:
308
approval/doc_expense2.asp
Normal file
308
approval/doc_expense2.asp
Normal file
@@ -0,0 +1,308 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
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 cnt
|
||||
dim Gap(10) '1:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>ڵ<EFBFBD>, 2:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 3:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 4:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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>Ʈ<EFBFBD>ڵ<EFBFBD>, 10:ǰ<>Ǽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ
|
||||
dim krc_no
|
||||
dim pay_type(4)
|
||||
dim db_table_name
|
||||
dim title_type
|
||||
|
||||
db_table_name = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
|
||||
title = request("title")
|
||||
title_type = title
|
||||
|
||||
Max_Width =650
|
||||
Curr_date = year(date) & "<22><> " & month(date) & "<22><> " & day(date) & "<22><>"
|
||||
|
||||
pay_type(1) = "<22><><EFBFBD><EFBFBD>"
|
||||
pay_type(2) = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ü"
|
||||
pay_type(3) = "<22><><EFBFBD><EFBFBD>ī<EFBFBD><C4AB>"
|
||||
pay_type(4) = "<22><><EFBFBD><EFBFBD>ī<EFBFBD><C4AB>"
|
||||
''//=================
|
||||
''//=================
|
||||
'''''<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
krc_no=request("krc_no")
|
||||
if krc_no <> "" then
|
||||
query = "select * from " & db_table_name
|
||||
query = query & " where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ = '" & krc_no & "'"
|
||||
adors.open query, adoconn, adopenstatic, adlockreadonly
|
||||
gap(1) = adors("target1")
|
||||
gap(2) = ViewWord(adors("target2"))
|
||||
gap(3) = adors("target3")
|
||||
gap(4) = adors("target4")
|
||||
gap(5) = adors("target5")
|
||||
gap(6) = adors("target6")
|
||||
gap(7) = adors("target7")
|
||||
gap(8) = adors("target8")
|
||||
gap(9) = adors("p_sn")
|
||||
gap(10) = adors("target9")
|
||||
adoRs.close
|
||||
end if
|
||||
|
||||
''//===============
|
||||
''ȸ<><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")
|
||||
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
|
||||
%>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><><EFBFBD><EFBFBD> <20>ۼ<EFBFBD></h1>
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
<!-- Main content -->
|
||||
<div class="content-body">
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form method='post' name='frm_money' >
|
||||
<input type=hidden name="txt_p_sn" value='<%=gap(9)%>' >
|
||||
<input type=hidden name="title_type" value='<%=title_type%>' >
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td style="padding:0 0 5 0;">
|
||||
<font class="brown"><%=title%> <20>ۼ<EFBFBD><DBBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> Ư<><C6AF><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.</font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="710" align="center" style="padding:10;border-left:1px solid #dedede;border-right:1px solid #dedede;">
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||||
<tr height="24">
|
||||
<td align="center" colspan="4" style="font-size:12px;"><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>. </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><></td>
|
||||
<td width="85%" colspan="3">
|
||||
<input type="text" class="gray" style="width:calc(100% - 30px);" name="txt_prj_name" value='<%=gap(1)%>' readonly>
|
||||
<img src="/images/common/btn_smallsrch2.gif" align="absmiddle" onclick="winnewoepn('txt_prj_name','txt_p_sn');" style="CURSOR:pointer;">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><br><3E><> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD></td>
|
||||
<td width="85%" colspan="3">
|
||||
<textarea style="width:100%;" rows="4" name="txt_pay_target"><%=replace(ViewWord(gap(2)),"<br>",chr(13))%></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="35%" >
|
||||
<input type="text" class="gray selectDate" style="width:150;text-align:right" name="txt_date" readonly value='<%=gap(3)%>'>
|
||||
</td>
|
||||
<td width="15%" align="center" ><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
|
||||
<td width="35%" >
|
||||
<select name="sel_pay_type" id="expence_way" tabindex="4" onchange="bugaNoChange()"><!--== <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ==-->
|
||||
<%for i=1 to 4%>
|
||||
<option value="<%=pay_type(i)%>"
|
||||
<%if trim(pay_type(i)) = trim(gap(4)) then%>
|
||||
selected
|
||||
<%end if%>
|
||||
><%=pay_type(i)%></option>
|
||||
<%next%>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="center" ><3E><><EFBFBD>ް<EFBFBD><DEB0><EFBFBD></td>
|
||||
<td width="35%" >
|
||||
<input type="text" id="val_supply" class="gray" style="width:150;text-align:right;" OnKeyup="OnlyNumber(this);check_comma(this.value,'1');" name="txt_pay" value='<%=gap(5)%>'> <20><>
|
||||
</td>
|
||||
<td width="15%" align="center" rowspan="2"><3E><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD></td>
|
||||
<td width="35%" rowspan="2">
|
||||
<input type="text" class="gray" style="width:150;text-align:right;" name="txt_pay_tot" readonly value='<%=gap(7)%>'> <20><>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="center" ><3E>ΰ<EFBFBD><CEB0><EFBFBD><EFBFBD><EFBFBD><br /><input type="button" value="<22>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>" onclick="vat_auto();" /></td>
|
||||
<td width="35%" >
|
||||
<input type="text" class="gray" style="width:150;text-align:right;" OnKeyup="OnlyNumber(this); check_comma(this.value,'2');" name="txt_pay_vat" id="expence_vat" value='<%=gap(6)%>'> <20><>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="15%" align="center" ><3E>ŷ<EFBFBD>ó</td>
|
||||
<td width="35%" >
|
||||
<input type="text" class="gray" style="width:100%;" name="txt_client" value='<%=gap(8)%>'>
|
||||
</td>
|
||||
<td width="15%" align="center" ><3E>Աݰ<D4B1><DDB0><EFBFBD></td>
|
||||
<td width="35%" >
|
||||
<09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٸ<EFBFBD><br>(<28><><EFBFBD><EFBFBD>ȭ<EFBFBD><C8AD> <20><><EFBFBD><EFBFBD>)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:10 0 0 0;" align="center">
|
||||
<img src="/images/common/btn_input.jpg" onClick="goPrint();" style="CURSOR:pointer;" title='<27>Է<EFBFBD>'>
|
||||
<img src="/images/common/btn_cancel2.jpg" onClick="history.back(-1);" style="CURSOR:pointer;" title='<27><><EFBFBD><EFBFBD>'>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
function winnewoepn(actval,actval2){
|
||||
var url = "/project_list/project_list_old_2014.asp";
|
||||
url = url + "?actval=" + actval;
|
||||
url = url + "&actval2=" + actval2;
|
||||
url = url + "&part=job_project";
|
||||
url = url + "&sel_type=multy"; // '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><>Ƽ<EFBFBD><C6BC> <20><><EFBFBD><EFBFBD> <20>ϰ<EFBFBD><CFB0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
window.open(url,"wins","left=50, top=50, menubar=no, location=no, status=no, toolbar=no, width=850, height=600, scrollbars=yes ,resizable=no");
|
||||
}
|
||||
|
||||
function goPrint(){//<2F><><EFBFBD><EFBFBD>Ʈ <20>ϱ<EFBFBD>
|
||||
var txt_prj_name = document.frm_money.txt_prj_name.value;
|
||||
var txt_pay_target = document.frm_money.txt_pay_target.value;
|
||||
var txt_date = document.frm_money.txt_date.value;
|
||||
var sel_pay_type = document.frm_money.sel_pay_type.value;
|
||||
var txt_pay = document.frm_money.txt_pay.value;
|
||||
var txt_pay_vat = document.frm_money.txt_pay_vat.value;
|
||||
var txt_pay_tot = document.frm_money.txt_pay_tot.value;
|
||||
var txt_client = document.frm_money.txt_client.value;
|
||||
var txt_p_sn = document.frm_money.txt_p_sn.value;
|
||||
// var txt_d_no = document.frm_money.txt_d_no.value;
|
||||
var title_type = document.frm_money.title_type.value;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD> <20>ٳ<EFBFBD><D9B3><EFBFBD> ó<><C3B3> <20><>--------------------------
|
||||
var expence_reason = document.frm_money.txt_pay_target.value;
|
||||
for (var i=0;i<expence_reason.length;i++)
|
||||
{
|
||||
var uniCode = expence_reason.charCodeAt(i);
|
||||
if(uniCode == 13 && expence_reason.charCodeAt(i+1) == 10){
|
||||
expence_reason = expence_reason.replace(expence_reason.charAt(i)+expence_reason.charAt(i+1),"<br>");
|
||||
}
|
||||
}
|
||||
expence_reason = expence_reason.replace(/&/g, "%26");
|
||||
expence_reason = expence_reason.replace(/\+/g, "%2B");
|
||||
if (expence_reason == "#" || expence_reason == "&" || expence_reason == "'" || expence_reason == "_" ) {
|
||||
alert("Ư<><C6AF> <20><><EFBFBD>ڸ<EFBFBD> <20>Է<EFBFBD><D4B7>ϸ<EFBFBD> <20>ȵ˴ϴ<CBB4>. (#,&,',_)<29><> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>ٽ<EFBFBD> <20>ۼ<EFBFBD><DBBC><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>");
|
||||
return false;
|
||||
}
|
||||
|
||||
var agt = navigator.userAgent.toLowerCase();
|
||||
var txt = expence_reason;
|
||||
//alert(txt);
|
||||
for (var i = 0; i < txt.length; i++) {
|
||||
var uniCode = txt.charCodeAt(i);
|
||||
if (agt.indexOf("msie") != -1) {
|
||||
if ((uniCode == 13 && txt.charCodeAt(i + 1) == 10)) {
|
||||
txt = txt.replace(txt.charAt(i) + txt.charAt(i + 1), "<br>");
|
||||
}
|
||||
} else if (agt.indexOf("chrome") != -1) {
|
||||
if (uniCode == 10) {
|
||||
txt = txt.replace(txt.charAt(i), "<br>");
|
||||
}
|
||||
}
|
||||
}
|
||||
expence_reason = txt;
|
||||
txt_pay_target = expence_reason;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD> <20>ٳ<EFBFBD><D9B3><EFBFBD> ó<><C3B3> <20><>--------------------------
|
||||
var url = "doc_expense2_print.asp"
|
||||
url = url + "?txt_prj_name=" + txt_prj_name;
|
||||
url = url + "&txt_pay_target=" + txt_pay_target;
|
||||
url = url + "&txt_date=" + txt_date;
|
||||
url = url + "&sel_pay_type=" + sel_pay_type;
|
||||
url = url + "&txt_pay=" + txt_pay;
|
||||
url = url + "&txt_pay_vat=" + txt_pay_vat;
|
||||
url = url + "&txt_pay_tot=" + txt_pay_tot;
|
||||
url = url + "&txt_client=" + txt_client;
|
||||
url = url + "&print_type=1";
|
||||
url = url + "&txt_p_sn=" + txt_p_sn;
|
||||
// url = url + "&txt_d_no=" + txt_d_no;
|
||||
url = url + "&title_type=" + title_type;
|
||||
|
||||
window.open(url,"","left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=850, height=800 ,scrollbars=yes ,resizable=yes");
|
||||
}
|
||||
|
||||
|
||||
function check_comma(txt,txt2){
|
||||
txt=allTrim(txt);
|
||||
for(var i=0;i<txt.length;i++){
|
||||
txt = txt.replace(',','')
|
||||
txt = txt.replace(' ','')
|
||||
}
|
||||
if(eval(txt2)==1){
|
||||
document.frm_money.txt_pay.value = allTrim(commify(txt));
|
||||
}else{
|
||||
document.frm_money.txt_pay_vat.value = allTrim(commify(txt));
|
||||
}
|
||||
|
||||
var txt_pay = document.frm_money.txt_pay.value;
|
||||
var txt_pay_vat = document.frm_money.txt_pay_vat.value;
|
||||
for(var i=0;i<txt_pay.length;i++){
|
||||
txt_pay = txt_pay.replace(',','')
|
||||
txt_pay = txt_pay.replace(' ','')
|
||||
}
|
||||
for(var i=0;i<txt_pay_vat.length;i++){
|
||||
txt_pay_vat = txt_pay_vat.replace(',','')
|
||||
txt_pay_vat = txt_pay_vat.replace(' ','')
|
||||
}
|
||||
|
||||
if (txt_pay == ""){
|
||||
txt = txt_pay_vat;
|
||||
}else if(txt_pay_vat == ""){
|
||||
txt = txt_pay;
|
||||
}else{
|
||||
txt = eval(txt_pay) + eval(txt_pay_vat);
|
||||
}
|
||||
document.frm_money.txt_pay_tot.value = allTrim(commify(txt));
|
||||
|
||||
}
|
||||
|
||||
function bugaNoChange() {
|
||||
if ($("#expence_way").val() == "<22><><EFBFBD><EFBFBD>ī<EFBFBD><C4AB>" || $("#expence_way").val() == "<22><><EFBFBD><EFBFBD>") {
|
||||
$("#expence_vat").val("0");
|
||||
$("#expence_vat").attr("readonly", true);
|
||||
$("#expence_sum").val($("#expence_money").val());
|
||||
} else {
|
||||
$("#expence_vat").removeAttr("readonly");
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
currentMenu("/approval/doc_select.asp", "");
|
||||
|
||||
$(".selectDate").datepicker();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
Reference in New Issue
Block a user