Commit 4712a5df authored by ssalve's avatar ssalve

Sarita: Added Validation for Invoice date on 9JAN2018

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@177943 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 98b7be56
...@@ -1136,6 +1136,43 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -1136,6 +1136,43 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
} }
} }
//Added by sarita for invoice_date validation on 09JAN2018[start]
if(childNodeName.equalsIgnoreCase("invoice_date"))
{
String poinvoiceDate="",creditTerm="",startFrom="";
poinvoiceDate = checkNull(genericUtility.getColumnValue("invoice_date", dom));
creditTerm = checkNull(genericUtility.getColumnValue("cr_term", dom));
System.out.println("Invoice Date is :::"+poinvoiceDate +"\t"+ "credit term is :::"+creditTerm);
sql = "select start_from from crterm where cr_term=?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, creditTerm);
rs=pstmt.executeQuery();
if(rs.next())
{
startFrom = checkNull(rs.getString("start_from"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if("B".equalsIgnoreCase(startFrom))
{
if(poinvoiceDate == null || poinvoiceDate.trim().length() == 0)
{
errCode = "VTINVDBLDT";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}//end of validation for invoice_date
//Added by sarita for invoice_date validation on 09JAN2018[end]
}// end for <purc_order> }// end for <purc_order>
break; break;
case 2: case 2:
......
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