Commit 71737f4b authored by manohar's avatar manohar

ref_no and ref_date set from sorder at end as it was overwritten in between


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93988 ce508802-f39f-4f6c-b175-0d175dae99d5
parent dfd0b573
......@@ -202,8 +202,8 @@ public class InvoiceAmendmentIC extends ValidatorEJB implements InvoiceAmendment
pstmt.close();
pstmt = null;
}
if(errList == null || errList.size() == 0)
{
//if(errList == null || errList.size() == 0)
//{
siteCode = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
sql = "select site_code from invoice where invoice_id =? ";
pstmt = conn.prepareStatement(sql);
......@@ -223,7 +223,7 @@ public class InvoiceAmendmentIC extends ValidatorEJB implements InvoiceAmendment
errList.add( "VTDIFFST" );
errFields.add( childNodeName.toLowerCase() );
}
}
//}
}
else
{
......@@ -314,14 +314,16 @@ public class InvoiceAmendmentIC extends ValidatorEJB implements InvoiceAmendment
else if ( childNodeName.equalsIgnoreCase("eff_date") )
{
columnValue1 = genericUtility.getColumnValue("status", dom);
if(columnValue1.equals("B"))
{
if(genericUtility.getColumnValue("eff_date", dom) != null)
{
date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("eff_date", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");;
}
columnValue = genericUtility.getColumnValue("invoice_id", dom);
columnValue1 = genericUtility.getColumnValue("status", dom);
if(columnValue1.equals("B"))
{
sql = "select eff_date from invoice where invoice_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
......@@ -334,13 +336,13 @@ public class InvoiceAmendmentIC extends ValidatorEJB implements InvoiceAmendment
rs = null;
pstmt.close();
pstmt = null;
}
if(date1 != null && date2 != null && date2.before(date1))
if(date1 == null || date2 == null || date2.before(date1))
{
errList.add( "VTEFF01" );
errFields.add( childNodeName.toLowerCase() );
}
}
}
else if ( childNodeName.equalsIgnoreCase("rd_permit_no") )
{
......@@ -431,17 +433,15 @@ public class InvoiceAmendmentIC extends ValidatorEJB implements InvoiceAmendment
}
else if ( childNodeName.equalsIgnoreCase("lr_date") )
{
columnValue1 = genericUtility.getColumnValue("status", dom);
if(!"D".equals(columnValue1) )
{
if(genericUtility.getColumnValue("lr_date", dom) != null)
{
date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("lr_date", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");;
}
columnValue = genericUtility.getColumnValue("invoice_id", dom);
columnValue1 = genericUtility.getColumnValue("status", dom);
if(! columnValue1.equals("D"))
{
if(date1 != null)
{
sql = "select var_value from disparm where prd_code = '999999'" +
" and var_name = 'MAX_DELAY_IN_SHIP' ";
pstmt = conn.prepareStatement(sql);
......@@ -458,6 +458,8 @@ public class InvoiceAmendmentIC extends ValidatorEJB implements InvoiceAmendment
rs = null;
pstmt.close();
pstmt = null;
if(date1 != null)
{
if(errList == null || errList.size() == 0)
{
......@@ -1031,6 +1033,8 @@ public String itemChanged( Document dom, Document dom1, Document dom2, String ob
pstmt.close();
pstmt = null;
valueXmlString.append( "<item_info><![CDATA[" ).append( descr1 ).append( "]]></item_info>\r\n" );
valueXmlString.append( "<ref_no><![CDATA[" ).append( chequeNo==null?"":chequeNo).append( "]]></ref_no>\r\n" );
valueXmlString.append( "<ref_date><![CDATA[" ).append( chequeDate==null?"":sdf.format(chequeDate) ).append( "]]></ref_date>\r\n" );
}
if( currentColumn.trim().equalsIgnoreCase( "status" ) )
......
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