PSM046.jsp 13.2 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*,com.csc.library.components.*"  %>

<jsp:useBean id="PSM046" class="com.csc.library.system.Task" scope="page"/>
<%
PSM046.setChannel(request,response);
UIManager screen = (UIManager) PSM046.process("SingleEntry","PSM046");
CheckNull chk = new CheckNull();

String cmd = chk.chkNullString(request.getParameter("__cmd"));
String fthidcard = chk.chkNullString(request.getParameter("fthidcard$S"));
String mthidcard = chk.chkNullString(request.getParameter("mthidcard$S"));
String fthmryidcard = chk.chkNullString(request.getParameter("fthmryidcard$S"));
String mthmryidcard = chk.chkNullString(request.getParameter("mthmryidcard$S"));
String ins_fat = chk.chkNullString(request.getParameter("ins_fat$D"));
String ins_mot = chk.chkNullString(request.getParameter("ins_mot$D"));
String ins_fat_spouse = chk.chkNullString(request.getParameter("ins_fat_spouse$D"));
String ins_mot_spouse = chk.chkNullString(request.getParameter("ins_mot_spouse$D"));
String insurance = chk.chkNullString(request.getParameter("insurance$D"));
String insurance_spouse = chk.chkNullString(request.getParameter("insurance_spouse$D"));
String rmf = chk.chkNullString(request.getParameter("rmf$D"));
String ltf = chk.chkNullString(request.getParameter("ltf$D"));
String crippleallowance = chk.chkNullString(request.getParameter("crippleallowance$D"));
String donation = chk.chkNullString(request.getParameter("donation$D"));
String first_home = chk.chkNullString(request.getParameter("first_home$D"));
String travel_in_country = chk.chkNullString(request.getParameter("travel_in_country$D"));

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html ng-app="myHR">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<script type='text/javascript' src='../JS/SCREEN.js'></script>
<script type='text/javascript' src='../JS/ICONSMENU.js'></script>
<script src="../JS/angular-1.3.15/angular.js" type="text/javascript"></script>
<script src="../JS/ANGULAR/SCREEN_ANGULAR.js" type="text/javascript"></script> 
<script src="../JS/jquery-2.1.3.min.js" type="text/javascript"></script>
<script type='text/javascript' src='/hr/dwr/interface/Tax_allowance_list_for_clearing.js'></script>
<script type='text/javascript' src='/hr/dwr/engine.js'></script>
<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language="javascript">
function GoUpdate(){update();}
function GoDelete(){edelete();}
function GoSearch(){search();}
function GoSave(){
    setTaxlist();
    confirmSave();
}

function setTaxlist(){
    var value = "";
    $(".taxall_list").each(function(){
        if($(this).prop("checked")){
            value = chkText(value);
            value += $(this).val();
        }
    });
    $("input[name='__list_for_clearing']").val(value);
}

function chkText(str){
    if(str.length > 0){
        str += ",";
    }
    return str;
}

$(document).ready(function(){
    var mainclearing =  $('input[name="__mainclearing"]').val();
    var cmd = "<%=cmd%>";
    if(cmd !== "save"){
        Tax_allowance_list_for_clearing.getListForClearing(mainclearing, function(data){
            var taxlist = data.split(",");
            for(var i=0; i < taxlist.length; i++){
                $('input[name="'+taxlist[i]+'"]').prop("checked",true);
            }
        });
    }
});
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>

<form name="cscform" method="post" action="PSM046.jsp">
 

<!----------BEGIN CSC INITIAL ZONE ------------------------>

<%=screen.InitialVariable()%>

<!----------END CSC INITIAL ZONE -------------------------->

  <input type="hidden"name="__screen"  value="PSM046"> 
  <input type="hidden" name="__help" value="">
  <input type="hidden" name="__notNull" value="<%=screen.getRequire()%>">
  <input type="hidden" name="__fixCon"  value="">
  <input type="hidden" name="__cmd"  value="">
  <input type="hidden" name="__calendar">
  <script language="javascript">getInputFormatDate();</script>
  <input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>">
  <input type="hidden" name="__user" value="<%=screen.getUProfile().getUserId()%>">
  <input name="__companyid" type="hidden" value='<%=screen.getUProfile().get("companyid")%>'> 
  <input type="hidden" name="__referPage" value="">
  <input type="hidden" name="__mainclearing" value="SETUP">
  <input type="hidden" name="__list_for_clearing" value="<%=chk.chkNullString(request.getParameter("__list_for_clearing"))%>">
   <div align="center">
   <script language="JavaScript" src="../JS/HOTKEY.js"></script>
	<script language="javascript">
		 var swap = new swaplang();
	     var titlename = swap.swap2String("SW012011");
		 document.write(Icons("PSM046,"+titlename)); 
	 </script>
    <br>
    <table style="width: 700px">
        <tr> 
            <td class="header">PSM046,<span swlang code="SW012011">Tax Allowance list for clearing</span>&nbsp;</td>
        </tr>
        <tr> 
            <td>
                <table border="0" cellpadding="0" cellspacing="0" align="center">
                    <tr>
                        <td class="blankspace"></td>
                    </tr>
                    <tr>
                        <td class="blankspace"></td>
                    </tr>
                    <%
                        String lang = screen.getUProfile().get("lang");
                        String head1, head2, head3, head4, head5, head6, head7, head8, head9, head10;
                        String subhead1_1, subhead1_2, subhead1_3, subhead1_4;
                        if(lang.equals("tha")){
                            subhead1_1 = "บิดาของผู้มีเงินได้";
                            subhead1_2 = "มารดาของผู้มีเงินได้";
                            subhead1_3 = "บิดาของคู่สมรส";
                            subhead1_4 = "มารดาของคู่สมรส";
                            head1 = "อุปการะเลี้ยงดูบิดามารดา";
                            head2 = "เบี้ยประกันสุขภาพบิดามารดา";
                            head3 = "เบี้ยประกันชีวิต";
                            head4 = "เบี้ยประกันของคู่สมรส";
                            head5 = "ค่าซื้อหน่วยลงทุนในกองทุนรวมเพื่อการเลี้ยงชีพ (RMF)";
                            head6 = "ค่าซื้อหน่วยลงทุนในกองทุนรวมหุ้นระยะยาว (LTF)";
                            head7 = "อุปการะเลี้ยงดูคนพิการหรือทุพพลภาพ";
                            head8 = "เงินบริจาค";
                            head9 = "ดอกเบี้ยเงินกู้ยืม เพื่อซื้อ เช่าซื้อ หรือสร้างอาคารที่อยู่อาศัย";
                            head10 = "ค่าการเดินทางท่องเที่ยวภายในประเทศ";
                        } else {
                            subhead1_1 = "Father of taxpayer";
                            subhead1_2 = "Mother of taxpayer";
                            subhead1_3 = "Father of Spouse";
                            subhead1_4 = "Mother of Spouse";
                            head1 = "Parent allowance for Taxpayer's and Spouse's Parent";
                            head2 = "Health Insurance Premium for Taxpayer's and Spouse's Parent";
                            head3 = "Life Insurance premiums";
                            head4 = "Spouse Premium Amount";
                            head5 = "Retirement Mutual Fund (RMF)";
                            head6 = "Long term Equity Fund (LTF)";
                            head7 = "Care of a disabled or an incapacitated person";
                            head8 = "Donation Allowance";
                            head9 = "Interest on Housing Loan";
                            head10 = "Travel in country";
                        }
                    %>
                    <!-- การสร้างเพิ่ม ให้ตั้งชื่อ Name และ Value ชื่อเดียวกัน พร้อมให้ class="taxall_list" ส่วนการตั้งชื่อนั้นคือ ชื่อ field ตามด้วย Type ( $S == String $D == Double ) ตัวอย่าง field$D  -->
                    <tr>
                        <td>
                            1. <%=head1%><br>
                            <span style="margin-left:3em"><input type="checkbox" class="taxall_list" name="fthidcard$S" value="fthidcard$S" <%if(fthidcard != ""){%>checked<%}%>> <%=subhead1_1%></span><br>
                            <span style="margin-left:3em"><input type="checkbox" class="taxall_list" name="mthidcard$S" value="mthidcard$S" <%if(mthidcard != ""){%>checked<%}%>> <%=subhead1_2%></span><br>
                            <span style="margin-left:3em"><input type="checkbox" class="taxall_list" name="fthmryidcard$S" value="fthmryidcard$S" <%if(fthmryidcard != ""){%>checked<%}%>> <%=subhead1_3%></span><br>
                            <span style="margin-left:3em"><input type="checkbox" class="taxall_list" name="mthmryidcard$S" value="mthmryidcard$S" <%if(mthmryidcard != ""){%>checked<%}%>> <%=subhead1_4%></span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            2. <%=head2%><br>
                            <span style="margin-left:3em"><input type="checkbox" class="taxall_list" name="ins_fat$D" value="ins_fat$D" <%if(ins_fat != ""){%>checked<%}%>> <%=subhead1_1%></span><br>
                            <span style="margin-left:3em"><input type="checkbox" class="taxall_list" name="ins_mot$D" value="ins_mot$D" <%if(ins_mot != ""){%>checked<%}%>> <%=subhead1_2%></span><br>
                            <span style="margin-left:3em"><input type="checkbox" class="taxall_list" name="ins_fat_spouse$D" value="ins_fat_spouse$D" <%if(ins_fat_spouse != ""){%>checked<%}%>> <%=subhead1_3%></span><br>
                            <span style="margin-left:3em"><input type="checkbox" class="taxall_list" name="ins_mot_spouse$D" value="ins_mot_spouse$D" <%if(ins_mot_spouse != ""){%>checked<%}%>> <%=subhead1_4%></span>
                        </td>
                    </tr>
                    <tr>
                        <td>3. <input type="checkbox" class="taxall_list" name="insurance$D" value="insurance$D" <%if(insurance != ""){%>checked<%}%>> <%=head3%></td>
                    </tr>
                    <tr>
                        <td>4. <input type="checkbox" class="taxall_list" name="insurance_spouse$D" value="insurance_spouse$D" <%if(insurance_spouse != ""){%>checked<%}%>> <%=head4%></td>
                    </tr>
                    <tr>
                        <td>5. <input type="checkbox" class="taxall_list" name="rmf$D" value="rmf$D" <%if(rmf != ""){%>checked<%}%>> <%=head5%></td>
                    </tr>
                    <tr>
                        <td>6. <input type="checkbox" class="taxall_list" name="ltf$D" value="ltf$D" <%if(ltf != ""){%>checked<%}%>> <%=head6%></td>
                    </tr>
                    <tr>
                        <td>7. <input type="checkbox" class="taxall_list" name="crippleallowance$D" value="crippleallowance$D" <%if(crippleallowance != ""){%>checked<%}%>> <%=head7%></td>
                    </tr>
                    <tr>
                        <td>8. <input type="checkbox" class="taxall_list" name="donation$D" value="donation$D" <%if(donation != ""){%>checked<%}%>> <%=head8%></td>
                    </tr>
                    <tr>
                        <td>9. <input type="checkbox" class="taxall_list" name="first_home$D" value="first_home$D" <%if(first_home != ""){%>checked<%}%>> <%=head9%></td>
                    </tr>
                    <tr>
                        <td>10. <input type="checkbox" class="taxall_list" name="travel_in_country$D" value="travel_in_country$D" <%if(travel_in_country != ""){%>checked<%}%>> <%=head10%></td>
                    </tr>
                    <tr>
                        <td class="blankspace"></td>
                    </tr>
                    <tr> 
                        <td align="right"><%=screen.getEditCheck() %>&nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr> 
            <td class="bottom" ></td>
        </tr>
    </table>
   </div>


<!----------BEGIN CSC ENDING ZONE ------------------------>

<%=screen.endJSP()%>

<!----------END CSC ENDING ZONE -------------------------->

</form>
</body>
</html>