#11524 แก้ไขการดึงข้อมูลที่อยู่ โดนอ้างอิง Branch จาก Option

hrAppWeb.war\WEB-INF\lib\PRBean.jar
com.csc.library.databean;
Simmemployee_tax91kor
สร้าง else if (name.toLowerCase().indexOf("_addr") > -1)
ภงด1ก ใบปะ ใบแนบ
parent 27fe4564
......@@ -69,6 +69,10 @@
<parameter name="TFULLNAME" isForPrompting="false" class="java.lang.String">
<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
</parameter>
<parameter name="BRANCH_NO" isForPrompting="false" class="java.lang.String">
<parameterDescription><![CDATA[component]]></parameterDescription>
<defaultValueExpression ><![CDATA[""]]></defaultValueExpression>
</parameter>
<field name="memployee__employeeid" class="java.lang.String">
<fieldDescription><![CDATA[Field returned by memployee__employeeid]]></fieldDescription>
......@@ -1631,7 +1635,7 @@ $F{memployee__employeeid}
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Identity-H" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{mbranch__branch_no}.length()>0?$F{mbranch__branch_no}.substring(0,1):""]]></textFieldExpression>
<textFieldExpression class="java.lang.String"><![CDATA[$P{BRANCH_NO}.length()>0?$P{BRANCH_NO}.substring(0,1):""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
......@@ -1647,7 +1651,7 @@ $F{memployee__employeeid}
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Identity-H" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{mbranch__branch_no}.length()>1?$F{mbranch__branch_no}.substring(1,2):""]]></textFieldExpression>
<textFieldExpression class="java.lang.String"><![CDATA[$P{BRANCH_NO}.length()>1?$P{BRANCH_NO}.substring(1,2):""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
......@@ -1663,7 +1667,7 @@ $F{memployee__employeeid}
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Identity-H" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{mbranch__branch_no}.length()>2?$F{mbranch__branch_no}.substring(2,3):""]]></textFieldExpression>
<textFieldExpression class="java.lang.String"><![CDATA[$P{BRANCH_NO}.length()>2?$P{BRANCH_NO}.substring(2,3):""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
......@@ -1679,7 +1683,7 @@ $F{memployee__employeeid}
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Identity-H" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{mbranch__branch_no}.length()>3?$F{mbranch__branch_no}.substring(3,4):""]]></textFieldExpression>
<textFieldExpression class="java.lang.String"><![CDATA[$P{BRANCH_NO}.length()>3?$P{BRANCH_NO}.substring(3,4):""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
......@@ -1695,7 +1699,7 @@ $F{memployee__employeeid}
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Cordia New" pdfFontName="CORDIA.TTF" size="14" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Identity-H" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{mbranch__branch_no}.length()>4?$F{mbranch__branch_no}.substring(4,5):""]]></textFieldExpression>
<textFieldExpression class="java.lang.String"><![CDATA[$P{BRANCH_NO}.length()>4?$P{BRANCH_NO}.substring(4,5):""]]></textFieldExpression>
</textField>
<line direction="TopDown">
<reportElement
......
......@@ -60,7 +60,7 @@
</ORDER>>
</TABLE>
<TABLE name="mprovince" status="center" central="csczipcode" out="inquiry">
<TABLE name="mprovince" status="center" central="mzipcode" out="inquiry">
<FIELD>provinceid</FIELD>
<FIELD>short_ename</FIELD>
<FIELD>short_tname</FIELD>
......
......@@ -106,41 +106,41 @@
<FIELD>provinceid</FIELD>
</ORDER>
</TABLE>
<TABLE name="mcompany" status="center" central="false" out="inquiry">
<FIELD>companyid</FIELD>
<FIELD>ename</FIELD>
<FIELD>tname</FIELD>
<FIELD>troom_no</FIELD>
<FIELD>tfloor</FIELD>
<FIELD>tsoi</FIELD>
<FIELD>tmoo</FIELD>
<FIELD>troad</FIELD>
<FIELD>tvillage</FIELD>
<FIELD>tdistrict</FIELD>
<FIELD>taddr</FIELD>
<FIELD>eroom_no</FIELD>
<FIELD>efloor</FIELD>
<FIELD>esoi</FIELD>
<FIELD>emoo</FIELD>
<FIELD>eroad</FIELD>
<FIELD>evillage</FIELD>
<FIELD>edistrict</FIELD>
<FIELD>eaddr</FIELD>
<FIELD>zipcode</FIELD>
<FIELD>amphur</FIELD>
<FIELD>tel</FIELD>
<FIELD>fax</FIELD>
<FIELD>no_of_branch</FIELD>
<FIELD>tsubdistrict</FIELD>
<FIELD>provinceid</FIELD>
<FIELD>districtid</FIELD>
<ORDER>
<FIELD>companyid</FIELD>
</ORDER>
</TABLE>
<TABLE name="mcompany" status="center" central="false" out="inquiry">
<FIELD>companyid</FIELD>
<FIELD>ename</FIELD>
<FIELD>tname</FIELD>
<FIELD>troom_no</FIELD>
<FIELD>tfloor</FIELD>
<FIELD>tsoi</FIELD>
<FIELD>tmoo</FIELD>
<FIELD>troad</FIELD>
<FIELD>tvillage</FIELD>
<FIELD>tdistrict</FIELD>
<FIELD>taddr</FIELD>
<FIELD>eroom_no</FIELD>
<FIELD>efloor</FIELD>
<FIELD>esoi</FIELD>
<FIELD>emoo</FIELD>
<FIELD>eroad</FIELD>
<FIELD>evillage</FIELD>
<FIELD>edistrict</FIELD>
<FIELD>eaddr</FIELD>
<FIELD>zipcode</FIELD>
<FIELD>amphur</FIELD>
<FIELD>tel</FIELD>
<FIELD>fax</FIELD>
<FIELD>no_of_branch</FIELD>
<FIELD>tsubdistrict</FIELD>
<FIELD>provinceid</FIELD>
<FIELD>districtid</FIELD>
<ORDER>
<FIELD>companyid</FIELD>
</ORDER>
</TABLE>
<TABLE name="mzipcode" status="" central="mcompany" out="inquiry">
<TABLE name="mzipcode" status="" central="mbranch" out="inquiry">
<FIELD>companyid</FIELD>
<FIELD>zipcode</FIELD>
<FIELD>tdesc</FIELD>
......@@ -151,7 +151,7 @@
<FIELD>zipcode</FIELD>
</ORDER>
</TABLE>
<TABLE name="mdistrict" status="" central="mcompany" out="inquiry">
<TABLE name="mdistrict" status="" central="mbranch" out="inquiry">
<FIELD>districtid</FIELD>
<FIELD>tdesc</FIELD>
<FIELD>edesc</FIELD>
......
......@@ -25,6 +25,7 @@
<FIELD type="String" size="100">memployee._count40_2</FIELD>
<FIELD type="String" size="100">memployee._inc40_1</FIELD>
<FIELD type="String" size="100">memployee._inc40_2</FIELD>
<FIELD type="String" size="100">memployee._addr</FIELD>
</VFIELD>
<GROUP >
</GROUP>
......@@ -42,5 +43,6 @@
<FIELD type="text" name="fullname" desc="ค้นหาชื่อพนักงาน" size="40" value=""></FIELD>
<FIELD type="text" name="position" desc="กำหนดตำแหน่ง" size="40" value=""></FIELD>
<FIELD type="text" name="signature" desc="ลายเซ็นต์" size="50" value=""></FIELD>
<FIELD type="text" name="addr" desc="ที่อยู่" size="10" value=""></FIELD>
</COMPONENT>
</REPORTXML>
......@@ -50,6 +50,7 @@
<FIELD type="text" name="addr" desc="Addr" size="20" value=""></FIELD>
<FIELD type="hidden" name="period_branch" desc="Period branch" size="4" maxsize="5" value=""></FIELD>
<FIELD type="hidden" name="branch_tdesc" desc="branch tdesc" size="100" value=""></FIELD>
<FIELD type="hidden" name="branch_no" desc="branch no" size="6" value=""></FIELD>
</COMPONENT>
<!-- <CHILD_CHK>MEMPL_TAXM</CHILD_CHK> -->
</REPORTXML>
......@@ -64,11 +64,13 @@ function back(){
}
}
var year= __period_year.value;
window.opener.document.cscform.__fixfiltermemployee.value = "employeeid in( select employeeid from mempl_taxy where taxy_year='"+year+"') and caltax != '0'";
if($("#addr").val()=="NONE"){
alert("กรุณาเลือกที่อยู่");
return ;
}else{
var year= __period_year.value;
window.opener.document.cscform.__fixfiltermemployee.value = "employeeid in( select employeeid from mempl_taxy where taxy_year='"+year+"') and caltax != '0'";
}
}
window.close();
}
......@@ -117,6 +119,9 @@ function goHelp(helpName,inputName) {
if (inputName=="__codeid" ) {
helpReturn="__codeid:codeid,MLEAVE_REPORT@EDESC";
}
if (inputName=="__addr" ) {
helpReturn="__addr:branchid,MBRANCH@EDESC";
}
if (inputName=="__fullname" ) {
helpReturn="__signature:signature,__fullname:FULLNAME,__position:POSITIONNAME";
}
......@@ -192,52 +197,54 @@ function setPayDate(Obj){
<td colspan="2">
<div align="center">
<table cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" class="blankspace"></td>
</tr>
<tr>
<td><div align="right">ปีภาษี&nbsp;</div></td>
<td><input type="text" name="__period_year" maxlength = "4" value="<%=cs.getEngYYYY()%>" onkeypress = "chkInteger()" onkeyup = "formatYear(this)" onblur = "chkTrueYear(this)">&nbsp;
<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('calendar2','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"> </a>
</td>
</tr>
<tr>
<td width="150" align="right"><span swlang code="SW013411">Signature</span>&nbsp;</td>
<td width="475" align="left"><input type="text" name="__fullname" size="20">&nbsp;
<a href="javascript:goHelp('memployeehelp','__fullname')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)">
<img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="Image2" width="20" height="20" border="0" align="absmiddle"></a>
</tr>
<tr >
<td width="150" align="right"><span swlang code="SW000057">Position</span>&nbsp;</td>
<td width="475" align="left"><input type="text" name="__position" size="20">&nbsp;
</tr>
<tr>
<td><div align="right">วันที่นำส่ง&nbsp;</div></td>
<td>
<input type="text" name="__curr_date" value="<%=cs.getDDMMYYYY()%>" style="width:140px" onfocus="this.select();setFormatDatePayroll(this,'DDMMYYYY');" onkeypress="chkInteger(event);" onkeyup="sysIsEdit();formatDate(this);" onblur="">
<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('calendar1','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" name="calendar1" border="0" align="absmiddle" onClick="viewCal('__curr_date')" alt="Calendar"></a>
</td>
</tr>
<tr >
<td colspan="2" class="blankspace"></td>
</tr>
<tr>
<td class="buttonline" colspan="7"><div align="center">
<button type="button" class="btn btn-primary width100" swlang code="SW013169" onClick="back();">OK</button>&nbsp;
<button type="button" class="btn btn-primary width100" swlang code="SW006927" onClick="window.close();">CANCEL</button>
</div>
</td>
</tr>
<tr >
<td colspan="2" class="blankspace"></td>
</tr>
</table>
</div></td>
<tr>
<td colspan="2" class="blankspace"></td>
</tr>
<tr>
<td width="150" align="right"><span ><%=screen.getUProfile().get("lang").equals("tha")?"ที่อยู่ให้แสดง":"Address"%></span>&nbsp;</td>
<td width="475" align="left"><input type="text" name="__addr" id ="addr" size="20" value ="NONE">&nbsp;
<a href="javascript:goHelp('mbranchhelp','__addr')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)">
<img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="Image2" width="20" height="20" border="0" align="absmiddle"></a>
<input type="text" name="MBRANCH@EDESC" size="40" disabled>
</tr>
<tr>
<td><div align="right">ปีภาษี&nbsp;</div></td>
<td><input type="text" name="__period_year" maxlength = "4" value="<%=cs.getEngYYYY()%>" onkeypress = "chkInteger()" onkeyup = "formatYear(this)" onblur = "chkTrueYear(this)">&nbsp;
<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('calendar2','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"> </a>
</td>
</tr>
<tr>
<td width="150" align="right"><span swlang code="SW013411">Signature</span>&nbsp;</td>
<td width="475" align="left"><input type="text" name="__fullname" size="20">&nbsp;
<a href="javascript:goHelp('memployeehelp','__fullname')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)">
<img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="Image2" width="20" height="20" border="0" align="absmiddle"></a>
</tr>
<tr>
<td width="150" align="right"><span swlang code="SW000057">Position</span>&nbsp;</td>
<td width="475" align="left"><input type="text" name="__position" size="20">&nbsp;
</tr>
<tr>
<td><div align="right">วันที่นำส่ง&nbsp;</div></td>
<td>
<input type="text" name="__curr_date" value="<%=cs.getDDMMYYYY()%>" style="width:140px" onfocus="this.select();setFormatDatePayroll(this,'DDMMYYYY');" onkeypress="chkInteger(event);" onkeyup="sysIsEdit();formatDate(this);" onblur="">
<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('calendar1','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" name="calendar1" border="0" align="absmiddle" onClick="viewCal('__curr_date')" alt="Calendar"></a>
</td>
</tr>
<tr >
<td colspan="2" class="blankspace"></td>
</tr>
<tr>
<td class="buttonline" colspan="7"><div align="center">
<button type="button" class="btn btn-primary width100" swlang code="SW013169" onClick="back();">OK</button>&nbsp;
<button type="button" class="btn btn-primary width100" swlang code="SW006927" onClick="window.close();">CANCEL</button>
</div>
</td>
</tr>
<tr>
<td colspan="2" class="blankspace"></td>
</tr>
</table>
</div></td>
</tr>
<tr bordercolor="0069B3">
<td class="bottom"></td>
......
......@@ -156,7 +156,7 @@ function goHelp(helpName,inputName) {
helpReturn="__signature:signature,__fullname:FULLNAME,__position:POSITIONNAME,__efullname:efullname,__tfullname:tfullname";
}
if (inputName=="__period_branch" ) {
helpReturn="__period_branch:branchid,__branch_tdesc:tdesc";
helpReturn="__period_branch:branchid,__branch_tdesc:tdesc,__branch_no:branch_no";
}
linkHelp_Return(helpName,helpReturn);
}
......@@ -224,6 +224,7 @@ function setPayDate(Obj){
<input type="hidden" name="__efullname">
<input type="hidden" name="__tfullname">
<input type="hidden" name="__branch_tdesc">
<input type="hidden" name="__branch_no">
<div align="center">
<table cellpadding="0" cellspacing="0">
<tr >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment