Commit 0bd6e75c authored by ssalve's avatar ssalve

Sarita: Done changes for order_ref column on 06APR2018

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@183236 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e7840eaa
......@@ -150,6 +150,7 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
PreparedStatement pstmt = null ;
ResultSet rs = null;
ConnDriver connDriver = new ConnDriver();
String tranType = ""; //Added by sarita on 06APR2018
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
try
{
......@@ -416,6 +417,11 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
//Added by sarita on 28FEB2018
cnt = 0;
orderRef = checkNull(genericUtility.getColumnValue("order_ref", dom));
//Added and Commented by sarita on 06APR2018 for Distribution Expense Voucher[start]
tranType = checkNull(genericUtility.getColumnValue("tran_type", dom));
System.out.println("Tran Type is == ["+tranType+"]");
if("FRT".equalsIgnoreCase(tranType) == false)
{
if(orderRef != null && orderRef.trim().length() > 0)
{
sql = " select count(tran_id) from srv_order where tran_id = ? and confirmed = 'Y' ";
......@@ -459,6 +465,51 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
pstmt.close();
pstmt = null;
}
}
/*if(orderRef != null && orderRef.trim().length() > 0)
{
sql = " select count(tran_id) from srv_order where tran_id = ? and confirmed = 'Y' ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,orderRef);
rs = pstmt.executeQuery();
while(rs.next())
{
cnt = rs.getInt(1);
}
if(cnt == 0)
{
sql = " select count(purc_order) from porder where purc_order = ? and confirmed = 'Y' ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,orderRef);
rs = pstmt.executeQuery();
while(rs.next())
{
cnt = rs.getInt(1);
}
if(cnt == 0)
{
sql = " select count(contract_id) from retainer_contract where contract_id = ? and status = 'A' ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,orderRef);
rs = pstmt.executeQuery();
while(rs.next())
{
cnt = rs.getInt(1);
}
if(cnt == 0)
{
errCode = "VTSRV";
}
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}*/
//Added and Commented by sarita on 06APR2018 Distribution Expense Voucher[end]
if(errCode != null && (errCode.trim().length() > 0))
{
errList.add(errCode);
......
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