Commit da1d40a3 authored by prane's avatar prane

system should not allow any PO line for which there is pending receipt exist

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@192918 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6be4431f
......@@ -1843,11 +1843,16 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
varValue = this.getEnvDis("999999","REGULATED_PRICE_LIST", conn);
//Added By PriyankaC on 07JUNE18.[START]
sql = " SELECT COUNT(*) FROM PORCP WHERE PURC_ORDER = ? and confirmed ='N'";
//Pavan R on 14nov18 [system should not allow any PO line for which there is pending receipt exist] start
//sql = " SELECT COUNT(*) FROM PORCP WHERE PURC_ORDER = ? and confirmed ='N'";
sql = "select COUNT(*) from PORCP, PORCPDET"
+ " WHERE PORCP.TRAN_ID = PORCPDET.TRAN_ID"
+ " AND PORCPDET.PURC_ORDER = ?"
+ " AND PORCP.CONFIRMED ='N'"
+ " AND LINE_NO__ORD = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
pstmt.setString(2, lineNoOrd);
rs = pstmt.executeQuery();
if(rs.next())
......@@ -1863,7 +1868,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
if(count >= 1)
{
sql = " select rate from PORCPDET WHERE "+
/*sql = " select rate from PORCPDET WHERE "+
" PURC_ORDER = ? and LINE_NO__ORD = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
......@@ -1876,18 +1881,19 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
System.out.println("Result of purcRate Rate : " + purcRate +"current Rate : " +rateStr);
if(rate != purcRate)
{
System.out.println("Result of purcRate Rate1 : " + purcRate +"current Rate 1: " +rateStr +" VTCHINRATE");
errCode = "VTCHINRATE";//Changed In rate not applicable when PORCP is unconfirmed
{*/
//System.out.println("Result of purcRate Rate1 : " + purcRate +"current Rate 1: " +rateStr +" VTCHINRATE");
//errCode = "VTCHINRATE";//Changed In rate not applicable when PORCP is unconfirmed
errCode = "VTRCPLNEXS";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
/*}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
pstmt = null;
*/
//Pavan R on 14nov18 end
}
//Added By PriyankaC on 07JUNE18.[END]
......@@ -5245,7 +5251,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
.append("<![CDATA[" + rate + "]]>")
.append("</rate>");
sql = " Select descr, loc_code, unit, unit__pur into :mdescr, :mloc, :ls_unit, :ls_unitpur from item where item_code = :itemcode ";
//sql = " Select descr, loc_code, unit, unit__pur into :mdescr, :mloc, :ls_unit, :ls_unitpur from item where item_code = :itemcode ";
sql = " Select descr, loc_code, unit, unit__pur from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
rs = pstmt.executeQuery();
......
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