Commit e41ae498 authored by pbhosale's avatar pbhosale

* done Changes by Poonam B[04-OCT-2019]

arrears_deletion11.xml
ArrearsDeletePrc.java
ArrearsDeleteIC.java
PayarrToProc.java
ArrearsDeletion.sql
d_arrears_deletion_filt.srd


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@208892 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 09eb5c77
update transetup set edit_expr = 'and payarr_to_proc.status not in('D')' where tran_window = 'w_payarr_to_proc';
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 ('DELRECO ',' Record Deleted !','You can not insert the record because record is already disable','E','Y',null,null,null,to_date('25-SEP-19','DD-MON-RR'),'BASE ','BASE ',null,null);
update SYSTEM_EVENTS set SERVICE_CODE = 'poic_default_ejb', COMP_TYPE = 'JB', COMP_NAME = 'ibase.webitm.ejb.adm.ArrearsDeleteIC' where OBJ_NAME = 'arrears_deletion' and EVENT_CODE = 'post_item_change';
update SYSTEM_EVENTS set SERVICE_CODE = 'prv_default_ejb', COMP_TYPE = 'JB', COMP_NAME = 'ibase.webitm.ejb.adm.ArrearsDeleteIC' where OBJ_NAME = 'arrears_deletion' and EVENT_CODE = 'pre_validate';
update SYSTEM_EVENTS set SERVICE_CODE = 'prc_default_ejb', COMP_TYPE = 'JB', COMP_NAME = 'ibase.webitm.ejb.adm.adv.ArrearsDeletePrc' where OBJ_NAME = 'arrears_deletion' and EVENT_CODE = 'process';
\ No newline at end of file
......@@ -39,7 +39,7 @@
<color>536870912</color>
</Footer>
<Detail>
<height>219</height>
<height>250</height>
<color>536870912</color>
</Detail>
<TableDefinition>
......@@ -91,6 +91,17 @@
<name>prd_code__acc</name>
<dbname>prd_code__acc</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<updatewhereclause>no</updatewhereclause>
<name>type</name>
<dbname>type</dbname>
<initial>AR</initial>
<values>
<item display="Arrears" data="AR"/>
<item display="Payroll" data="PY"/>
</values>
</table_column>
<table_column>
<type size="10">char</type>
<updatewhereclause>no</updatewhereclause>
......@@ -101,12 +112,12 @@
<GroupBox>
<band>Detail</band>
<text>Basic</text>
<border>2</border>
<color>0</color>
<border>5</border>
<color>33554432</color>
<x>23</x>
<y>13</y>
<height>166</height>
<width>413</width>
<y>18</y>
<height>197</height>
<width>463</width>
<name>gb_1</name>
<visible>1</visible>
<font>
......@@ -118,24 +129,24 @@
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>67108864</color>
<mode>1</mode>
<color>553648127</color>
</background>
</GroupBox>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text> Employee From :</text>
<border>0</border>
<text>Type :</text>
<border>5</border>
<color>0</color>
<x>43</x>
<y>37</y>
<x>59</x>
<y>38</y>
<height>16</height>
<width>92</width>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>emp_code__fr_t</name>
<name>type_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -146,32 +157,31 @@
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>5</id>
<id>9</id>
<alignment>0</alignment>
<tabsequence>10</tabsequence>
<border>5</border>
<color>0</color>
<x>140</x>
<y>37</y>
<x>166</x>
<y>38</y>
<height>16</height>
<width>66</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>emp_code__fr</name>
<name>type</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<EditStyle style="ddlb">
<limit>0</limit>
<allowedit>no</allowedit>
<case>any</case>
<imemode>0</imemode>
</EditStyle>
<font>
......@@ -184,24 +194,33 @@
</font>
<background>
<mode>2</mode>
<color>16777215</color>
<color>1090519039</color>
</background>
</ColumnObject>
<TextObject>
<ColumnObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Employee To:</text>
<border>0</border>
<id>5</id>
<alignment>0</alignment>
<tabsequence>20</tabsequence>
<border>5</border>
<color>0</color>
<x>244</x>
<y>37</y>
<x>165</x>
<y>65</y>
<height>16</height>
<width>86</width>
<width>66</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>emp_code__to_t</name>
<name>emp_code__fr</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
......@@ -212,33 +231,24 @@
</font>
<background>
<mode>2</mode>
<color>79741120</color>
<color>16777215</color>
</background>
</TextObject>
<ColumnObject>
</ColumnObject>
<TextObject>
<band>Detail</band>
<id>6</id>
<alignment>0</alignment>
<tabsequence>20</tabsequence>
<alignment>1</alignment>
<text>Employee From :</text>
<border>5</border>
<color>0</color>
<x>335</x>
<y>37</y>
<height>16</height>
<width>66</width>
<format>[general]</format>
<x>59</x>
<y>64</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>emp_code__to</name>
<name>emp_code__fr_t</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
......@@ -249,19 +259,19 @@
</font>
<background>
<mode>2</mode>
<color>1090519039</color>
<color>67108864</color>
</background>
</ColumnObject>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Site From :</text>
<border>0</border>
<border>5</border>
<color>0</color>
<x>43</x>
<y>64</y>
<x>59</x>
<y>89</y>
<height>16</height>
<width>92</width>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -276,19 +286,19 @@
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
<mode>2</mode>
<color>67108864</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>3</id>
<alignment>0</alignment>
<tabsequence>30</tabsequence>
<tabsequence>40</tabsequence>
<border>5</border>
<color>0</color>
<x>140</x>
<y>64</y>
<x>165</x>
<y>89</y>
<height>16</height>
<width>66</width>
<format>[general]</format>
......@@ -318,21 +328,30 @@
<color>16777215</color>
</background>
</ColumnObject>
<TextObject>
<ColumnObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Site To:</text>
<border>0</border>
<id>6</id>
<alignment>0</alignment>
<tabsequence>30</tabsequence>
<border>5</border>
<color>0</color>
<x>244</x>
<y>64</y>
<x>336</x>
<y>65</y>
<height>16</height>
<width>86</width>
<width>80</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>site_code__to_t</name>
<name>emp_code__to</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
......@@ -343,32 +362,31 @@
</font>
<background>
<mode>2</mode>
<color>79741120</color>
<color>1090519039</color>
</background>
</TextObject>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>4</id>
<id>2</id>
<alignment>0</alignment>
<tabsequence>40</tabsequence>
<tabsequence>60</tabsequence>
<border>5</border>
<color>0</color>
<x>335</x>
<y>64</y>
<x>336</x>
<y>114</y>
<height>16</height>
<width>66</width>
<format>[general]</format>
<width>80</width>
<format></format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>site_code__to</name>
<name>prd_code__to</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>5</limit>
<case>upper</case>
<limit>6</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<autoselect>no</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
......@@ -384,21 +402,30 @@
<color>1090519039</color>
</background>
</ColumnObject>
<TextObject>
<ColumnObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Period From :</text>
<border>0</border>
<id>7</id>
<alignment>0</alignment>
<tabsequence>80</tabsequence>
<border>5</border>
<color>0</color>
<x>43</x>
<y>91</y>
<x>336</x>
<y>139</y>
<height>16</height>
<width>92</width>
<width>80</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>prd_code__fr_t</name>
<name>proc_group__to</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
......@@ -408,32 +435,33 @@
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
<mode>2</mode>
<color>1090519039</color>
</background>
</TextObject>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>1</id>
<id>4</id>
<alignment>0</alignment>
<tabsequence>50</tabsequence>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>140</x>
<y>91</y>
<x>336</x>
<y>89</y>
<height>16</height>
<width>66</width>
<format></format>
<width>80</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>prd_code__fr</name>
<name>site_code__to</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>6</limit>
<case>any</case>
<limit>5</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>no</autoselect>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
......@@ -446,23 +474,23 @@
</font>
<background>
<mode>2</mode>
<color>16777215</color>
<color>1090519039</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Period To:</text>
<border>0</border>
<text>Employee To :</text>
<border>5</border>
<color>0</color>
<x>244</x>
<y>91</y>
<height>16</height>
<width>86</width>
<x>246</x>
<y>65</y>
<height>15</height>
<width>84</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>prd_code__to_t</name>
<name>emp_code__to_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -480,17 +508,17 @@
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Proc Grp. From :</text>
<border>0</border>
<text>Site To :</text>
<border>5</border>
<color>0</color>
<x>43</x>
<y>118</y>
<height>16</height>
<width>92</width>
<x>246</x>
<y>89</y>
<height>15</height>
<width>84</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>proc_group__fr_t</name>
<name>site_code__to_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -501,34 +529,25 @@
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<ColumnObject>
<TextObject>
<band>Detail</band>
<id>9</id>
<alignment>0</alignment>
<tabsequence>70</tabsequence>
<alignment>1</alignment>
<text>Period From :</text>
<border>5</border>
<color>0</color>
<x>140</x>
<y>118</y>
<x>60</x>
<y>114</y>
<height>16</height>
<width>66</width>
<format>[general]</format>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>proc_group__fr</name>
<name>prd_code__fr_t</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
......@@ -539,23 +558,51 @@
</font>
<background>
<mode>2</mode>
<color>1090519039</color>
<color>67108864</color>
</background>
</ColumnObject>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Proc Grp.To:</text>
<border>0</border>
<text>Proc Group From :</text>
<border>5</border>
<color>0</color>
<x>244</x>
<y>118</y>
<x>59</x>
<y>139</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>proc_group__fr_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>2</mode>
<color>67108864</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Period Acc. :</text>
<border>5</border>
<color>0</color>
<x>59</x>
<y>163</y>
<height>16</height>
<width>86</width>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>proc_group__to_t</name>
<name>prd_code__acc_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -567,31 +614,31 @@
</font>
<background>
<mode>2</mode>
<color>79741120</color>
<color>67108864</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>7</id>
<id>1</id>
<alignment>0</alignment>
<tabsequence>80</tabsequence>
<tabsequence>50</tabsequence>
<border>5</border>
<color>0</color>
<x>335</x>
<y>118</y>
<x>165</x>
<y>114</y>
<height>16</height>
<width>66</width>
<format>[general]</format>
<format></format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>proc_group__to</name>
<name>prd_code__fr</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<limit>6</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autoselect>no</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
......@@ -604,24 +651,33 @@
</font>
<background>
<mode>2</mode>
<color>1090519039</color>
<color>16777215</color>
</background>
</ColumnObject>
<TextObject>
<ColumnObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Period Acc. :</text>
<border>0</border>
<id>10</id>
<alignment>0</alignment>
<tabsequence>70</tabsequence>
<border>5</border>
<color>0</color>
<x>43</x>
<y>145</y>
<x>166</x>
<y>138</y>
<height>16</height>
<width>92</width>
<width>66</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>prd_code__acc_t</name>
<name>proc_group__fr</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
......@@ -631,10 +687,10 @@
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
<mode>2</mode>
<color>1090519039</color>
</background>
</TextObject>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>8</id>
......@@ -642,8 +698,8 @@
<tabsequence>90</tabsequence>
<border>5</border>
<color>0</color>
<x>140</x>
<y>145</y>
<x>166</x>
<y>162</y>
<height>16</height>
<width>66</width>
<format>[general]</format>
......@@ -672,30 +728,21 @@
<color>1090519039</color>
</background>
</ColumnObject>
<ColumnObject>
<TextObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>60</tabsequence>
<alignment>1</alignment>
<text>Period To :</text>
<border>5</border>
<color>0</color>
<x>336</x>
<y>91</y>
<height>16</height>
<width>66</width>
<format></format>
<x>246</x>
<y>114</y>
<height>15</height>
<width>84</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>prd_code__to</name>
<name>prd_code__to_t</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>6</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>no</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
......@@ -706,9 +753,37 @@
</font>
<background>
<mode>2</mode>
<color>1090519039</color>
<color>79741120</color>
</background>
</ColumnObject>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Proc Group To :</text>
<border>5</border>
<color>0</color>
<x>246</x>
<y>139</y>
<height>15</height>
<width>84</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>proc_group__to_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>2</mode>
<color>79741120</color>
</background>
</TextObject>
<HtmlTable>
<border>1</border>
</HtmlTable>
......
$PBExportHeader$d_arrears_deletion_filt.srd
release 9;
datawindow(units=1 timer_interval=0 color=79741120 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 24 print.margin.right = 24 print.margin.top = 24 print.margin.bottom = 24 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes hidegrayline=no )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=250 color="536870912" )
table(column=(type=char(6) updatewhereclause=no name=prd_code__fr dbname="prd_code__fr" )
column=(type=char(6) updatewhereclause=no name=prd_code__to dbname="prd_code__to" )
column=(type=char(5) updatewhereclause=no name=site_code__fr dbname="site_code__fr" )
column=(type=char(5) updatewhereclause=no name=site_code__to dbname="site_code__to" )
column=(type=char(10) updatewhereclause=no name=emp_code__fr dbname="emp_code__fr" )
column=(type=char(10) updatewhereclause=no name=emp_code__to dbname="emp_code__to" )
column=(type=char(10) updatewhereclause=no name=proc_group__to dbname="proc_group__to" )
column=(type=char(6) updatewhereclause=no name=prd_code__acc dbname="prd_code__acc" )
column=(type=char(10) updatewhereclause=no name=type dbname="type" initial="AR" values="Arrears AR/Payroll PY/" )
column=(type=char(10) updatewhereclause=no name=proc_group__fr dbname="proc_group__fr" )
)
groupbox(band=detail text="Basic"border="5" color="33554432" x="23" y="18" height="197" width="463" name=gb_1 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" )
text(band=detail alignment="1" text="Type :" border="5" color="0" x="59" y="38" height="16" width="100" html.valueishtml="0" name=type_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=9 alignment="0" tabsequence=10 border="5" color="0" x="166" y="38" height="16" width="66" format="[general]" html.valueishtml="0" name=type visible="1" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any 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="1090519039" )
column(band=detail id=5 alignment="0" tabsequence=20 border="5" color="0" x="165" y="65" height="16" width="66" format="[general]" html.valueishtml="0" name=emp_code__fr visible="1" edit.limit=10 edit.case=upper 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="Employee From :" border="5" color="0" x="59" y="64" height="15" width="100" html.valueishtml="0" name=emp_code__fr_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="67108864" )
text(band=detail alignment="1" text="Site From :" border="5" color="0" x="59" y="89" height="16" width="100" html.valueishtml="0" name=site_code__fr_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="67108864" )
column(band=detail id=3 alignment="0" tabsequence=40 border="5" color="0" x="165" y="89" height="16" width="66" format="[general]" html.valueishtml="0" name=site_code__fr 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=6 alignment="0" tabsequence=30 border="5" color="0" x="336" y="65" height="16" width="80" format="[general]" html.valueishtml="0" name=emp_code__to visible="1" edit.limit=10 edit.case=upper 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="1090519039" )
column(band=detail id=2 alignment="0" tabsequence=60 border="5" color="0" x="336" y="114" height="16" width="80" format="" html.valueishtml="0" name=prd_code__to visible="1" edit.limit=6 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="1090519039" )
column(band=detail id=7 alignment="0" tabsequence=80 border="5" color="0" x="336" y="139" height="16" width="80" format="[general]" html.valueishtml="0" name=proc_group__to visible="1" edit.limit=10 edit.case=any 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="1090519039" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="5" color="0" x="336" y="89" height="16" width="80" format="[general]" html.valueishtml="0" name=site_code__to 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="1090519039" )
text(band=detail alignment="1" text="Employee To :" border="5" color="0" x="246" y="65" height="15" width="84" html.valueishtml="0" name=emp_code__to_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=detail alignment="1" text="Site To :" border="5" color="0" x="246" y="89" height="15" width="84" html.valueishtml="0" name=site_code__to_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=detail alignment="1" text="Period From :" border="5" color="0" x="60" y="114" height="16" width="100" html.valueishtml="0" name=prd_code__fr_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="67108864" )
text(band=detail alignment="1" text="Proc Group From :" border="5" color="0" x="59" y="139" height="15" width="100" html.valueishtml="0" name=proc_group__fr_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="67108864" )
text(band=detail alignment="1" text="Period Acc. :" border="5" color="0" x="59" y="163" height="16" width="100" html.valueishtml="0" name=prd_code__acc_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="67108864" )
column(band=detail id=1 alignment="0" tabsequence=50 border="5" color="0" x="165" y="114" height="16" width="66" format="" html.valueishtml="0" name=prd_code__fr visible="1" edit.limit=6 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=10 alignment="0" tabsequence=70 border="5" color="0" x="166" y="138" height="16" width="66" format="[general]" html.valueishtml="0" name=proc_group__fr visible="1" edit.limit=10 edit.case=any 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="1090519039" )
column(band=detail id=8 alignment="0" tabsequence=90 border="5" color="0" x="166" y="162" height="16" width="66" format="[general]" html.valueishtml="0" name=prd_code__acc visible="1" edit.limit=6 edit.case=any 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="1090519039" )
text(band=detail alignment="1" text="Period To :" border="5" color="0" x="246" y="114" height="15" width="84" html.valueishtml="0" name=prd_code__to_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=detail alignment="1" text="Proc Group To :" border="5" color="0" x="246" y="139" height="15" width="84" html.valueishtml="0" name=proc_group__to_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" )
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 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
\ No newline at end of file
......@@ -7,19 +7,12 @@ import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.ejb.CommonDBAccessEJB;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
......@@ -90,7 +83,7 @@ public class ArrearsDeleteIC extends ValidatorEJB
parentNodeList = dom.getElementsByTagName("Detail1");
int parentNodeListLen = parentNodeList.getLength();
System.out.println("Number of node in parentNodeListLen : "+parentNodeListLen);
for ( int rowCnt=0; rowCnt < parentNodeListLen; rowCnt++ )
for ( int rowCnt = 0; rowCnt < parentNodeListLen; rowCnt++ )
{
parentNode = parentNodeList.item(rowCnt);
childNodeList = parentNode.getChildNodes();
......@@ -111,7 +104,7 @@ public class ArrearsDeleteIC extends ValidatorEJB
}
else
{
columnCtr =getColumnValue("period", "code", prdCodeFr, conn);
columnCtr = getColumnValue("period", "code", prdCodeFr, conn);
if(columnCtr == 0)
{
errCode = "INVFRPRD";
......@@ -175,6 +168,10 @@ public class ArrearsDeleteIC extends ValidatorEJB
{
prdCodeAcc = E12GenericUtility.checkNull(genericUtility.getColumnValue("prd_code__acc", dom));
System.out.println("Period Code From:"+prdCodeAcc);
//Added by Poonam B[26-SEP-2019][START]
String type = E12GenericUtility.checkNull(genericUtility.getColumnValue("type", dom));
if("AR".equalsIgnoreCase(type))
{
if(E12GenericUtility.checkNull(prdCodeAcc).length() <= 0)
{
errCode = "NULLACPRD";
......@@ -185,7 +182,7 @@ public class ArrearsDeleteIC extends ValidatorEJB
else if(E12GenericUtility.checkNull(prdCodeAcc).length() > 0)
{
columnCtr = getColumnValue("period", "code", prdCodeAcc , conn );
if(columnCtr==0)
if(columnCtr == 0)
{
errCode = "INVACCPRD";
errList.add(errCode);
......@@ -194,6 +191,9 @@ public class ArrearsDeleteIC extends ValidatorEJB
}
}
}
//Added by Poonam B[26-SEP-2019][START]
}
}
int errListSize = errList.size();
cnt =0;
......@@ -303,7 +303,8 @@ public class ArrearsDeleteIC extends ValidatorEJB
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException
{
System.out.println("itemchanged on the ArrearsDelete");
String loginEmpCode = "",loginSiteCode="";
String loginEmpCode = "",loginSiteCode = "";
String type = ""; //Added By Poonam B[25-SEP-2019]
int currentFormNo = 0;
StringBuffer valueXmlString = new StringBuffer();
......@@ -325,12 +326,38 @@ public class ArrearsDeleteIC extends ValidatorEJB
case 1:
{
valueXmlString.append("<Detail1>\r\n");
if ("itm_default".equalsIgnoreCase(currentColumn))
{
System.out.println("currentColumn1:::::" + currentColumn);
valueXmlString.append( "<site_code__fr><![CDATA[" ).append(loginSiteCode).append( "]]></site_code__fr>\r\n" );
valueXmlString.append( "<site_code__to><![CDATA[" ).append(loginSiteCode).append( "]]></site_code__to>\r\n" );
}
//Added By Poonam B[25-SEP-2019][START]
if (currentColumn.trim().equalsIgnoreCase("type"))
{
type = E12GenericUtility.checkNull(genericUtility.getColumnValue("type", dom));
System.out.println("currentColumn2:::::" + currentColumn);
System.out.println("type ===>" +type);
if("PY".equalsIgnoreCase(type))
{
valueXmlString.append("<prd_code__acc protect=\"1\"><![CDATA[]]></prd_code__acc>\r\n");
}
else
{
String prdCodeAcc = E12GenericUtility.checkNull(genericUtility.getColumnValue("prd_code__acc", dom));
System.out.println("prdCodeAcc in IC===>" +prdCodeAcc);
valueXmlString.append("<prd_code__acc protect=\"0\"><![CDATA[]]></prd_code__acc>\r\n");
}
}
if (currentColumn.trim().equalsIgnoreCase("site_code__fr"))
{
System.out.println("currentColumn3:::::" + currentColumn);
String siteCodeFr = E12GenericUtility.checkNull(genericUtility.getColumnValue("site_code__fr", dom));
valueXmlString.append( "<site_code__to><![CDATA[" ).append(siteCodeFr).append( "]]></site_code__to>\r\n" );
}
//Added By Poonam B[25-SEP-2019][END]
valueXmlString.append("</Detail1>\r\n");
}
valueXmlString.append("</Root>\r\n");
......@@ -401,7 +428,7 @@ public class ArrearsDeleteIC extends ValidatorEJB
}
return msgType;
}
public int getColumnValue(String tableName ,String columnName , String columnValue , Connection con)
public int getColumnValue(String tableName ,String columnName ,String columnValue , Connection con)
{
String sql = "";
int count=0;
......
......@@ -9,6 +9,7 @@ import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
//import javax.ejb.Stateless;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
......@@ -17,8 +18,9 @@ import org.w3c.dom.NodeList;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
//@Stateless
public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,PayarrToProcRemote
{
//modified by Shital on 12/07/2019 [Start]
......@@ -192,7 +194,19 @@ public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,Paya
}
//Modified by Ahmed on 31-AUG-2018[To break and return error message when validation fails]end
}
//Added By Poonam B [25-SEP-2019][START]
if(status.trim().equalsIgnoreCase("D"))
{
errCode = "DELRECO";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
msgType = errorType(conn, errCode);
if (msgType.equalsIgnoreCase("E"))
{
break;
}
}
//Added By Poonam B [25-SEP-2019][END]
sql = "select usr_lev from users where code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, loginCode);
......@@ -490,15 +504,13 @@ public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,Paya
errList = null;
errFields.clear();
errFields = null;
errStringXml.append("</Errors> </Root> \r\n");
}
else
{
errStringXml = new StringBuffer("");
}
}
errStringXml.append("</Errors> </Root> \r\n");
}
catch(SQLException se)
{
......@@ -724,6 +736,25 @@ public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,Paya
xmlString.append("<status protect=\"0\"><![CDATA[").append(checkNull(status)).append("]]></status>\r\n");
System.out.println("IN ELSE CONDITION::::::::::");
}
//Added by Poonam B[25-SEP-2019][START]
if((status.trim().equalsIgnoreCase("D") ))
{
System.out.println("IN IF CONDITION::::::::::");
xmlString.append("<status protect=\"1\"><![CDATA[").append(checkNull(status)).append("]]></status>\r\n");
xmlString.append("<emp_code protect=\"1\"><![CDATA[").append(checkNull(empCode)).append("]]></emp_code>\r\n");
xmlString.append("<site protect=\"1\"><![CDATA[").append(checkNull(site)).append("]]></site>\r\n");
xmlString.append("<descr protect=\"1\"><![CDATA[").append(checkNull(descr)).append("]]></descr>\r\n");
xmlString.append("<prd_code protect=\"1\"><![CDATA[").append(checkNull(prdCode)).append("]]></prd_code>\r\n");
xmlString.append("<prd_code__acc protect=\"1\"><![CDATA[").append(checkNull(prdCodeAcc)).append("]]></prd_code__acc>\r\n");
xmlString.append("<proc_date protect=\"1\"><![CDATA[").append(checkNull(procDate)).append("]]></proc_date>\r\n");
xmlString.append("<proc_type protect=\"1\"><![CDATA[").append(procType).append("]]></proc_type>\r\n");
xmlString.append("<tran_id protect=\"1\"><![CDATA[").append(checkNull(tranId)).append("]]></tran_id>\r\n");
xmlString.append("<chg_date><![CDATA[").append(checkNull(chgDate)).append("]]></chg_date>\r\n");
xmlString.append("<chg_user><![CDATA[").append(checkNull(chgUser)).append("]]></chg_user>\r\n");
xmlString.append("<chg_term><![CDATA[").append(checkNull(chgTerm)).append("]]></chg_term>\r\n");
}
//Added by Poonam B[25-SEP-2019][END]
}
//added emp_code itemchange by Varsha V on 24-08-18 [START] A17ESUN001
else if (currentColumn.trim().equalsIgnoreCase("emp_code"))
......@@ -849,7 +880,6 @@ public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,Paya
}
}
xmlString.append("</Root>\r\n");
}
catch (Exception ex)
{
......@@ -888,7 +918,7 @@ public class PayarrToProc extends ValidatorEJB implements PayarrToProcLocal,Paya
}
}
System.out.println("value of xmlString::::" + xmlString);
xmlString.append("</Root>\r\n");
System.out.println("xmlString....[" + xmlString.toString());
return xmlString.toString();
}
......
......@@ -8,17 +8,25 @@ import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
//import java.sql.Statement;
import java.sql.Timestamp;
import org.w3c.dom.Document;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ProcessEJB;
import ibase.webitm.ejb.adm.AdmCommon;
import ibase.webitm.utility.ITMException;
import ibase.webitm.utility.TransIDGenerator;
public class ArrearsDeletePrc extends ProcessEJB
{
E12GenericUtility genericUtility=new E12GenericUtility();
E12GenericUtility genericUtility = new E12GenericUtility();
AdmCommon admCommon = new AdmCommon();
public String process(String xmlString,String xmlString1,String objContext,String xtraParams) throws RemoteException,ITMException
{
Document detailDom = null;
......@@ -41,6 +49,8 @@ public class ArrearsDeletePrc extends ProcessEJB
catch(Exception e)
{
System.out.println("Exception:ArrearsDeletePrc:process"+e);
e.printStackTrace();
throw new ITMException(e);
}
return retStr;
}
......@@ -60,6 +70,8 @@ public class ArrearsDeletePrc extends ProcessEJB
catch(Exception e)
{
System.out.println("Exception e1"+e);
e.printStackTrace();
throw new ITMException(e);
}
finally
{
......@@ -75,20 +87,26 @@ public class ArrearsDeletePrc extends ProcessEJB
}
return retStr;
}
public String processData(Document headerDom , Document detailDom,String objContext ,String xtraParams , Connection con )
public String processData(Document headerDom , Document detailDom,String objContext ,String xtraParams , Connection con ) throws ITMException
{
String prdCodeAcct = "", prdCodeFr = "",prdCodeTo="" ,empCodeFr="",empCodeTo ="";
String siteCodeFr = "", siteCodeTo = "", prcGrpFr = "", prcGrpTo = "";
String prdCode = "",empCode="",siteCodePay="",prcGrp="",prdAccountCode="" , errorString = "";
PreparedStatement pStmt = null;
ResultSet rs = null;
String type = ""; //Added By Poonam B[25-SEP-2019]
PreparedStatement pStmt = null, pstmt2 = null;
ResultSet rs = null, rs1 = null;
int count;
String userId ="";
String userId ="", chgTerm = "",errString = "";
boolean isSuccess = false;
StringBuilder sql = new StringBuilder();
String deleteSql = "", sqlPrd = "";
Timestamp frDate = null, toDate = null;
PreparedStatement pStmt1 = null;
ITMDBAccessEJB itmdbAccessEJB = new ITMDBAccessEJB();
try
{
userId=genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId");
System.out.println("userId:- " + userId);
empCodeFr = E12GenericUtility.checkNull(genericUtility.getColumnValue("emp_code__fr", headerDom));
empCodeTo = E12GenericUtility.checkNull(genericUtility.getColumnValue("emp_code__to", headerDom));
......@@ -99,7 +117,13 @@ public class ArrearsDeletePrc extends ProcessEJB
prcGrpFr = E12GenericUtility.checkNull(genericUtility.getColumnValue("proc_group__fr", headerDom));
prcGrpTo = E12GenericUtility.checkNull(genericUtility.getColumnValue("proc_group__to", headerDom));
prdCodeAcct = E12GenericUtility.checkNull(genericUtility.getColumnValue("prd_code__acc", headerDom));
//Added By Poonam B[25-SEP-2019] [START]
System.out.println("empCodeFr ===>" +empCodeFr);
System.out.println("siteCodeFr ===>" +siteCodeFr);
System.out.println("prdCodeFr ===>" +prdCodeFr);
System.out.println("prcGrpFr ===>" +prcGrpFr);
System.out.println("prdCodeAcct ===>" +prdCodeAcct);
//Added By Poonam B[25-SEP-2019] [END]
if(empCodeFr.length() <= 0)
{
empCodeFr = "0000";
......@@ -124,14 +148,38 @@ public class ArrearsDeletePrc extends ProcessEJB
{
prcGrpTo = "ZZZ";
}
//Modified By Poonam B[25-SEP-2019][START]
type = E12GenericUtility.checkNull(genericUtility.getColumnValue("type", headerDom));
System.out.println("type ===>" +type);
sqlPrd = "SELECT FR_DATE, TO_DATE FROM PERIOD WHERE CODE = ?";
pstmt2 = con.prepareStatement(sqlPrd);
if("AR".equalsIgnoreCase(type))
{
/*sql.append("SELECT ARREARS.PRD_CODE,ARREARS.EMP_CODE,ARREARS.SITE_CODE__PAY,EMPLOYEE.PROC_GROUP,ARREARS.PRD_CODE__ACC FROM ARREARS,EMPLOYEE");
sql.append(" WHERE ( ARREARS.EMP_CODE = EMPLOYEE.EMP_CODE ) AND ( ( ARREARS.PRD_CODE >= ? ) ");
sql.append(" AND ( ARREARS.PRD_CODE <= ? ) AND ( ARREARS.EMP_CODE >= ? ) AND");
sql.append("(ARREARS.EMP_CODE <= ?) AND ( ARREARS.SITE_CODE__PAY >= ?) AND (ARREARS.SITE_CODE__PAY <= ?) AND (EMPLOYEE.PROC_GROUP >= ?) AND ");
sql.append("( EMPLOYEE.PROC_GROUP <= ?) AND ( ARREARS.PRD_CODE__ACC = ? ) AND ( ARREARS.VOUCHER_NO IS NULL ))");*/
sql.append("SELECT ARREARS.PRD_CODE,ARREARS.EMP_CODE,ARREARS.SITE_CODE__PAY,EMPLOYEE.PROC_GROUP,ARREARS.PRD_CODE__ACC FROM ARREARS,EMPLOYEE");
sql.append(" WHERE ( ARREARS.EMP_CODE = EMPLOYEE.EMP_CODE ) AND ( ( ARREARS.PRD_CODE >= ? ) ");
sql.append(" AND ( ARREARS.PRD_CODE <= ? ) AND ( ARREARS.EMP_CODE >= ? ) AND");
sql.append("(ARREARS.EMP_CODE <= ?) AND ( ARREARS.SITE_CODE__PAY >= ?) AND (ARREARS.SITE_CODE__PAY <= ?) AND (EMPLOYEE.PROC_GROUP >= ?) AND ");
sql.append("( EMPLOYEE.PROC_GROUP <= ?) AND ( ARREARS.PRD_CODE__ACC = ? ) AND ( ARREARS.VOUCHER_NO IS NULL ))");
sql.append("( EMPLOYEE.PROC_GROUP <= ?) AND ( ARREARS.PRD_CODE__ACC = ? ) AND ( ARREARS.VOUCHER_NO IS NULL ) AND (CASE WHEN ARREARS.CONFIRMED IS NULL THEN 'N' ELSE ARREARS.CONFIRMED END != 'Y'))");
deleteSql="DELETE FROM ARREARS WHERE PRD_CODE=? AND EMP_CODE=? AND PRD_CODE__ACC=? AND ( PAYROLL.VOUCHER_NO IS NULL ) AND (CASE WHEN PAYROLL.CONFIRMED IS NULL THEN 'N' ELSE PAYROLL.CONFIRMED END != 'Y')";
}else {
sql.append("SELECT PAYROLL.PRD_CODE,PAYROLL.EMP_CODE,PAYROLL.SITE_CODE__PAY,EMPLOYEE.PROC_GROUP FROM PAYROLL,EMPLOYEE");
sql.append(" WHERE ( PAYROLL.EMP_CODE = EMPLOYEE.EMP_CODE ) AND ( ( PAYROLL.PRD_CODE >= ? ) ");
sql.append(" AND ( PAYROLL.PRD_CODE <= ? ) AND ( PAYROLL.EMP_CODE >= ? ) AND");
sql.append("(PAYROLL.EMP_CODE <= ?) AND ( PAYROLL.SITE_CODE__PAY >= ?) AND (PAYROLL.SITE_CODE__PAY <= ?) AND (EMPLOYEE.PROC_GROUP >= ?) AND ");
sql.append("( EMPLOYEE.PROC_GROUP <= ?) AND ( PAYROLL.VOUCHER_NO IS NULL ) AND (CASE WHEN PAYROLL.CONFIRMED IS NULL THEN 'N' ELSE PAYROLL.CONFIRMED END != 'Y'))");
deleteSql = "DELETE FROM PAYROLL WHERE PRD_CODE = ? AND EMP_CODE = ? AND ( PAYROLL.VOUCHER_NO IS NULL ) AND (CASE WHEN PAYROLL.CONFIRMED IS NULL THEN 'N' ELSE PAYROLL.CONFIRMED END != 'Y')";
}
//Modified By Poonam B[25-SEP-2019][END]
pStmt1 = con.prepareStatement(deleteSql);
pStmt = con.prepareStatement(sql.toString());
pStmt.setString(1, prdCodeFr);
pStmt.setString(2, prdCodeTo);
......@@ -141,7 +189,10 @@ public class ArrearsDeletePrc extends ProcessEJB
pStmt.setString(6, siteCodeTo);
pStmt.setString(7, prcGrpFr);
pStmt.setString(8, prcGrpTo);
if("AR".equalsIgnoreCase(type))
{
pStmt.setString(9, prdCodeAcct);
}
rs = pStmt.executeQuery();
while(rs.next())
{
......@@ -149,32 +200,60 @@ public class ArrearsDeletePrc extends ProcessEJB
empCode = rs.getString("EMP_CODE");
siteCodePay = rs.getString("SITE_CODE__PAY");
prcGrp = rs.getString("PROC_GROUP");
//prdAccountCode = rs.getString("PRD_CODE__ACC");
System.out.println("###Sai:"+prdCode+"\t"+empCode+"\t"+siteCodePay+"\t"+prcGrp+"\t"+prdAccountCode);
if("AR".equalsIgnoreCase(type))
{
prdAccountCode = rs.getString("PRD_CODE__ACC");
}
System.out.println("###Sai:"+prdCode+"\t"+empCode+"\t"+siteCodePay+"\t"+prcGrp+"\t" + "prdAccountCode\t" +prdAccountCode);
count = 0;
String deleteSql="DELETE FROM ARREARS WHERE PRD_CODE=? AND EMP_CODE=? AND PRD_CODE__ACC=?";
PreparedStatement pStmt1 = con.prepareStatement(deleteSql);
pStmt1.setString(1, prdCode);
pStmt1.setString(2, empCode);
pStmt1.setString(3, prdCodeAcct);
if("AR".equalsIgnoreCase(type))
{
pStmt1.setString(3, prdAccountCode);
}
count= pStmt1.executeUpdate();
System.out.println("Data deleted:"+count);
if(count>0)
System.out.println("Data deleted:" +count);
pStmt1.clearParameters();
if(count > 0)
{
pstmt2.setString(1, prdCode);
rs1 = pstmt2.executeQuery();
if(rs1.next())
{
frDate = rs1.getTimestamp("FR_DATE");
toDate = rs1.getTimestamp("TO_DATE");
}
if(rs1!=null)
{
rs1.close();
rs1= null;
}
pstmt2.clearParameters();
errString = payarrToProcUpdation( prdCode, prdCode, empCode, empCode, type, "w_arrears_deletion", chgTerm , "",0.0,frDate,toDate, xtraParams, con);
if (errString != null && errString.trim().length() > 0)
{
errorString = itmdbAccessEJB.getErrorString("", errString, userId, "", con);
return errString;
}
isSuccess = true;
con.commit();
System.out.println("payarrToProcUpdation() successfully executed" +errString);
}
else
}
if(pstmt2!=null)
{
con.rollback();
pstmt2.clearParameters();
pstmt2.close();
pstmt2 = null;
}
if(pStmt1!=null)
{
pStmt1.clearParameters();
pStmt1.close();
pStmt1 = null;
}
}
if(rs!=null)
{
rs.close();
......@@ -185,24 +264,49 @@ public class ArrearsDeletePrc extends ProcessEJB
pStmt.close();
pStmt = null;
}
//Added By Poonam B[25-SEP-2019][END]
if(isSuccess)
{
errorString = genericUtility.getErrorString("", "PROCSUCC", userId);
con.commit();
//errorString = genericUtility.getErrorString("", "PROCSUCC", userId);
errorString = itmdbAccessEJB.getErrorString("", "PROCSUCC", userId, "", con);
}
else
{
errorString = genericUtility.getErrorString("", "VPF16DSG01", userId);
con.rollback();
//errorString = genericUtility.getErrorString("", "VPF16DSG01", userId);
errorString = itmdbAccessEJB.getErrorString("", "VPF16DSG01", userId, "", con);
}
}
catch(Exception e)
{
System.out.println("Exception in processData1:"+e);
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if(rs1!=null)
{
rs1.close();
rs1= null;
}
if(pstmt2!=null)
{
pstmt2.clearParameters();
pstmt2.close();
pstmt2 = null;
}
if(pStmt1!=null)
{
pStmt1.clearParameters();
pStmt1.close();
pStmt1 = null;
}
if(rs!=null)
{
rs.close();
......@@ -221,4 +325,141 @@ public class ArrearsDeletePrc extends ProcessEJB
}
return errorString;
}
//Added By Poonam B[26-SEP-2019][START]
public String payarrToProcUpdation(String periodFrom, String periodTo, String empCodeFr, String empCodeTo, String procType, String winName, String keyStr, String adCode, double amount, Timestamp effDate, Timestamp expDate, String xtraParams, Connection conn) throws ITMException
{
String errCode = "", sqlStr = "", keyString = "";
String sql = "";
String userId = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
java.sql.Timestamp joinDate = null;
String workSite ="";
String empSite="";
String paySite ="";
String tranID = "";
try
{
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
sql = "SELECT KEY_STRING FROM TRANSETUP WHERE UPPER(TRAN_WINDOW) = 'T_PAYARR_TO_PROC'";
System.out.println("sqlStr In [payarrToProcUpdation][sqlStr][1]........:: " + sqlStr);
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if (rs.next())
{
keyString = rs.getString("KEY_STRING");
}
System.out.println("keyString.....:: " + keyString);
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
sql = "SELECT EMP_CODE, DATE_JOIN, EMP_SITE, WORK_SITE, PAY_SITE FROM EMPLOYEE WHERE EMP_CODE >= ? AND EMP_CODE <= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCodeFr);
pstmt.setString(2, empCodeTo);
rs = pstmt.executeQuery();
if(rs.next())
{
joinDate = rs.getTimestamp("DATE_JOIN");
empSite = rs.getString("EMP_SITE");
workSite = rs.getString("WORK_SITE");
paySite = rs.getString("PAY_SITE");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
String XMLString = "<?xml version=\"1.0\"?>\r\n<Root>\r\n<header>"+
"\r\n</header><Detail1><work_site><![CDATA[" + workSite.trim() + "]]></work_site><pay_site><![CDATA[" + paySite.trim() + "]]></pay_site><emp_site><![CDATA[" + empSite.trim() + "]]></emp_site></Detail1></Root>";
CommonConstants.setIBASEHOME();
TransIDGenerator tg = new TransIDGenerator(XMLString, userId, CommonConstants.DB_NAME);
tranID = tg.generateTranSeqID("PAYARR", "tran_id", keyString, conn);
System.out.println("Transaction Id Generated [tranID] :: "+tranID);
if (tranID.equals("ERROR"))
{
errCode = "VTTRANID";
return errCode;
}
String status = "D";
sql = "INSERT INTO PAYARR_TO_PROC (TRAN_ID, EMP_CODE, PRD_CODE, STATUS, PROC_TYPE, PROC_DATE, CHG_DATE, CHG_USER, CHG_TERM) " +
" VALUES(?,?,?,?,?,?,?,?,?)";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranID);
pstmt.setString(2,empCodeFr);
pstmt.setString(3,periodFrom);
pstmt.setString(4,status);
pstmt.setString(5,procType);
pstmt.setTimestamp(6,expDate);
pstmt.setTimestamp(7,new java.sql.Timestamp(System.currentTimeMillis()));
pstmt.setString(8, userId);
pstmt.setString(9,genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId"));
int insCnt = pstmt.executeUpdate();
if (insCnt == 1)
{
System.out.println("Inserted Into PAYARR_TO_PROC Successfully.........");
}
else
{
errCode = "DS000";
return errCode;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}//End Of Try Block
catch (SQLException se)
{
System.out.println("Exception :AdmCommon :payarrToProcUpdation:" + se.getMessage() + ":");
se.printStackTrace();
throw new ITMException(se);
}
catch(Exception e)
{
System.out.println("Exception :[AdmCommon][function::payarrToProcUpdation()] :==>\n"+e.getMessage());
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
System.out.println("Closing ResultSet, Statement etc... In [payarrToProcUpdation()]...............");
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception ex){}
}
return errCode;
}
//Added By Poonam B[26-SEP-2019][END]
}
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