Commit cf85e078 authored by dpingle's avatar dpingle

* updated src, srd, xml and sql file of cadre mthad component.

cadre_mthad21.xml
w_cadre_mthad.sql
d_cadre_mthad_edit.srd
CadreMthadIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@215741 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a9e85abf
......@@ -119,8 +119,6 @@ Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('cadr
update itm2menu set ICON_PATH='CadrewiseMonthlyPaystructure.png' , CLOSE_ICON='CadrewiseMonthlyPaystructurewht.png' where WIN_NAME='w_cadre_mthad';
Insert into POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,AUTO_MIN_LENGTH,OBJ_NAME__DS,DATA_MODEL_NAME,VALIDATE_DATA,ITEM_CHANGE,MSG_NO,FILTER_EXPR,LAYOUT) values ('MONTH_CODE','W_CADRE_MTHAD','SELECT DISTINCT(MONTH_CODE) FROM CADRE_MTHAD ','Month Code','Month Code',0,0,to_date('20-05-13','DD-MM-RR'),'VENKAT ','BASE ','1',null,null,null,null,null,null,null,null,null,'2',null,'3',null,null,null,'2 ',null,null,null,null,null,null,null);
Insert into POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,AUTO_MIN_LENGTH,OBJ_NAME__DS,DATA_MODEL_NAME,VALIDATE_DATA,ITEM_CHANGE,MSG_NO,FILTER_EXPR,LAYOUT) values ('PAY_TABLE','W_CADRE_MTHAD','SELECT PAY_TABLE, DESCR FROM PAYTABLE',null,'Pay Table No',0,0,to_date('27-05-00','DD-MM-RR'),'SUN ','CLIENT1 ','0',null,null,null,null,null,null,null,null,null,'2',null,'3','EmpImages','PAY_TABLE','DESCR','2 ',null,null,null,null,null,null,null);
......@@ -212,5 +210,25 @@ Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERAC
---------------------------------------------------- Dipesh[07/01/2020]End
---------------------------------------------------- Dipesh[27/01/2020]Start
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION)
values ('MTHCODNULL','Empty Month code!!','Month code cannot be null','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION)
values ('MTHINVAILD','Invaild Month code!!','Month code cannot be Greater than 12.','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION)
values ('PAYINVAILD','Invaild Pay table!!','Pay table No not present in master. ','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION)
values ('PAYTBLNULL','Empty Pay table!!','Pay table can not be null','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION)
values ('CADCODNULL','Empty cadre code!!','cadre code cannot be null','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION)
values ('CADINVAILD','Invaild cadre code!!','cadre code No not present in master.','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',null,null);
---------------------------------------------------- Dipesh[27/01/2020]End
......@@ -387,7 +387,7 @@
<tag>Allowance / Deduction Amount.</tag>
<visible>1</visible>
<EditStyle style="edit">
<limit>13</limit>
<limit>12</limit>
<case>any</case>
<format>#######0.00</format>
<focusrectangle>no</focusrectangle>
......@@ -455,7 +455,7 @@
<tag>Minimum basic salary for allowance / deduction.</tag>
<visible>1</visible>
<EditStyle style="edit">
<limit>13</limit>
<limit>12</limit>
<case>any</case>
<format>#######0.00</format>
<focusrectangle>no</focusrectangle>
......@@ -523,7 +523,7 @@
<tag>Minimum allowance / deduction amount.</tag>
<visible>1</visible>
<EditStyle style="edit">
<limit>13</limit>
<limit>12</limit>
<case>any</case>
<format>#######0.00</format>
<focusrectangle>no</focusrectangle>
......@@ -763,7 +763,7 @@
<tag>Maximum basic salary for allowance / deduction</tag>
<visible>1</visible>
<EditStyle style="edit">
<limit>13</limit>
<limit>12</limit>
<case>any</case>
<format>#######0.00</format>
<focusrectangle>no</focusrectangle>
......@@ -791,7 +791,7 @@
<tabsequence>90</tabsequence>
<border>5</border>
<color>0</color>
<x>402</x>
<x>401</x>
<y>139</y>
<height>16</height>
<width>94</width>
......@@ -803,7 +803,7 @@
<tag>Maximum allowance / deduction amount.</tag>
<visible>1</visible>
<EditStyle style="edit">
<limit>13</limit>
<limit>12</limit>
<case>any</case>
<format>#######0.00</format>
<focusrectangle>no</focusrectangle>
......
......@@ -28,19 +28,19 @@ groupbox(band=detail text="Basic"border="2" color="0" x="13" y="9" height="220"
column(band=detail id=4 alignment="0" tabsequence=10 border="5" color="0" x="151" y="43" height="16" width="57" format="[general]" html.valueishtml="0" name=ad_code tag="Allowance / Deduction code." visible="1" edit.limit=5 edit.case=upper edit.focusrectangle=no 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=12 alignment="0" tabsequence=32766 border="5" color="255" x="213" y="43" height="16" width="283" format="[general]" html.valueishtml="0" name=allwdedn_descr 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="79741120" )
text(band=detail alignment="1" text="Amount :" border="0" color="0" x="40" y="91" height="16" width="106" html.valueishtml="0" name=amount_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=13 alignment="1" tabsequence=40 border="5" color="0" x="151" y="91" height="16" width="94" format="#######0.00" html.valueishtml="0" name=amount tag="Allowance / Deduction Amount." visible="1" edit.limit=13 edit.case=any edit.format="#######0.00" edit.focusrectangle=no 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=13 alignment="1" tabsequence=40 border="5" color="0" x="151" y="91" height="16" width="94" format="#######0.00" html.valueishtml="0" name=amount tag="Allowance / Deduction Amount." visible="1" edit.limit=12 edit.case=any edit.format="#######0.00" edit.focusrectangle=no 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" )
text(band=detail alignment="1" text="Min. Base Amount :" border="0" color="0" x="27" y="115" height="16" width="119" html.valueishtml="0" name=min_basic_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=14 alignment="1" tabsequence=60 border="5" color="0" x="151" y="115" height="16" width="94" format="#######0.00" html.valueishtml="0" name=min_basic tag="Minimum basic salary for allowance / deduction." visible="1" edit.limit=13 edit.case=any edit.format="#######0.00" edit.focusrectangle=no 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=14 alignment="1" tabsequence=60 border="5" color="0" x="151" y="115" height="16" width="94" format="#######0.00" html.valueishtml="0" name=min_basic tag="Minimum basic salary for allowance / deduction." visible="1" edit.limit=12 edit.case=any edit.format="#######0.00" edit.focusrectangle=no 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" )
text(band=detail alignment="1" text="Min. Amount :" border="0" color="0" x="40" y="140" height="16" width="106" html.valueishtml="0" name=min_amt_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=16 alignment="1" tabsequence=80 border="5" color="0" x="151" y="139" height="16" width="94" format="#######0.00" html.valueishtml="0" name=min_amt tag="Minimum allowance / deduction amount." visible="1" edit.limit=13 edit.case=any edit.format="#######0.00" edit.focusrectangle=no 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=16 alignment="1" tabsequence=80 border="5" color="0" x="151" y="139" height="16" width="94" format="#######0.00" html.valueishtml="0" name=min_amt tag="Minimum allowance / deduction amount." visible="1" edit.limit=12 edit.case=any edit.format="#######0.00" edit.focusrectangle=no 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" )
text(band=detail alignment="1" text="Proportionate :" border="0" color="0" x="40" y="163" height="16" width="106" html.valueishtml="0" name=prop_yn_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=8 alignment="0" tabsequence=100 border="5" color="0" x="151" y="163" height="16" width="94" format="[Yes/No]" html.valueishtml="0" name=prop_yn tag="Propotionate ( yes / no )" 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="Pay Table :" border="0" color="0" x="40" y="187" height="16" width="106" html.valueishtml="0" name=pay_table_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=1 alignment="0" tabsequence=32766 border="5" color="255" x="151" y="187" height="16" width="94" format="[general]" html.valueishtml="0" name=pay_table tag="Pay Setup Table number." visible="1" edit.limit=5 edit.case=any edit.focusrectangle=no 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="67108864" )
text(band=detail alignment="1" text="Allow./Dedn. :" border="0" color="0" x="40" y="43" height="16" width="106" html.valueishtml="0" name=ad_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" )
column(band=detail id=7 alignment="0" tabsequence=50 border="5" color="0" x="402" y="91" height="16" width="94" format="[general]" html.valueishtml="0" name=type tag="Type ( Fixed or Percentage )" visible="1" ddlb.limit=1 ddlb.allowedit=no ddlb.case=any ddlb.vscrollbar=yes ddlb.useasborder=yes 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=15 alignment="1" tabsequence=70 border="5" color="0" x="402" y="115" height="16" width="94" format="#######0.00" html.valueishtml="0" name=max_basic tag="Maximum basic salary for allowance / deduction" visible="1" edit.limit=13 edit.case=any edit.format="#######0.00" edit.focusrectangle=no 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=17 alignment="1" tabsequence=90 border="5" color="0" x="402" y="139" height="16" width="94" format="#######0.00" html.valueishtml="0" name=max_amt tag="Maximum allowance / deduction amount." visible="1" edit.limit=13 edit.case=any edit.format="#######0.00" edit.focusrectangle=no 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=15 alignment="1" tabsequence=70 border="5" color="0" x="402" y="115" height="16" width="94" format="#######0.00" html.valueishtml="0" name=max_basic tag="Maximum basic salary for allowance / deduction" visible="1" edit.limit=12 edit.case=any edit.format="#######0.00" edit.focusrectangle=no 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=17 alignment="1" tabsequence=90 border="5" color="0" x="401" y="139" height="16" width="94" format="#######0.00" html.valueishtml="0" name=max_amt tag="Maximum allowance / deduction amount." visible="1" edit.limit=12 edit.case=any edit.format="#######0.00" edit.focusrectangle=no 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=2 alignment="0" tabsequence=32766 border="5" color="255" x="402" y="163" height="16" width="94" format="[general]" html.valueishtml="0" name=cadre_code tag="Cadre code." visible="1" edit.limit=5 edit.case=any edit.focusrectangle=no 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="67108864" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="5" color="255" x="402" y="187" height="16" width="94" format="[general]" html.valueishtml="0" name=month_code tag="Month code for allowance / deduction setting." visible="1" ddlb.limit=2 ddlb.allowedit=no ddlb.case=any ddlb.vscrollbar=yes ddlb.useasborder=yes 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="67108864" )
column(band=detail id=6 alignment="0" tabsequence=30 border="5" color="0" x="402" y="67" height="16" width="94" format="[shortdate] [time]" html.valueishtml="0" name=exp_date visible="1" edit.name="datetime" editmask.mask="dd/mm/yy" editmask.imemode=0 editmask.focusrectangle=no 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" )
......
......@@ -87,6 +87,7 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
int noOfChilds = 0;
int counter;
int cnt = 0;
int monthCodeInt = 0;
double amount = 0.0;
double minBasic = 0.0;
double maxBasic = 0.0;
......@@ -299,6 +300,115 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
errFields.add(childNodeName.toLowerCase());
}
}
else if ("cadre_code".equalsIgnoreCase(childNodeName))
{
cadreCode = checkNull(genericUtility.getColumnValue("cadre_code", dom));
if (cadreCode == null || cadreCode.trim().length() == 0)
{
errList.add("CADCODNULL");
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) as cnt from cadre where cadre_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, cadreCode);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errList.add("CADINVAILD");
errFields.add(childNodeName.toLowerCase());
}
}
}
else if ("pay_table".equalsIgnoreCase(childNodeName))
{
payTable = checkNull(genericUtility.getColumnValue("pay_table", dom));
if (payTable == null || payTable.trim().length() == 0)
{
errList.add("PAYTBLNULL");
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) as cnt from Paytable where pay_table = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, payTable);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errList.add("PAYINVAILD");
errFields.add(childNodeName.toLowerCase());
}
}
}
else if ("month_code".equalsIgnoreCase(childNodeName))
{
monthCode = checkNull(genericUtility.getColumnValue("month_code", dom));
System.out.println("monthCode:::"+monthCode);
if (monthCode == null || monthCode.trim().length() == 0)
{
errList.add("MTHCODNULL");
errFields.add(childNodeName.toLowerCase());
}
else
{
System.out.println("inside else:::"+monthCode);
if(monthCode != null && monthCode.trim().length() > 0)
{
try
{
monthCodeInt = Integer.parseInt(monthCode);
if(monthCodeInt > 12)
{
errList.add("MTHINVAILD");
errFields.add(childNodeName.toLowerCase());
}
}
catch(Exception e)
{
errList.add("MTHINVAILD");
errFields.add(childNodeName.toLowerCase());
}
}
}
}
}
break;
}
......
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