Commit f98c336f authored by ssurve's avatar ssurve

@Sandesh Surve Date - 20 May 2013

Issue Tracker point - 303 resolution -
Check added that if selected record is not confirmed then consumer order can't be cancelled.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93102 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 261043ec
......@@ -95,6 +95,34 @@ public class ConsumeOrderCnc extends ActionHandlerEJB implements ConsumeOrderCnc
}
else
{
/* Added by sandesh to check if record is not confirmed. For such record system will
* show error message and cancellation wont proceed
* Date - 20/MAY/2013
* */
String confirmed = null;
stmt = conn.createStatement();
sql = "SELECT CONFIRMED FROM CONSUME_ISS WHERE CONS_ORDER = '"+consOrd+"'";
System.out.println("ConsumeOrdCanc:actionCancel:confirmchk sql:"+sql);
rs = stmt.executeQuery(sql);
if(rs.next())
{
confirmed = rs.getString("CONFIRMED");
}
System.out.println("CONFIRMED for cancellation : "+confirmed);
rs.close();
rs = null;
stmt.close();
stmt = null;
if(confirmed!=null&&confirmed.equalsIgnoreCase("N")){
errCode="VTCANNTCON";
}else{
updSql="UPDATE CONSUME_ORD SET STATUS = 'C',STATUS_DATE = ?"+
" WHERE CONS_ORDER = ?";
System.out.println("ConsumeOrdCanc:Cancel:updSql:"+updSql+":");
......@@ -115,6 +143,7 @@ public class ConsumeOrderCnc extends ActionHandlerEJB implements ConsumeOrderCnc
errCode="VTCANC1";
System.out.println("\n <==== Table Updated Successfully ====>");
}
}// end of cofirmed condition else
}//end of else
} //end of if
if (errCode != null && errCode.trim().length() > 0)
......
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