Commit 20caac42 authored by ajadhav's avatar ajadhav

add protect 1 when data append for lot_no and lot_sl in If else condition

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@183002 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 62943d63
...@@ -1313,12 +1313,21 @@ public class AdjReceiptIC extends ValidatorEJB implements AdjReceiptICRemote,Adj ...@@ -1313,12 +1313,21 @@ public class AdjReceiptIC extends ValidatorEJB implements AdjReceiptICRemote,Adj
pstmt1.close(); pstmt1.close();
pstmt1=null; pstmt1=null;
stkCnt=stkOpt.length(); stkCnt=stkOpt.length();
//Changes Add by Ajay Jadhav on 03/04/2018:START
if("1".equalsIgnoreCase(stkOpt)) if("1".equalsIgnoreCase(stkOpt))
{ {
valueXmlString.append("<lot_no ><![CDATA[").append(" ").append("]]></lot_no>\r\n"); valueXmlString.append("<lot_no protect=\"1\"><![CDATA[").append(" ").append("]]></lot_no>\r\n");
valueXmlString.append("<lot_sl ><![CDATA[").append(" ").append("]]></lot_sl>\r\n"); valueXmlString.append("<lot_sl protect=\"1\" ><![CDATA[").append(" ").append("]]></lot_sl>\r\n");
} }
else
{
valueXmlString.append("<lot_no protect=\"0\"><![CDATA[").append(" ").append("]]></lot_no>\r\n");
valueXmlString.append("<lot_sl protect=\"0\" ><![CDATA[").append(" ").append("]]></lot_sl>\r\n");
}
//Changes Add by Ajay Jadhav on 03/04/2018:END
locCode=checkNull(genericUtility.getColumnValue("loc_code",dom)); locCode=checkNull(genericUtility.getColumnValue("loc_code",dom));
......
...@@ -2867,14 +2867,18 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -2867,14 +2867,18 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
linenoord = checkNull(genericUtility.getColumnValue("line_no__ord", dom)); linenoord = checkNull(genericUtility.getColumnValue("line_no__ord", dom));
linenoord = " " + linenoord; linenoord = " " + linenoord;
linenoord = linenoord.substring(linenoord.length() - 3, linenoord.length()); linenoord = linenoord.substring(linenoord.length() - 3, linenoord.length());
if(rate ==0) //Commented by Ajay Jadhav on 03/04/18:START
/* if(rate ==0)
{ {
errCode = "VTINVRATE3"; errCode = "VTINVRATE3";
errList.add( errCode ); errList.add( errCode );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
else if(rate<0) else*/
//Commented by Ajay Jadhav on 03/04/18:END
if(rate<0)
{ {
errCode = "VTINVRATE2"; errCode = "VTINVRATE2";
errList.add( errCode ); errList.add( errCode );
...@@ -5894,6 +5898,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -5894,6 +5898,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
lsdis= "" , lsstkopt = "", lsunitpur= "" , lsuom = "",mVal= "" ,mVal1 = "",lspackinstr1 = "" , lsdis= "" , lsstkopt = "", lsunitpur= "" , lsuom = "",mVal= "" ,mVal1 = "",lspackinstr1 = "" ,
mUom= "" , lspack1= "" , lsaccdesc= "" , lsvalue= "" , mlotsl= "" ,lsacct = "" , lsloccode= "" ,sysDate = "" , mitem= "" , mUom= "" , lspack1= "" , lsaccdesc= "" , lsvalue= "" , mlotsl= "" ,lsacct = "" , lsloccode= "" ,sysDate = "" , mitem= "" ,
lsacct1= ""; lsacct1= "";
String stkOpt="";
int currentFormNo = 0; int currentFormNo = 0;
Timestamp ldtmfgdate = null ; Timestamp ldtmfgdate = null ;
double lcexchrate = 0.0 ,lcqty = 0.0, mOrdQty= 0.0 ,lcQtyConv = 0 , lcRtConv = 0 ,lishelflife = 0.0 ,lcratestduom = 0.0 , mpending = 0 ,lcrateclg=0, double lcexchrate = 0.0 ,lcqty = 0.0, mOrdQty= 0.0 ,lcQtyConv = 0 , lcRtConv = 0 ,lishelflife = 0.0 ,lcratestduom = 0.0 , mpending = 0 ,lcrateclg=0,
...@@ -7087,9 +7092,11 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -7087,9 +7092,11 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
double inputQty=0; double inputQty=0;
mcode = checkNull(genericUtility.getColumnValue( "item_code", dom )); mcode = checkNull(genericUtility.getColumnValue( "item_code", dom ));
mpordno = checkNull(genericUtility.getColumnValue( "purc_order", dom )); mpordno = checkNull(genericUtility.getColumnValue( "purc_order", dom ));
sql="Select item.item_ser,item.descr, item.ordc_perc, itemser.acct_code__pr, itemser.cctr_code__pr," + sql="Select item.item_ser,item.descr, item.ordc_perc, itemser.acct_code__pr, itemser.cctr_code__pr," +
" itemser.acct_code__in, itemser.cctr_code__in, item.loc_code, item.unit, item.unit__pur, " + " itemser.acct_code__in, itemser.cctr_code__in, item.loc_code, item.unit, item.unit__pur, " +
"item.pack_code,item.pack_instr, item.unit__rate from item, itemser " + "item.pack_code,item.pack_instr, item.unit__rate from item, itemser " +
"where item.item_code = ? and item.item_ser = itemser.item_ser "; "where item.item_code = ? and item.item_ser = itemser.item_ser ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, mcode); pstmt.setString(1, mcode);
...@@ -7097,6 +7104,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -7097,6 +7104,7 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
if (rs.next()) if (rs.next())
{ {
lsitemser = checkNull(rs.getString(1)); lsitemser = checkNull(rs.getString(1));
mdescr = checkNull(rs.getString(2)); mdescr = checkNull(rs.getString(2));
mCancperc = rs.getDouble(3); mCancperc = rs.getDouble(3);
maccr = checkNull(rs.getString(4)); maccr = checkNull(rs.getString(4));
...@@ -7110,11 +7118,41 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec ...@@ -7110,11 +7118,41 @@ public class PoReceiptIc extends ValidatorEJB implements PoReceiptIcLocal,PoRec
lspackinstr1 = checkNull(rs.getString(12)); lspackinstr1 = checkNull(rs.getString(12));
lsunitrate = checkNull(rs.getString(13)); lsunitrate = checkNull(rs.getString(13));
} }
rs.close(); rs.close();
pstmt.close(); pstmt.close();
rs = null; rs = null;
pstmt = null; pstmt = null;
//Changes Add by Ajay Jadhav on 03/04/2018:START
sql = "select (case when stk_opt is null then '0' else stk_opt end) as stk_opt, item_ser from item where item_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, mcode);
rs = pstmt.executeQuery();
if (rs.next())
{
stkOpt = checkNull(rs.getString("stk_opt")).trim();
lsitemser = rs.getString("item_ser");
System.out.println("STKOPT["+stkOpt+"]");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if("1".equalsIgnoreCase(stkOpt))
{
valueXmlString.append("<lot_no protect=\"1\"><![CDATA[").append(" ").append("]]></lot_no>\r\n");
valueXmlString.append("<lot_sl protect=\"1\" ><![CDATA[").append(" ").append("]]></lot_sl>\r\n");
}
else
{
valueXmlString.append("<lot_no protect=\"0\"><![CDATA[").append(" ").append("]]></lot_no>\r\n");
valueXmlString.append("<lot_sl protect=\"0\" ><![CDATA[").append(" ").append("]]></lot_sl>\r\n");
}
//Changes Add by Ajay Jadhav on 03/04/2018:END
if(mpordno == null && mpordno.trim().length() >0) if(mpordno == null && mpordno.trim().length() >0)
{ {
valueXmlString.append("<item_descr >").append("<![CDATA[" + mdescr + "]]>").append("</item_descr>"); valueXmlString.append("<item_descr >").append("<![CDATA[" + mdescr + "]]>").append("</item_descr>");
......
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