Commit 924f9957 authored by dpingle's avatar dpingle

* Change done in leave balance on [10/09/19]

w_leavebal.sql
leaveBalIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@207124 ce508802-f39f-4f6c-b175-0d175dae99d5
parent dc4dd1d2
......@@ -167,9 +167,33 @@ Upto : {upto_date}
update messages set MSG_DESCR='Eff Date cannot be greater the Upto date.' where msg_no='VTLVEDATE1';
update messages set MSG_DESCR='Upto Date cannot be greater the expiry date.' where msg_no='VTLVEDATE4';
----------------------------------------------------- Dipesh [04/09/2019] End
----------------------------------------------------- Dipesh [10/09/2019] Start
delete from obj_forms where win_name='w_leavebal';
Insert into OBJ_FORMS (WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_EXPR,EXPR_FLD_INFO,TARGET_FLD_INFO,EXPR_COMMENT,FORM_NO,SCR_FLAG,AUTO_ACCEPT_SCAN,SCAN_FLAG,SCAN_METADATA,PROPERTY_INFO,SCAN_DELIMITER,COLUMN_ON_SAVE,AFTER_SAVE,EXT_SETUP,EXT_METADATA,EXT_COM,AUTO_ACCEPT_WEIGHDATA,FORM_TYPE,DISP_METADATA,PARENT_KEY_COL,QTY_COL,RATE_COL,ASSISTED_MODE,STORAGE_KEY_METADATA,SELECTION_MODE,DEFAULT_VIEW,AUTO_ADDON_ENTRY,DUPLICATE_ADD,DEFAULT_ROW_CNT,FREEZE_COL_POS,IS_MANDATORY,TRAN_ID_COL,SELECTION_OPT,KEY_INFO,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,FORM_NAME,FORM_ICON,FORM_VIEW_OPTS,X_COLUMN,Y_COLUMN,ACTION_ARG) values ('w_leavebal','Leave Balance','d_leavebal_BROW','d_leavebal_edit',null,null,null,null,'1','F',null,null,null,null,null,null,null,null,null,null,null,null,'<html>
<span style="white-space: normal !important; word-break: break-word; ">Leave Code : {leaves_descr} (<b>{lve_code}</b>) , Effective From : {eff_date} <br/>
Upto : {upto_date}
</span>
<br/> <span style="float:right;"> <b> {chg_date} </b></span>
</html>',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'DetailForm.png',null,null,null,null);
update obj_forms set disp_metadata=
'<html>
<span style="white-space: normal !important; word-break: break-word; ">Leave Code :(<b>{lve_code}</b>) , Effective From : (<b>{eff_date}</b>) <br/>
Upto : (<b>{upto_date}<b>)
</span>
<br/> <span style="float:right;"></b></span>
</html>' where win_name='w_leavebal';
----------------------------------------------------- Dipesh [10/09/2019] End
......@@ -92,6 +92,7 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
String effDateStr = "";
String expDateStr = "";
String msgType = "";
String balDaysStr = "";
int balDays = 0;
int currentFormNo = 0;
int noOfChilds = 0;
......@@ -202,6 +203,7 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
if (rs.next())
{
lsLveTable = rs.getString("ls_lve_table");
System.out.println("lsLveTable:::::22222"+lsLveTable);
}
if (rs != null)
{
......@@ -224,6 +226,7 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
if (rs.next())
{
lsLveTable = rs.getString("ls_lve_table");
System.out.println("lsLveTable:::::111111"+lsLveTable);
}
if (rs != null)
{
......@@ -247,6 +250,7 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
if (rs.next())
{
cnt = rs.getInt("cnt");
System.out.println("cnt:::::"+cnt);
}
if (rs != null)
{
......@@ -347,7 +351,16 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
}
else if ("bal_days".equalsIgnoreCase(childNodeName))
{
balDays = Integer.parseInt(checkNull(genericUtility.getColumnValue("bal_days", dom)));
balDaysStr = checkNull(genericUtility.getColumnValue("bal_days", dom));
try
{
balDays = Integer.parseInt(balDaysStr);
}
catch (Exception e)
{
balDays = 0;
}
if(balDays < 0)
{
errList.add("VTBALDAYS");
......@@ -1063,21 +1076,50 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
pstmt.close();
pstmt = null;
}
availDaysStr = checkInt(genericUtility.getColumnValue("avail_days", dom));
availDays = Integer.parseInt(availDaysStr);
consDaysStr = checkInt(genericUtility.getColumnValue("cons_days", dom));
consDays = Integer.parseInt(consDaysStr);
availDaysStr = checkNull(genericUtility.getColumnValue("avail_days", dom));
try
{
availDays = Integer.parseInt(availDaysStr);
}
catch (Exception e)
{
availDays = 0;
}
consDaysStr = checkInt(genericUtility.getColumnValue("cons_days", dom));
try
{
consDays = Integer.parseInt(consDaysStr);
}
catch (Exception e)
{
consDays = 0;
}
convDaysStr = checkInt(genericUtility.getColumnValue("conv_days", dom));
convDays = Integer.parseInt(convDaysStr);
try
{
convDays = Integer.parseInt(convDaysStr);
}
catch (Exception e)
{
convDays = 0;
}
if(enchDays == 0)
{
enchDays = 0;
}
enchDaysStr = checkInt(genericUtility.getColumnValue("ench_days", dom));
enchDays = Integer.parseInt(enchDaysStr);
try
{
enchDays = Integer.parseInt(enchDaysStr);
}
catch (Exception e)
{
enchDays = 0;
}
lcBalDays = availDays + convDays - consDays - enchDays;
valueXmlString.append("<bal_days ><![CDATA[").append(lcBalDays).append("]]></bal_days>\r\n");
......@@ -1213,3 +1255,4 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
}
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