Commit 81932b54 authored by dpingle's avatar dpingle

* Changes done in Leave master [19/08/2019]

leave11.xml
leave21.xml
d_leave_brow.srd
d_leave_edit.srd
LeavesIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@205424 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 07dbbe4a
......@@ -78,14 +78,14 @@
<dbname>leaves.chg_user</dbname>
</table_column>
<table_column>
<type size="15">char</type>
<type size="300">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>chg_term</name>
<dbname>leaves.chg_term</dbname>
</table_column>
<table_column>
<type size="2">char</type>
<type size="1">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>lve_unit</name>
......@@ -95,8 +95,15 @@
<item display="Hours" data="H"/>
</values>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;leaves&quot; ) COLUMN(NAME=&quot;leaves.descr&quot;) COLUMN(NAME=&quot;leaves.lve_code&quot;) COLUMN(NAME=&quot;leaves.chg_date&quot;) COLUMN(NAME=&quot;leaves.chg_user&quot;) COLUMN(NAME=&quot;leaves.chg_term&quot;) COLUMN(NAME=&quot;leaves.lve_unit&quot;)) </retrieve>
<update>leaves</update>
<table_column>
<type size="1">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>allow_adv_leave</name>
<dbname>leaves.allow_adv_leave</dbname>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;leaves&quot; ) COLUMN(NAME=&quot;leaves.descr&quot;) COLUMN(NAME=&quot;leaves.lve_code&quot;) COLUMN(NAME=&quot;leaves.chg_date&quot;) COLUMN(NAME=&quot;leaves.chg_user&quot;) COLUMN(NAME=&quot;leaves.chg_term&quot;) COLUMN(NAME=&quot;leaves.lve_unit&quot;) COLUMN(NAME=&quot;leaves.allow_adv_leave&quot;)) </retrieve>
<update>LEAVES</update>
<updatewhere>0</updatewhere>
<updatekeyinplace>no</updatekeyinplace>
</TableDefinition>
......@@ -486,6 +493,63 @@
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>7</id>
<alignment>0</alignment>
<tabsequence>40</tabsequence>
<border>0</border>
<color>0</color>
<x>853</x>
<y>1</y>
<height>16</height>
<width>119</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>allow_adv_leave</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Allow Adv Leave</text>
<border>6</border>
<color>33554432</color>
<x>852</x>
<y>2</y>
<height>16</height>
<width>120</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>allow_adv_leave_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>553648127</color>
</background>
</TextObject>
<HtmlTable>
<border>1</border>
</HtmlTable>
......
......@@ -800,7 +800,7 @@
<border>5</border>
<color>0</color>
<x>180</x>
<y>252</y>
<y>253</y>
<height>16</height>
<width>55</width>
<format>[Yes/No]</format>
......
......@@ -10,9 +10,10 @@ table(column=(type=char(20) update=yes updatewhereclause=yes name=descr dbname="
column=(type=char(5) update=yes updatewhereclause=yes key=yes name=lve_code dbname="leaves.lve_code" )
column=(type=datetime update=yes updatewhereclause=yes name=chg_date dbname="leaves.chg_date" )
column=(type=char(10) update=yes updatewhereclause=yes name=chg_user dbname="leaves.chg_user" )
column=(type=char(15) update=yes updatewhereclause=yes name=chg_term dbname="leaves.chg_term" )
column=(type=char(2) update=yes updatewhereclause=yes name=lve_unit dbname="leaves.lve_unit" values="Days D/Hours H/" )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"leaves~" ) COLUMN(NAME=~"leaves.descr~") COLUMN(NAME=~"leaves.lve_code~") COLUMN(NAME=~"leaves.chg_date~") COLUMN(NAME=~"leaves.chg_user~") COLUMN(NAME=~"leaves.chg_term~") COLUMN(NAME=~"leaves.lve_unit~")) " update="leaves" updatewhere=0 updatekeyinplace=no )
column=(type=char(300) update=yes updatewhereclause=yes name=chg_term dbname="leaves.chg_term" )
column=(type=char(1) update=yes updatewhereclause=yes name=lve_unit dbname="leaves.lve_unit" values="Days D/Hours H/" )
column=(type=char(1) update=yes updatewhereclause=yes name=allow_adv_leave dbname="leaves.allow_adv_leave" )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"leaves~" ) COLUMN(NAME=~"leaves.descr~") COLUMN(NAME=~"leaves.lve_code~") COLUMN(NAME=~"leaves.chg_date~") COLUMN(NAME=~"leaves.chg_user~") COLUMN(NAME=~"leaves.chg_term~") COLUMN(NAME=~"leaves.lve_unit~") COLUMN(NAME=~"leaves.allow_adv_leave~")) " update="LEAVES" updatewhere=0 updatekeyinplace=no )
text(band=header alignment="0" text="Leave Code" border="6" color="0" x="2" y="2" height="16" width="93" html.valueishtml="0" name=lve_code_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
text(band=header alignment="0" text="Change Date" border="6" color="0" x="621" y="2" height="16" width="75" html.valueishtml="0" name=chg_date_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
text(band=header alignment="0" text="Change User" border="6" color="0" x="698" y="2" height="16" width="75" html.valueishtml="0" name=chg_user_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
......@@ -25,6 +26,8 @@ column(band=detail id=4 alignment="0" tabsequence=32766 border="5" color="0" x="
column(band=detail id=1 alignment="0" tabsequence=20 border="5" color="0" x="97" y="2" height="18" width="439" format="[general]" html.valueishtml="0" name=descr visible="1" edit.limit=15 edit.case=any edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=5 alignment="0" tabsequence=32766 border="5" color="0" x="775" y="2" height="18" width="75" format="[general]" html.valueishtml="0" name=chg_term visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=6 alignment="0" tabsequence=30 border="5" color="0" x="538" y="2" height="18" width="81" format="[general]" html.valueishtml="0" name=lve_unit visible="1" ddlb.limit=1 ddlb.allowedit=no ddlb.case=upper ddlb.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=7 alignment="0" tabsequence=40 border="0" color="0" x="853" y="1" height="16" width="119" html.valueishtml="0" name=allow_adv_leave visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=header alignment="0" text="Allow Adv Leave" border="6" color="33554432" x="852" y="2" height="16" width="120" html.valueishtml="0" name=allow_adv_leave_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" )
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
......
......@@ -45,7 +45,7 @@ column(band=detail id=14 alignment="0" tabsequence=140 border="5" color="0" x="1
text(band=detail alignment="1" text="Min Allowed :" border="0" color="0" x="68" y="228" height="16" width="107" html.valueishtml="0" name=min_allowed_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
column(band=detail id=18 alignment="1" tabsequence=160 border="5" color="0" x="180" y="228" height="16" width="53" format="#0.0" html.valueishtml="0" name=min_allowed visible="1" edit.limit=5 edit.case=any edit.format="##0.0" edit.focusrectangle=no edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Allow Advance Leave :" border="0" color="0" x="22" y="252" height="16" width="153" html.valueishtml="0" name=allow_adv_leave_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
column(band=detail id=23 alignment="0" tabsequence=190 border="5" color="0" x="180" y="252" height="16" width="55" format="[Yes/No]" html.valueishtml="0" name=allow_adv_leave visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=23 alignment="0" tabsequence=190 border="5" color="0" x="180" y="253" height="16" width="55" format="[Yes/No]" html.valueishtml="0" name=allow_adv_leave visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Max Allowed :" border="0" color="0" x="239" y="229" height="16" width="88" html.valueishtml="0" name=max_allowed_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
column(band=detail id=19 alignment="1" tabsequence=170 border="5" color="0" x="331" y="228" height="16" width="55" format="#0.0" html.valueishtml="0" name=max_allowed visible="1" edit.limit=5 edit.case=any edit.format="##0.0" edit.focusrectangle=no edit.autoselect=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Max Times :" border="0" color="0" x="406" y="228" height="16" width="81" html.valueishtml="0" name=max_times_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
......
......@@ -9,7 +9,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import java.rmi.RemoteException;
import com.sybase.ejb.RemoteException;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
......@@ -61,7 +61,7 @@ public class LeavesIC extends ValidatorEJB implements LeavesRemote, LeavesLocal
String lveCode = "";
String balOpt = "N";
String adCodeEnch = "";
String allowAdvleave = "";
int cnt = 0;
colName = currentColumn;
int currentFormNo = 0;
......@@ -184,7 +184,8 @@ public class LeavesIC extends ValidatorEJB implements LeavesRemote, LeavesLocal
}
else
{
valueXmlString.append("<allow_adv_leave protect=\"0\"><![CDATA[").append("").append("]]></allow_adv_leave>\r\n");
allowAdvleave = checkNull(genericUtility.getColumnValue("allow_adv_leave", dom));
valueXmlString.append("<allow_adv_leave protect=\"0\"><![CDATA[").append(allowAdvleave).append("]]></allow_adv_leave>\r\n");
}
encashable = checkNull(genericUtility.getColumnValue("encashable", dom));
......@@ -293,7 +294,8 @@ public class LeavesIC extends ValidatorEJB implements LeavesRemote, LeavesLocal
}
else
{
valueXmlString.append("<allow_adv_leave protect=\"0\"><![CDATA[").append("").append("]]></allow_adv_leave>\r\n");
allowAdvleave = checkNull(genericUtility.getColumnValue("allow_adv_leave", dom));
valueXmlString.append("<allow_adv_leave protect=\"0\"><![CDATA[").append(allowAdvleave).append("]]></allow_adv_leave>\r\n");
}
}
......@@ -455,8 +457,47 @@ public class LeavesIC extends ValidatorEJB implements LeavesRemote, LeavesLocal
childNodeName = childNode.getNodeName();
System.out.println("childNodeName.editFlag." + childNodeName + "" + editFlag);
System.out.println("@V@ Edit flag :- [" + editFlag + "");
if (childNodeName.equalsIgnoreCase("encashable"))
if (childNodeName.equalsIgnoreCase("lve_code"))
{
lveCode = checkNull(genericUtility.getColumnValue("lve_code", dom));
if (lveCode == null || lveCode.trim().length() == 0)
{
errList.add("INVLVEDATA");//The leave cannot Blank or Already Existed in Leaves Table
errFields.add(childNodeName.toLowerCase());
}
else
{
cnt = 0 ;
sql="select count(*) as cnt from leaves where lve_code=?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lveCode);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
System.out.println("cnt:::: " + cnt);
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
/*if (cnt == 0)
{
errList.add("INVLVEDATA");//The leave cannot Blank or Already Existed in Leaves Table
errFields.add(childNodeName.toLowerCase());
}*/
}
}
else if (childNodeName.equalsIgnoreCase("encashable"))
{
encashable = checkNull(genericUtility.getColumnValue("encashable", dom));
if (encashable.trim().equalsIgnoreCase("C")) {
......@@ -508,7 +549,20 @@ public class LeavesIC extends ValidatorEJB implements LeavesRemote, LeavesLocal
{
minAllowed = Integer.parseInt(checkInt(genericUtility.getColumnValue("min_allowed", dom)));
maxAllowed = Integer.parseInt(checkInt(genericUtility.getColumnValue("max_allowed", dom)));
System.out.println("minAllowed:::::::"+minAllowed);
System.out.println("maxAllowed:::::::"+maxAllowed);
if(minAllowed < 0 )
{
errList.add("VMNUMBER1");
errFields.add(childNodeName.toLowerCase());
}
if(maxAllowed < 0 )
{
errList.add("VMNUMBER1");
errFields.add(childNodeName.toLowerCase());
}
if (minAllowed > 0 && maxAllowed > 0 && minAllowed > maxAllowed)
{
errList.add("VMNUMBER1");
......
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