Commit d59fe9f1 authored by rtiwari's avatar rtiwari

Proof Of Delivery new Changes as per the CCF, Added By Sanket Girme.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98485 ce508802-f39f-4f6c-b175-0d175dae99d5
parent efae67d4
...@@ -766,11 +766,12 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal, ...@@ -766,11 +766,12 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal,
.get("exch_rate").toString()); .get("exch_rate").toString());
// END OF IF DB AMT CONDTION START // END OF IF DB AMT CONDTION START
invstatus = checkDebitAmt(invoiceId, conn); /*invstatus = checkDebitAmt(invoiceId, conn);
System.out.println("For Invoce ID = > " + invoiceId System.out.println("For Invoce ID = > " + invoiceId
+ "invstatus =>" + invstatus); + " Invoice status =>" + invstatus);
if (invstatus) { if (detail3AmtT>=100) {*/
errString = podC.genDebitNote("PRC", invoiceId, errString = podC.genDebitNote("PRC", invoiceId,
custCode, siteCode, xtraParams, custCode, siteCode, xtraParams,
currCode, ExchRate, detail2xmlString, currCode, ExchRate, detail2xmlString,
...@@ -841,11 +842,12 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal, ...@@ -841,11 +842,12 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal,
invoiceId); invoiceId);
return errString; return errString;
} }
} else { /*} else {
System.out System.out
.println("The debit Note Not generated for the Invoice Id=> " .println("The debit Note Not generated for the Invoice Id=> "
+ invoiceId+" Due to total debil amt below then 100!"); + invoiceId+" Due to total debit amount below then 100!");
} }*/
} else {// end detail3AmtT > 0 condition } else {// end detail3AmtT > 0 condition
errCode = "VTNGAMTE"; // negative amount errCode = "VTNGAMTE"; // negative amount
...@@ -1010,9 +1012,7 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal, ...@@ -1010,9 +1012,7 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal,
podNotConfListL.add("Error"); podNotConfListL.add("Error");
e.printStackTrace(); e.printStackTrace();
} }
return podNotConfListL; return podNotConfListL;
} }
private int updatePodTraceSuccess(Connection conn, String success, private int updatePodTraceSuccess(Connection conn, String success,
...@@ -1040,14 +1040,14 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal, ...@@ -1040,14 +1040,14 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal,
} }
// Created By Sanket Girme to Check the debit note amount is greater than // [31-JUL-2015]Created By Sanket Girme to Check the debit note amount is greater than
// 100 or not // 100 or not
public boolean checkDebitAmt(String InvId, Connection conn) { public boolean checkDebitAmt(String InvId, Connection conn) {
PreparedStatement pstmt2 = null; PreparedStatement pstmt2 = null;
ResultSet rs2 = null; ResultSet rs2 = null;
int sumDebitNote = 0; int sumDebitNote = 0;
boolean errFlag = false; boolean errFlag = false;
String sql2 = "SELECT SUM(D.DEBIT_NOTE_AMT) from spl_sales_por_hdr h,spl_sales_por_det d WHERE H.TRAN_ID = D.TRAN_ID AND H.INVOICE_ID =?"; String sql2 = "SELECT NVL(SUM(D.DEBIT_NOTE_AMT),0) from spl_sales_por_hdr h,spl_sales_por_det d WHERE H.TRAN_ID = D.TRAN_ID AND H.INVOICE_ID =?";
try { try {
pstmt2 = conn.prepareStatement(sql2); pstmt2 = conn.prepareStatement(sql2);
pstmt2.setString(1, InvId); pstmt2.setString(1, InvId);
...@@ -1055,12 +1055,11 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal, ...@@ -1055,12 +1055,11 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal,
if (rs2.next()) { if (rs2.next()) {
System.out System.out
.println(" **** Inside checkDebitAmt While loop **** "); .println("**** Inside checkDebitAmt If loop ****");
sumDebitNote = rs2.getInt(1); sumDebitNote = rs2.getInt(1);
System.out.println(" FOr invoice ID => " + InvId System.out.println("For invoice ID ==> " + InvId);
+ "sumDebitNote is ==> " + sumDebitNote); System.out.println("Debit Note Amount is ==> " + sumDebitNote);
if (sumDebitNote >= 100) { if (sumDebitNote >= 100) {
errFlag = true; errFlag = true;
} }
} }
...@@ -1085,7 +1084,7 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal, ...@@ -1085,7 +1084,7 @@ public class PODProcess extends ProcessEJB implements PODProcessLocal,
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception to close the resultset!"); System.out.println("Exception to close the resultset! in checkDebitAmt Method..!!!");
} }
} }
return errFlag; return errFlag;
......
This diff is collapsed.
package ibase.webitm.ejb.dis;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import java.rmi.RemoteException;
import javax.ejb.Local;
import org.w3c.dom.Document;
@Local
public interface PODRejectionRemarkLocal extends ProcessLocal
{
public String process() throws RemoteException,ITMException;
public String process(Document dom, Document dom2, String windowName, String xtraParams) throws RemoteException,ITMException;
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException;
}
package ibase.webitm.ejb.dis;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import java.rmi.RemoteException;
import javax.ejb.Remote;
import org.w3c.dom.Document;
@Remote
public interface PODRejectionRemarkRemote extends ProcessRemote
{
public String process() throws RemoteException,ITMException;
public String process(Document dom, Document dom2, String windowName, String xtraParams) throws RemoteException,ITMException;
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException;
}
...@@ -51,7 +51,7 @@ public class ProofOfDeliveryReject extends ActionHandlerEJB implements ProofOfDe ...@@ -51,7 +51,7 @@ public class ProofOfDeliveryReject extends ActionHandlerEJB implements ProofOfDe
connDriver = new ConnDriver(); connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator"); conn = connDriver.getConnectDB("DriverValidator");
conn.setAutoCommit(false); conn.setAutoCommit(false);
String wfStatus="",confirmed=""; String wfStatus="",confirmed="",rejectionRemark="";
sql = "select confirmed,wf_status from spl_sales_por_hdr WHERE tran_id = ?"; sql = "select confirmed,wf_status from spl_sales_por_hdr WHERE tran_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId); pstmt.setString(1, tranId);
...@@ -89,9 +89,33 @@ public class ProofOfDeliveryReject extends ActionHandlerEJB implements ProofOfDe ...@@ -89,9 +89,33 @@ public class ProofOfDeliveryReject extends ActionHandlerEJB implements ProofOfDe
//Already rejected //Already rejected
errString = itmDBAccess.getErrorString("", "VTALREJ", "", "", conn); errString = itmDBAccess.getErrorString("", "VTALREJ", "", "", conn);
return errString; return errString;
} }
//Get Rejection remark
//[START] Added By Sanket Girme [04-Aug-2015]
sql="";
rejectionRemark="";
sql="SELECT REMARKS FROM SPL_SALES_POR_HDR WHERE TRAN_ID =?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs=pstmt.executeQuery();
if (rs.next()){
rejectionRemark = rs.getString(1);
}
System.out.println("Rejection Remark == >"+rejectionRemark);
rejectionRemark= rejectionRemark== null ? "" :rejectionRemark;
if(rejectionRemark.equalsIgnoreCase("") || rejectionRemark==null || rejectionRemark.length()<=0)
{
//Rejection Remark Blank
errString = itmDBAccess.getErrorString("", "VTREJNOTAB", "", "", conn);
return errString;
}
//[END] By Sanket Girme [04-Aug-2015]
sql=""; sql="";
loginCode=GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode"); loginCode=GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode");
sql="update spl_sales_por_hdr set wf_status = ?, emp_code__aprv = ? where tran_id = ? "; sql="update spl_sales_por_hdr set wf_status = ?, emp_code__aprv = ? where tran_id = ? ";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1, "R"); pstmt.setString(1, "R");
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Sybase_eDataWindow>
<Sybase_eDataWindow>
<Release>9</Release>
<BaseDefinition>
<units>1</units>
<timer_interval>0</timer_interval>
<color>67108864</color>
<processing>0</processing>
<HTMLDW>no</HTMLDW>
<print>
<documentname></documentname>
<printername></printername>
<orientation>0</orientation>
<margin>
<left>24</left>
<right>24</right>
<top>24</top>
<bottom>24</bottom>
</margin>
<paper>
<source>0</source>
<size>0</size>
</paper>
<prompt>no</prompt>
<canusedefaultprinter>yes</canusedefaultprinter>
<buttons>no</buttons>
<preview.buttons>no</preview.buttons>
<cliptext>no</cliptext>
<overrideprintjob>no</overrideprintjob>
</print>
</BaseDefinition>
<Summary>
<height>0</height>
<color>536870912</color>
</Summary>
<Footer>
<height>0</height>
<color>536870912</color>
</Footer>
<Detail>
<height>83</height>
<color>536870912</color>
</Detail>
<TableDefinition>
<table_column>
<type size="10">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>tran_id</name>
<dbname>tran_id</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>wf_status</name>
<dbname>status</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>rej_remark</name>
<dbname>rej_remark</dbname>
</table_column>
</TableDefinition>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Tran Id:</text>
<border>0</border>
<color>33554432</color>
<x>77</x>
<y>12</y>
<height>16</height>
<width>69</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>tran_id_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>1</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>33554432</color>
<x>151</x>
<y>12</y>
<height>16</height>
<width>90</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>tran_id</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>15</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Status:</text>
<border>0</border>
<color>33554432</color>
<x>77</x>
<y>34</y>
<height>16</height>
<width>69</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>status_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>33554432</color>
<x>151</x>
<y>34</y>
<height>15</height>
<width>89</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>wf_status</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>1</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>3</id>
<alignment>0</alignment>
<tabsequence>10</tabsequence>
<border>5</border>
<color>33554432</color>
<x>151</x>
<y>55</y>
<height>16</height>
<width>342</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>rej_remark</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>120</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Rejection Remark:</text>
<border>0</border>
<color>33554432</color>
<x>39</x>
<y>55</y>
<height>16</height>
<width>107</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>rej_remark_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<HtmlTable>
<border>1</border>
</HtmlTable>
<HtmlGen>
<clientevents>1</clientevents>
<clientvalidation>1</clientvalidation>
<clientcomputedfields>1</clientcomputedfields>
<clientformatting>0</clientformatting>
<clientscriptable>0</clientscriptable>
<generatejavascript>1</generatejavascript>
<encodeselflinkargs>1</encodeselflinkargs>
<netscapelayers>0</netscapelayers>
</HtmlGen>
<Export.XML>
<headgroups>1</headgroups>
<includewhitespace>0</includewhitespace>
<metadatatype>0</metadatatype>
<savemetadata>0</savemetadata>
</Export.XML>
<Import.XML>
</Import.XML>
<Export.PDF>
<method>0</method>
<distill.custompostscript>0</distill.custompostscript>
<xslfop.print>0</xslfop.print>
</Export.PDF>
</Sybase_eDataWindow>
This diff is collapsed.
$PBExportHeader$pod_rej_remark11.srd
release 9;
datawindow(units=1 timer_interval=0 color=67108864 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=83 color="536870912" )
table(column=(type=char(10) updatewhereclause=yes name=tran_id dbname="tran_id" )
column=(type=char(10) updatewhereclause=yes name=wf_status dbname="status" )
column=(type=char(10) updatewhereclause=yes name=rej_remark dbname="rej_remark" )
)
text(band=detail alignment="1" text="Tran Id:" border="0" color="33554432" x="77" y="12" height="16" width="69" html.valueishtml="0" name=tran_id_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=1 alignment="0" tabsequence=32766 border="5" color="33554432" x="151" y="12" height="16" width="90" format="[general]" html.valueishtml="0" name=tran_id visible="1" edit.limit=15 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Status:" border="0" color="33554432" x="77" y="34" height="16" width="69" html.valueishtml="0" name=status_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=2 alignment="0" tabsequence=32766 border="5" color="33554432" x="151" y="34" height="15" width="89" format="[general]" html.valueishtml="0" name=wf_status visible="1" edit.limit=1 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=3 alignment="0" tabsequence=10 border="5" color="33554432" x="151" y="55" height="16" width="342" format="[general]" html.valueishtml="0" name=rej_remark visible="1" edit.limit=120 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Rejection Remark:" border="0" color="33554432" x="39" y="55" height="16" width="107" html.valueishtml="0" name=rej_remark_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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