Commit 02684808 authored by ngadkari's avatar ngadkari

Removing errorcode check null condition from PoReceiptIc component.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@184412 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7aef41e0
......@@ -236,34 +236,34 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
if(errCode == null || errCode.trim().length() == 0)
{
/*if(errCode == null || errCode.trim().length() == 0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if( "O".equals(status) && empCodeaprv==null|| empCodeaprv.trim().length() == 0)
{
errCode = "VTPONAPRV";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
/*}
if(errCode == null || errCode.trim().length() == 0)
{
{*///COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if ("N".equals(lsconfirmed) || lsconfirmed == null )
{
errCode = "VTPONCONF";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
/*}
else if(errCode == null || errCode.trim().length() == 0)
{
{*///COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if (ordDate.after(TranDate))
else if (ordDate.after(TranDate))
{
errCode = "VTRCPDT";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
//}
}
}
}
......@@ -343,28 +343,29 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
if(errCode == null || errCode.trim().length() == 0)
{
/*if(errCode == null || errCode.trim().length() == 0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if( "O".equals(status) && empCodeaprv==null|| empCodeaprv.trim().length() == 0)
{
errCode = "VTPONAPRV";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
if(errCode == null || errCode.trim().length() == 0)
{
//}
/*if(errCode == null || errCode.trim().length() == 0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if ("N".equals(lsconfirmed) || lsconfirmed == null )
{
errCode = "VTPONCONF";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
/*}
else if(errCode == null || errCode.trim().length() == 0)
{
{*///COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if (ordDate.after(TranDate))
else if (ordDate.after(TranDate))
{
errCode = "VTRCPDT";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
......@@ -373,17 +374,17 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
if(errCode == null || errCode.trim().length() == 0)
{
/*if(errCode == null || errCode.trim().length() == 0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if (!" P".equals(lspotype) && lsproviid!= null && lsproviid.trim().length() > 0)
{
errCode = "VTPROPO";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
/*}
if(errCode == null || errCode.trim().length() == 0)
{
{*///COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
lspotype = lspotype.trim();
if("Q".equals(lspotype) || "H".equals(lspotype))
{
......@@ -422,9 +423,9 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
/*}
if(errCode.trim().length() == 0)
{
{*///COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
sql="select count(*) from porddet where purc_order = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
......@@ -444,10 +445,10 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errFields.add(childNodeName.toLowerCase());
}
}
/*}
if(errCode.trim().length() == 0)
{
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
String quantity="",rate="";
if(tranidPO == null || tranidPO.trim().length() == 0)
{
......@@ -578,7 +579,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errFields.add( childNodeName.toLowerCase() );
}
}
}
//}//COMMENTED BY NANDKUMAR GADKARI for checking errCode== null condition ON 03/05/18
}
if (childNodeName.equalsIgnoreCase("item_ser"))
{
......@@ -699,8 +700,8 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
if(errCode.trim().length() == 0)
{
/*if(errCode.trim().length() == 0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
sql=" select count(*) from porcp where gr_no =? and tran_id <> ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, grNo);
......@@ -724,7 +725,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
//}
}
}
......@@ -1347,7 +1348,8 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
if( errCode.trim().length() ==0 && "Y".equals(lsvalue))
/*if( errCode.trim().length() ==0 && "Y".equals(lsvalue))*/ //changes in condition BY NANDKUMAR GADKARI ON 03/05/18
if( "Y".equals(lsvalue))
{
tranIdHdr =checkNull(genericUtility.getColumnValue("tran_id", dom1));
sql="select count(*) from porcp,porcpdet " +
......@@ -1491,8 +1493,9 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
if ( errCode == null || errCode.trim().length()==0)
{
/*if ( errCode == null || errCode.trim().length()==0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
lsqcreqd = gfautoqcreqd(siteCode,itemCode,conn);
sql="select case when stk_opt is null then '0' else stk_opt end from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
......@@ -1515,9 +1518,10 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
/*}
if((errCode == null || errCode.trim().length()==0))
{
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if (( purcOrder == null || purcOrder.trim().length()==0) && "N".equals(lsqcreqd))
{
errCode = "VTPORD7";
......@@ -1526,9 +1530,10 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
/*}
if ( errCode == null || errCode.trim().length()==0)
{
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
purcOrder = checkNull(genericUtility.getColumnValue("purc_order", dom));
lineNoItem = " " + lineNoItem;
lineNoItem = lineNoItem.substring(lineNoItem.length() - 3,lineNoItem.length());
......@@ -1559,12 +1564,14 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
}
if ( errCode == null || errCode.trim().length()==0)
{
//}
/*if ( errCode == null || errCode.trim().length()==0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
// errCode = nvo_dis.gbf_item(mval1,mval,transer)
if (errCode.trim().length()==0)
{
/*if (errCode.trim().length()==0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
sql="select oth_series from itemser where item_ser = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemSer);
......@@ -1613,22 +1620,25 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
pstmt.close();
pstmt = null;
}
if (errCode.trim().length() == 0)
{
/*if (errCode.trim().length() == 0)
{*///COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if("Y".equalsIgnoreCase(channelpartner))
{
siteCode = sitecodech;
}
}
/*}
if (errCode.trim().length()==0)
{
{*/
itemSer = itmDBAccess.getItemSeries(itemCode, siteCode,trandateStr,suppCode,'S',null);
//}//COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
}
}
}
}
//}
/*}
if (errCode == null || errCode.trim().length()==0)
{
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
String lsinvacct="",lsloccode="",lslotno="",lslotsl="",lsacctcodeporcp="",lscctrcodeporcp="",lsacctcodedr="",lscctrcodedr="";
lsinvacct = fincommon.getFinparams("999999", "INVENTORY_ACCT", conn);
if ( "Y".equalsIgnoreCase(lsinvacct))
......@@ -1678,8 +1688,9 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
rs=null;
pstmt.close();
rs=null;
if(errCode == null || errCode.trim().length() == 0)
{
/*if(errCode == null || errCode.trim().length() == 0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
System.out.println("lsacctcodedr"+lsacctcodedr);
System.out.println("lsacctcodeporcp"+lsacctcodeporcp);
System.out.println("lscctrcodedr"+lscctrcodedr);
......@@ -1691,11 +1702,12 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errFields.add(childNodeName.toLowerCase());
}
}
//}
}
}
}
//}//COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
}//end item code case childNodeName.equalsIgnoreCase("line_no__ord")
if (childNodeName.equalsIgnoreCase("quantity"))
{
......@@ -2098,8 +2110,9 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
}
if(errCode == null || errCode.trim().length()==0)
{
/*if(errCode == null || errCode.trim().length()==0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
String lstranid="", lslinenorcp="", lsloccode="",lsstkopt="";
lsitemcode = genericUtility.getColumnValue("item_code", dom);
lstranid = genericUtility.getColumnValue("tran_id", dom1);
......@@ -2154,7 +2167,8 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
}
//}//COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
}//end unit
if (childNodeName.equalsIgnoreCase("conv__qty_stduom"))
{
......@@ -2369,8 +2383,9 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());;
}
if (errCode== null || errCode.trim().length() == 0)
{
/*if (errCode== null || errCode.trim().length() == 0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
System.out.println("Is Error COde is Null");
System.out.println("lsstkopt"+lsstkopt);
lsqcreqd=genericUtility.getColumnValue("qc_reqd", dom1);
......@@ -2497,9 +2512,10 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
}
/*}
if (errCode == null || errCode.trim().length() == 0)
{
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
sql="select facility_code from location where loc_code=?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, loccode);
......@@ -2529,7 +2545,8 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
rs = null;
pstmt.close();
pstmt = null;
}
//}//COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if ((lsfaciloccode !=null && lsfaciloccode.trim().length() >0) && (lsfacisitecode !=null && lsfacisitecode.trim().length() >0))
{
if(!lsfaciloccode.equalsIgnoreCase(lsfacisitecode))
......@@ -2949,8 +2966,9 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
if( lcrate1 != 0)
{
if(errCode== null || errCode.trim().length() == 0)
{
/*if(errCode== null || errCode.trim().length() == 0)
{*///COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
lsitemcode =genericUtility.getColumnValue("item_code", dom);
sql="select (case when po_rate_option is null then 'N' else po_rate_option end)," +
"(case when po_rate_varience is null then 0 else po_rate_varience end) " +
......@@ -2986,8 +3004,9 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
errFields.add(childNodeName.toLowerCase());
}
}
if( errCode== null || errCode.trim().length() == 0)
{
/*if( errCode== null || errCode.trim().length() == 0)
{*/ //COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
if( rate != lcrate1)
{
lcratevarval = lcrate1 * lcratevarperc / 100;
......@@ -2999,8 +3018,9 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
}
}
}
}
//}
//}//COMMENTED BY NANDKUMAR GADKARI ON 03/05/18
}
}
}//END CASE RATE
......
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