Commit b7007a01 authored by smestry's avatar smestry

Updated the indent req for minor bugs.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104811 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 803d2095
...@@ -148,10 +148,10 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -148,10 +148,10 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
switch (currentFormNo) switch (currentFormNo)
{ {
case 1: case 1:
System.out.println("------in detail1 validation----------------"); System.out.println("------Inside IndentReqIC for detail1 validation----------------");
System.out.println("DOM in case 1 wfValData ---->>["+genericUtility.serializeDom(dom).toString()+"]"); /* System.out.println("DOM in case 1 wfValData ---->>["+genericUtility.serializeDom(dom).toString()+"]");
System.out.println("DOM1 in case 1 wfValData ----->>["+genericUtility.serializeDom(dom1).toString()+"]"); System.out.println("DOM1 in case 1 wfValData ----->>["+genericUtility.serializeDom(dom1).toString()+"]");
System.out.println("DOM2 in case 1 wfValData ----->>["+genericUtility.serializeDom(dom2).toString()+"]"); System.out.println("DOM2 in case 1 wfValData ----->>["+genericUtility.serializeDom(dom2).toString()+"]");*/
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
...@@ -164,32 +164,40 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -164,32 +164,40 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
//System.out.println("childNodeName ------->>["+childNodeName+"]"); //System.out.println("childNodeName ------->>["+childNodeName+"]");
if("ind_date".equalsIgnoreCase(childNodeName)) if("ind_date".equalsIgnoreCase(childNodeName))
{ {
System.out.println("-------- inside ind_date -----------------"); System.out.println("-------- inside ind_date -----------------");
mdate1 = checkNullAndTrim(genericUtility.getColumnValue("ind_date", dom)); mdate1 = checkNullAndTrim(genericUtility.getColumnValue("ind_date", dom));
mval = checkNullAndTrim(genericUtility.getColumnValue("site_code__ori", dom)); mval = checkNullAndTrim(genericUtility.getColumnValue("site_code__ori", dom));
Date ind_date = sdf.parse(mdate1);
Date ind_date = sdf.parse(mdate1);
count = currDate.compareTo(ind_date);
if(ind_date.before(currDate) && "A".equalsIgnoreCase(editFlag)) if(mdate1.length() == 0)
{ {
errCode = "VTLESSDATE"; errCode = "VTINDDATE";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside ind_date =========>>[" + errCode + "]");
} }
else else if(mdate1.length() > 0)
{ {
java.sql.Timestamp indDate = Timestamp.valueOf(genericUtility.getValidDateString( mdate1, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");//getDateInAppFormat( mdateStr ); if(count > 1 && "A".equalsIgnoreCase(editFlag))
errCode = SysCommon.nfCheckPeriod( "PUR", indDate, mval, conn );
if(errCode.length() > 0)
{ {
errCode = "VTLESSDATE";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
else
{
java.sql.Timestamp indDate = Timestamp.valueOf(genericUtility.getValidDateString( mdate1, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");//getDateInAppFormat( mdateStr );
errCode = SysCommon.nfCheckPeriod( "PUR", indDate, mval, conn );
if(errCode.length() > 0)
{
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
} }
} }
if("site_code__ori".equalsIgnoreCase(childNodeName) || "site_code__des".equalsIgnoreCase(childNodeName) || if("site_code__ori".equalsIgnoreCase(childNodeName) || "site_code__des".equalsIgnoreCase(childNodeName) ||
...@@ -198,7 +206,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -198,7 +206,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
{ {
System.out.println("-------- inside site_code__acct -----------------"); System.out.println("-------- inside site_code__acct -----------------");
mval = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom)); mval = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom));
System.out.println(" mval =========>>[" + mval + "]");
cnt = getCount("SITE", "SITE_CODE", mval, conn); cnt = getCount("SITE", "SITE_CODE", mval, conn);
if(cnt == 0) if(cnt == 0)
...@@ -206,7 +213,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -206,7 +213,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VMSITE1"; errCode = "VMSITE1";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside site_code__acct =========>>[" + errCode + "]");
} }
} }
...@@ -218,17 +224,12 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -218,17 +224,12 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
ls_ind_type = checkNullAndTrim(genericUtility.getColumnValue("ind_type", dom)); ls_ind_type = checkNullAndTrim(genericUtility.getColumnValue("ind_type", dom));
ls_proj_code = checkNullAndTrim(genericUtility.getColumnValue("proj_code", dom)); ls_proj_code = checkNullAndTrim(genericUtility.getColumnValue("proj_code", dom));
System.out.println("dept_code==========>>["+mval+"]");
System.out.println("ls_ind_type==========>>["+ls_ind_type+"]");
System.out.println("ls_proj_code==========>>["+ls_proj_code+"]");
cnt = getCount("DEPARTMENT", "DEPT_CODE", mval, conn); cnt = getCount("DEPARTMENT", "DEPT_CODE", mval, conn);
if(cnt == 0) if(cnt == 0)
{ {
errCode = "VTDEPT1"; errCode = "VTDEPT1";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside dept_code =========>>[" + errCode + "]");
} }
ls_dis_ind_type_list = checkNullAndTrim(discommon.getDisparams("999999", "IND_TYPE_PARAM", conn)); ls_dis_ind_type_list = checkNullAndTrim(discommon.getDisparams("999999", "IND_TYPE_PARAM", conn));
...@@ -255,7 +256,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -255,7 +256,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTPROJ4"; errCode = "VTPROJ4";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside dept_code1111111 =========>>[" + errCode + "]");
} }
} }
} }
...@@ -275,7 +275,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -275,7 +275,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTITEMSER5"; errCode = "VTITEMSER5";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside item_ser =========>>[" + errCode + "]");
} }
if(mval.length() > 0) if(mval.length() > 0)
...@@ -293,7 +292,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -293,7 +292,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTITEMSER1"; errCode = "VTITEMSER1";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside item_ser 111111=========>>[" + errCode + "]");
} }
if(pstmt != null) if(pstmt != null)
{ {
...@@ -319,7 +317,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -319,7 +317,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VMEMP1"; errCode = "VMEMP1";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside emp_code__req =========>>[" + errCode + "]");
} }
if(errCode.length() == 0) if(errCode.length() == 0)
...@@ -337,7 +334,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -337,7 +334,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VMEMP1"; errCode = "VMEMP1";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside emp_code__req 11111111111 =========>>[" + errCode + "]");
} }
if(pstmt != null) if(pstmt != null)
{ {
...@@ -355,7 +351,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -355,7 +351,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VMEMP2"; errCode = "VMEMP2";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside emp_code__req 222222222 =========>>[" + errCode + "]");
} }
} }
} }
...@@ -379,7 +374,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -379,7 +374,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTWORDER1"; errCode = "VTWORDER1";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside work_order =========>>[" + errCode + "]");
} }
if(pstmt != null) if(pstmt != null)
{ {
...@@ -397,7 +391,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -397,7 +391,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTWORDER2"; errCode = "VTWORDER2";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside work_order 111111 =========>>[" + errCode + "]");
} }
} }
} }
...@@ -467,8 +460,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -467,8 +460,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
for(String str : ls_type_allow_projbudgt) for(String str : ls_type_allow_projbudgt)
{ {
System.out.println("str ==================>>["+str+"]");
System.out.println("ls_ind_type ==================>>["+ls_ind_type+"]");
if(ls_ind_type.equalsIgnoreCase(str)) if(ls_ind_type.equalsIgnoreCase(str))
{ {
lb_ord_flag = true; lb_ord_flag = true;
...@@ -476,8 +467,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -476,8 +467,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
} }
System.out.println("lb_ord_flag ==================>>["+lb_ord_flag+"]");
if(lb_ord_flag) if(lb_ord_flag)
{ {
if(mval.length() == 0) if(mval.length() == 0)
...@@ -585,13 +574,11 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -585,13 +574,11 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
for(String str : ls_proj_type_opt_list) for(String str : ls_proj_type_opt_list)
{ {
System.out.println("str ==================>>["+str+"]");
if(ls_proj_type.equalsIgnoreCase(str)) if(ls_proj_type.equalsIgnoreCase(str))
{ {
errCode = "VTINVPROJ3"; errCode = "VTINVPROJ3";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("errCode 1111111 ==================>>["+errCode+"]");
} }
} }
} }
...@@ -629,9 +616,7 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -629,9 +616,7 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTTASK1"; errCode = "VTTASK1";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println(" errCode inside task_code =========>>[" + errCode + "]");
} }
} }
if("pind_apprv".equalsIgnoreCase(childNodeName)) if("pind_apprv".equalsIgnoreCase(childNodeName))
...@@ -717,19 +702,18 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -717,19 +702,18 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
ls_item_ser = checkNullAndTrim(genericUtility.getColumnValue("item_ser", dom1)); ls_item_ser = checkNullAndTrim(genericUtility.getColumnValue("item_ser", dom1));
ls_del_site = checkNullAndTrim(genericUtility.getColumnValue("site_code__del", dom1)); ls_del_site = checkNullAndTrim(genericUtility.getColumnValue("site_code__del", dom1));
System.out.println("mval===========>>"+mval); /* System.out.println("mval===========>>"+mval);
System.out.println("msite===========>>"+msite); System.out.println("msite===========>>"+msite);
System.out.println("ll_line===========>>"+ll_line); System.out.println("ll_line===========>>"+ll_line);
System.out.println("ls_indent===========>>"+ls_indent); System.out.println("ls_indent===========>>"+ls_indent);
System.out.println("ls_item_ser===========>>"+ls_item_ser); System.out.println("ls_item_ser===========>>"+ls_item_ser);
System.out.println("ls_del_site===========>>"+ls_del_site); System.out.println("ls_del_site===========>>"+ls_del_site);*/
if(mval.length() == 0) if(mval.length() == 0)
{ {
errCode = "VTITMCODE"; errCode = "VTITMCODE";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("errCode 5555555===========>>"+errCode);
} }
...@@ -790,7 +774,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -790,7 +774,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
} }
System.out.println("111111111111111111111----------------------");
if(errCode.length() == 0) if(errCode.length() == 0)
{ {
ls_task_code = checkNullAndTrim(genericUtility.getColumnValue("task_code", dom1)); ls_task_code = checkNullAndTrim(genericUtility.getColumnValue("task_code", dom1));
...@@ -827,8 +810,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -827,8 +810,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
} }
System.out.println("2222222222222222222----------------------");
if(errCode.length() == 0) if(errCode.length() == 0)
{ {
sql = "SELECT CASE WHEN STOP_BUSINESS IS NULL THEN 'N' ELSE STOP_BUSINESS END AS STOP_BUSINESS, ITEM_SER " + sql = "SELECT CASE WHEN STOP_BUSINESS IS NULL THEN 'N' ELSE STOP_BUSINESS END AS STOP_BUSINESS, ITEM_SER " +
...@@ -851,14 +832,10 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -851,14 +832,10 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
rs.close(); rs.close();
rs = null; rs = null;
} }
System.out.println("ls_stop_busi----------------------"+ls_stop_busi);
System.out.println("ls_itemser----------------------"+ls_itemser);
if("N".equalsIgnoreCase(ls_stop_busi)) if("N".equalsIgnoreCase(ls_stop_busi))
{ {
errCode = itmDBAccessEJB.isItem(mval1, mval, "", conn); errCode = itmDBAccessEJB.isItem(mval1, mval, "", conn);
System.out.println( "errCode ============== 1111111 =========>>" +errCode);
if(errCode.length() > 0) if(errCode.length() > 0)
{ {
errList.add(errCode); errList.add(errCode);
...@@ -873,7 +850,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -873,7 +850,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
} }
System.out.println("33333333333333333333333----------------------"+errCode);
if(errCode.length() == 0) if(errCode.length() == 0)
{ {
sql = "SELECT (CASE WHEN EOU IS NULL THEN 'N' ELSE EOU END) AS EOU FROM SITE WHERE SITE_CODE = ? "; sql = "SELECT (CASE WHEN EOU IS NULL THEN 'N' ELSE EOU END) AS EOU FROM SITE WHERE SITE_CODE = ? ";
...@@ -895,7 +871,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -895,7 +871,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
rs = null; rs = null;
} }
System.out.println("ls_eou----------------------"+ls_eou);
if("Y".equalsIgnoreCase(ls_eou)) if("Y".equalsIgnoreCase(ls_eou))
{ {
...@@ -917,7 +892,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -917,7 +892,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
rs.close(); rs.close();
rs = null; rs = null;
} }
System.out.println("ls_lop_reqd----------------------"+ls_lop_reqd);
if("Y".equalsIgnoreCase(ls_lop_reqd)) if("Y".equalsIgnoreCase(ls_lop_reqd))
{ {
...@@ -949,7 +923,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -949,7 +923,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
rs.close(); rs.close();
rs = null; rs = null;
} }
System.out.println("ll_cnt----------------------"+ll_cnt);
if(ll_cnt == 0) if(ll_cnt == 0)
{ {
errCode = "VTLOPITEM"; errCode = "VTLOPITEM";
...@@ -959,7 +932,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -959,7 +932,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
} }
} }
System.out.println("44444444444444444444444----------------------"+errCode);
if(errCode.length() == 0) if(errCode.length() == 0)
{ {
...@@ -976,16 +948,12 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -976,16 +948,12 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(errCode.length() == 0) if(errCode.length() == 0)
{ {
errCode = checkRefCode(mval, msite, conn); errCode = checkRefCode(mval, msite, conn);
System.out.println("checkRefCode errCode----------------------"+errCode);
if(errCode.length() > 0) if(errCode.length() > 0)
{ {
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
} }
System.out.println("555555555555555----------------------"+errCode);
System.out.println("ls_item_ser----------------------"+ls_item_ser);
System.out.println("ls_itemser----------------------"+ls_itemser);
if(errCode.length() == 0) if(errCode.length() == 0)
{ {
if((ls_item_ser.length() == 0 || ls_item_ser.length() > 0) && ls_item_ser.equalsIgnoreCase(ls_itemser)) if((ls_item_ser.length() == 0 || ls_item_ser.length() > 0) && ls_item_ser.equalsIgnoreCase(ls_itemser))
...@@ -1049,7 +1017,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1049,7 +1017,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
} }
System.out.println("666666666666666666666----------------------"+errCode);
if(errCode.length() == 0) if(errCode.length() == 0)
{ {
sql = " SELECT COUNT(A.ITEM_CODE), SUM(CASE WHEN A.MAX_QTY IS NULL THEN 0 ELSE A.MAX_QTY END - CASE WHEN A.QUANTITY_REL IS NULL THEN 0 ELSE A.QUANTITY_REL END) " + sql = " SELECT COUNT(A.ITEM_CODE), SUM(CASE WHEN A.MAX_QTY IS NULL THEN 0 ELSE A.MAX_QTY END - CASE WHEN A.QUANTITY_REL IS NULL THEN 0 ELSE A.QUANTITY_REL END) " +
...@@ -1208,20 +1175,8 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1208,20 +1175,8 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTQTY"; errCode = "VTQTY";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("----------- Inside quantity errorCode 22222-------------- "+errCode);
} }
/*if(mqty.length() == 0)
{
errCode = "VTQTY";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
System.out.println("----------- Inside quantity errorCode 11111 -------------- "+errCode);
}
else if(mqty.length() > 0)
{
}*/
else else
{ {
ls_type_allow_projbudgt_list = checkNullAndTrim(discommon.getDisparams("999999", "TYPE_ALLOW_PROJBUDGET", conn)); ls_type_allow_projbudgt_list = checkNullAndTrim(discommon.getDisparams("999999", "TYPE_ALLOW_PROJBUDGET", conn));
...@@ -1257,7 +1212,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1257,7 +1212,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTMAXRATE"; errCode = "VTMAXRATE";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("-------------errCode 111111111------------------"+errCode);
} }
else if(Double.parseDouble(mmax_rate) > Double.parseDouble(mrate)) else if(Double.parseDouble(mmax_rate) > Double.parseDouble(mrate))
{ {
...@@ -1268,7 +1222,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1268,7 +1222,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs.next()) if(rs.next())
{ {
lc_approxcost = checkNullAndTrim(rs.getString("APPROX_COST")); lc_approxcost = checkNullAndTrim(rs.getString("APPROX_COST"));
System.out.println("-------------lc_approxcost -----------------"+lc_approxcost);
} }
if(pstmt != null) if(pstmt != null)
...@@ -1291,7 +1244,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1291,7 +1244,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs.next()) if(rs.next())
{ {
lc_ind_amount = rs.getDouble(1); lc_ind_amount = rs.getDouble(1);
System.out.println("-------------lc_ind_amount -----------------"+lc_ind_amount);
} }
if(pstmt != null) if(pstmt != null)
...@@ -1312,7 +1264,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1312,7 +1264,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
while(rs.next()) while(rs.next())
{ {
ls_old_indno = checkNullAndTrim(rs.getString("IND_NO")); ls_old_indno = checkNullAndTrim(rs.getString("IND_NO"));
System.out.println("-------------ls_old_indno -----------------"+ls_old_indno);
sql1 = "SELECT SUM(A.TOT_AMT * B.EXCH_RATE) FROM PORDDET A, PORDER B WHERE ( A.PURC_ORDER = B.PURC_ORDER ) " + sql1 = "SELECT SUM(A.TOT_AMT * B.EXCH_RATE) FROM PORDDET A, PORDER B WHERE ( A.PURC_ORDER = B.PURC_ORDER ) " +
"AND B.CONFIRMED = 'Y' AND A.PROJ_CODE = ? AND A.IND_NO = ? AND B.STATUS <> 'X' AND A.STATUS <> 'C' "; "AND B.CONFIRMED = 'Y' AND A.PROJ_CODE = ? AND A.IND_NO = ? AND B.STATUS <> 'X' AND A.STATUS <> 'C' ";
...@@ -1323,7 +1274,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1323,7 +1274,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs1.next()) if(rs1.next())
{ {
lc_po_amt1 = rs1.getDouble(1); lc_po_amt1 = rs1.getDouble(1);
System.out.println("-------------lc_po_amt1 -----------------"+lc_po_amt1);
} }
if(pstmt1 != null) if(pstmt1 != null)
{ {
...@@ -1346,7 +1296,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1346,7 +1296,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs1.next()) if(rs1.next())
{ {
lc_porcp_amt = rs1.getDouble(1); lc_porcp_amt = rs1.getDouble(1);
System.out.println("-------------lc_porcp_amt -----------------"+lc_porcp_amt);
} }
if(pstmt1 != null) if(pstmt1 != null)
...@@ -1371,7 +1320,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1371,7 +1320,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs1.next()) if(rs1.next())
{ {
lc_pret_amt = rs1.getDouble(1); lc_pret_amt = rs1.getDouble(1);
System.out.println("-------------lc_pret_amt -----------------"+lc_pret_amt);
} }
if(pstmt1 != null) if(pstmt1 != null)
...@@ -1386,8 +1334,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1386,8 +1334,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
lc_tot_poamt = lc_tot_poamt + lc_po_amt1 + lc_porcp_amt - lc_pret_amt; lc_tot_poamt = lc_tot_poamt + lc_po_amt1 + lc_porcp_amt - lc_pret_amt;
System.out.println("-------------lc_tot_poamt -----------------"+lc_tot_poamt);
} }
if(pstmt != null) if(pstmt != null)
{ {
...@@ -1400,8 +1346,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1400,8 +1346,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
rs = null; rs = null;
} }
lc_tot_poamt11 = lc_tot_poamt; lc_tot_poamt11 = lc_tot_poamt;
System.out.println("-------------lc_tot_poamt -----------------"+lc_tot_poamt);
System.out.println("-------------lc_tot_poamt11 -----------------"+lc_tot_poamt11);
sql = "SELECT SUM(A.TOT_AMT * B.EXCH_RATE) FROM PORDDET A, PORDER B WHERE ( A.PURC_ORDER = B.PURC_ORDER ) " + sql = "SELECT SUM(A.TOT_AMT * B.EXCH_RATE) FROM PORDDET A, PORDER B WHERE ( A.PURC_ORDER = B.PURC_ORDER ) " +
"AND B.CONFIRMED = ? AND A.PROJ_CODE = ? AND A.IND_NO IS NULL AND B.STATUS <> ? AND A.STATUS <> ? "; "AND B.CONFIRMED = ? AND A.PROJ_CODE = ? AND A.IND_NO IS NULL AND B.STATUS <> ? AND A.STATUS <> ? ";
...@@ -1414,7 +1358,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1414,7 +1358,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs.next()) if(rs.next())
{ {
lc_po_amt12 = rs.getDouble(1); lc_po_amt12 = rs.getDouble(1);
System.out.println("-------------lc_po_amt12 -----------------"+lc_po_amt12);
} }
if(pstmt != null) if(pstmt != null)
...@@ -1442,7 +1385,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1442,7 +1385,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs.next()) if(rs.next())
{ {
lc_porcp_amt11 = rs.getDouble(1); lc_porcp_amt11 = rs.getDouble(1);
System.out.println("-------------lc_porcp_amt11 -----------------"+lc_porcp_amt11);
} }
if(pstmt != null) if(pstmt != null)
...@@ -1470,7 +1412,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1470,7 +1412,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs.next()) if(rs.next())
{ {
lc_pret_amt11 = rs.getDouble(1); lc_pret_amt11 = rs.getDouble(1);
System.out.println("-------------lc_pret_amt11 -----------------"+lc_pret_amt11);
} }
if(pstmt != null) if(pstmt != null)
...@@ -1508,7 +1449,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1508,7 +1449,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
//The value ls_temp is not being further used, so the below code is commented [End] //The value ls_temp is not being further used, so the below code is commented [End]
lc_tot_poamt = lc_tot_poamt11 + lc_po_amt12 + lc_porcp_amt11 - lc_pret_amt11; lc_tot_poamt = lc_tot_poamt11 + lc_po_amt12 + lc_porcp_amt11 - lc_pret_amt11;
System.out.println("-------------lc_tot_poamt -----------------"+lc_tot_poamt);
//The value ls_temp is not being further used, so the below code is commented [Start] //The value ls_temp is not being further used, so the below code is commented [Start]
/*ls_temp = "Quantity:->lc_tot_poamt total amount"+lc_tot_poamt; /*ls_temp = "Quantity:->lc_tot_poamt total amount"+lc_tot_poamt;
...@@ -1533,7 +1473,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1533,7 +1473,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
//The value ls_temp is not being further used, so the below code is commented [End] //The value ls_temp is not being further used, so the below code is commented [End]
lc_ind_amount = lc_ind_amount + lc_tot_poamt; lc_ind_amount = lc_ind_amount + lc_tot_poamt;
System.out.println("-------------lc_ind_amount -----------------"+lc_ind_amount);
sql = " SELECT SUM((CASE WHEN B.QUANTITY IS NULL THEN 0 ELSE B.QUANTITY END) * (CASE WHEN B.MAX_RATE IS NULL THEN 0 ELSE B.MAX_RATE END)) " + sql = " SELECT SUM((CASE WHEN B.QUANTITY IS NULL THEN 0 ELSE B.QUANTITY END) * (CASE WHEN B.MAX_RATE IS NULL THEN 0 ELSE B.MAX_RATE END)) " +
" FROM INDENT_HDR A, INDENT_DET B WHERE A.IND_NO = B.IND_NO AND A.CONFIRMED = ? AND A.PROJ_CODE = ? AND" + " FROM INDENT_HDR A, INDENT_DET B WHERE A.IND_NO = B.IND_NO AND A.CONFIRMED = ? AND A.PROJ_CODE = ? AND" +
...@@ -1547,7 +1486,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1547,7 +1486,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs.next()) if(rs.next())
{ {
lc_prev_indent = rs.getDouble(1); lc_prev_indent = rs.getDouble(1);
System.out.println("-------------lc_prev_indent -----------------"+lc_prev_indent);
} }
if(pstmt != null) if(pstmt != null)
...@@ -1562,26 +1500,19 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1562,26 +1500,19 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
String domId = getObjNameFromDom( dom, "domID", "2" ); String domId = getObjNameFromDom( dom, "domID", "2" );
System.out.println("domId 11111111 ==========>>"+domId);
String mqty_brow = "", lc_rate_brow = ""; String mqty_brow = "", lc_rate_brow = "";
for(ll_count = 1; ll_count < Integer.parseInt(domId); ll_count++) for(ll_count = 1; ll_count < Integer.parseInt(domId); ll_count++)
{ {
System.out.println("ll_count ==========>>"+ll_count);
System.out.println("domId ==========>>"+domId);
System.out.println("ll_lineno ==========>>"+ll_lineno);
if(!domId.equalsIgnoreCase(ll_lineno)) if(!domId.equalsIgnoreCase(ll_lineno))
{ {
mqty_brow = checkNullAndTrim(genericUtility.getColumnValue("quantity", dom2, "2", domId)); mqty_brow = checkNullAndTrim(genericUtility.getColumnValue("quantity", dom2, "2", domId));
lc_rate_brow = checkNullAndTrim(genericUtility.getColumnValue("max_rate", dom2, "2", domId)); lc_rate_brow = checkNullAndTrim(genericUtility.getColumnValue("max_rate", dom2, "2", domId));
System.out.println("domId ==========>>"+domId);
System.out.println("-------------mqty_brow -----------------"+mqty_brow);
System.out.println("-------------lc_rate_brow -----------------"+lc_rate_brow);
lc_tot_amt = lc_tot_amt + (Double.parseDouble(mqty_brow) * Double.parseDouble(lc_rate_brow)); lc_tot_amt = lc_tot_amt + (Double.parseDouble(mqty_brow) * Double.parseDouble(lc_rate_brow));
System.out.println("domId ==========>>"+domId);
System.out.println("-------------lc_tot_amt -----------------"+lc_tot_amt); System.out.println("-------------lc_tot_amt -----------------"+lc_tot_amt);
//The value ls_temp is not being further used, so the below code is commented [Start] //The value ls_temp is not being further used, so the below code is commented [Start]
/*ls_temp = "in loop Current Tot_amt"+lc_tot_poamt; /*ls_temp = "in loop Current Tot_amt"+lc_tot_poamt;
sql = " SELECT ? FROM DUAL "; sql = " SELECT ? FROM DUAL ";
...@@ -1607,22 +1538,16 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1607,22 +1538,16 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
} }
System.out.println("-------------lc_tot_amt after -----------------"+lc_tot_amt);
lc_tot_amt = lc_tot_amt + (Double.parseDouble(mqty) * Double.parseDouble(mmax_rate)); lc_tot_amt = lc_tot_amt + (Double.parseDouble(mqty) * Double.parseDouble(mmax_rate));
System.out.println("-------------lc_tot_amt after1111111111 -----------------"+lc_tot_amt);
lc_tot_amt_proj = lc_ind_amount + lc_tot_amt + lc_prev_indent; lc_tot_amt_proj = lc_ind_amount + lc_tot_amt + lc_prev_indent;
lc_approxcost = (lc_approxcost.length() == 0) ? "0" : lc_approxcost; lc_approxcost = (lc_approxcost.length() == 0) ? "0" : lc_approxcost;
lc_exceed_amt = lc_tot_amt_proj - Double.parseDouble(lc_approxcost); lc_exceed_amt = lc_tot_amt_proj - Double.parseDouble(lc_approxcost);
System.out.println("-------------lc_tot_amt_proj after1111111111 -----------------"+lc_tot_amt_proj);
System.out.println("-------------lc_approxcost after1111111111 -----------------"+lc_approxcost);
if(lc_tot_amt_proj > Double.parseDouble(lc_approxcost)) if(lc_tot_amt_proj > Double.parseDouble(lc_approxcost))
{ {
errCode = "VTPROJCOST"; errCode = "VTPROJCOST";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("-------------errCode 444444444444 -----------------"+errCode);
} }
} }
...@@ -1639,7 +1564,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1639,7 +1564,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs.next()) if(rs.next())
{ {
mqty2 = rs.getDouble(1); mqty2 = rs.getDouble(1);
System.out.println("-------------mqty2 -----------------"+mqty2);
} }
if(pstmt != null) if(pstmt != null)
...@@ -1662,7 +1586,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1662,7 +1586,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(rs.next()) if(rs.next())
{ {
mqty2 = rs.getDouble(1); mqty2 = rs.getDouble(1);
System.out.println("-------------mqty2 111111111 -----------------"+mqty2);
} }
if(pstmt != null) if(pstmt != null)
...@@ -1681,7 +1604,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1681,7 +1604,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTQMAXI"; errCode = "VTQMAXI";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("-------------mqty2 111111111 errCode-----------------"+errCode);
} }
} }
else if(Double.parseDouble(mqty) > mqty2) else if(Double.parseDouble(mqty) > mqty2)
...@@ -1689,22 +1611,16 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1689,22 +1611,16 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTQMAXSI"; errCode = "VTQMAXSI";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("-------------mqty2 111111111 errCode 11111111 -----------------"+errCode);
} }
} }
} }
} }
if("acct_code".equalsIgnoreCase(childNodeName)) if("acct_code".equalsIgnoreCase(childNodeName))
{ {
System.out.println("----------- Inside acct_code wfValData-------------- ");
mval = checkNullAndTrim(genericUtility.getColumnValue("acct_code", dom)); mval = checkNullAndTrim(genericUtility.getColumnValue("acct_code", dom));
msite = checkNullAndTrim(genericUtility.getColumnValue("site_code__ori", dom1)); msite = checkNullAndTrim(genericUtility.getColumnValue("site_code__ori", dom1));
System.out.println("------------ acct_code --------------- " + mval);
System.out.println("------------ site_code__ori --------------- " + msite);
errCode = finCommon.isAcctCode(msite, mval, "" , conn); errCode = finCommon.isAcctCode(msite, mval, "" , conn);
System.out.println("----------- errCode in acct_code -------------- "+errCode);
if(errCode.length() > 0) if(errCode.length() > 0)
{ {
errList.add(errCode); errList.add(errCode);
...@@ -1717,20 +1633,15 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1717,20 +1633,15 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
mval = checkNullAndTrim(genericUtility.getColumnValue("cctr_code", dom)); mval = checkNullAndTrim(genericUtility.getColumnValue("cctr_code", dom));
mval1 = checkNullAndTrim(genericUtility.getColumnValue("acct_code", dom)); mval1 = checkNullAndTrim(genericUtility.getColumnValue("acct_code", dom));
System.out.println("------------ cctr_code --------------- " + mval);
System.out.println("------------ acct_code--------------- " + mval1);
if(mval.length() == 0) if(mval.length() == 0)
{ {
errCode = "VTINDCTRCD"; errCode = "VTINDCTRCD";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("------------ cctr_code errCode --------------- " + errCode);
} }
else else
{ {
errCode = finCommon.isCctrCode(mval1, mval, "", conn); errCode = finCommon.isCctrCode(mval1, mval, "", conn);
System.out.println("----------- errCode in cctr_code -------------- "+errCode);
if(errCode.length() > 0) if(errCode.length() > 0)
{ {
errList.add(errCode); errList.add(errCode);
...@@ -1747,11 +1658,8 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1747,11 +1658,8 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if(mval.length() > 0) if(mval.length() > 0)
{ {
msite = checkNullAndTrim(genericUtility.getColumnValue("site_code__ori", dom1)); msite = checkNullAndTrim(genericUtility.getColumnValue("site_code__ori", dom1));
System.out.println("------------ msite --------------- " + msite);
System.out.println("------------ mval--------------- " + mval);
errCode = finCommon.isSupplier(msite, mval, "",conn); errCode = finCommon.isSupplier(msite, mval, "",conn);
System.out.println("----------- errCode in supp_code__pref -------------- "+errCode);
if(errCode.length() > 0) if(errCode.length() > 0)
{ {
errList.add(errCode); errList.add(errCode);
...@@ -1764,14 +1672,11 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1764,14 +1672,11 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
System.out.println("----------- Inside emp_code_iapr wfValData-------------- "+childNodeName); System.out.println("----------- Inside emp_code_iapr wfValData-------------- "+childNodeName);
mval = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom)); mval = checkNullAndTrim(genericUtility.getColumnValue(childNodeName, dom));
System.out.println("----------- Inside emp_code_iapr mval-------------- "+mval);
if(mval.length() > 0) if(mval.length() > 0)
{ {
msite = checkNullAndTrim(genericUtility.getColumnValue("site_code__ori", dom1)); msite = checkNullAndTrim(genericUtility.getColumnValue("site_code__ori", dom1));
System.out.println("----------- Inside emp_code_iapr msite-------------- "+msite);
errCode = getEmployeeResig(mval, msite, conn); errCode = getEmployeeResig(mval, msite, conn);
System.out.println("----------- errCode in emp_code_iapr -------------- "+errCode);
if(errCode.length() > 0) if(errCode.length() > 0)
{ {
errList.add(errCode); errList.add(errCode);
...@@ -1783,7 +1688,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1783,7 +1688,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTPUINDAPP"; errCode = "VTPUINDAPP";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("----------- errCode in emp_code_iapr 11111111-------------- "+errCode);
} }
} }
...@@ -1816,7 +1720,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1816,7 +1720,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
errCode = "VTPKCD1"; errCode = "VTPKCD1";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("------- Inside pack_code errCode-------------"+errCode);
} }
} }
...@@ -1826,10 +1729,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1826,10 +1729,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
mval = checkNullAndTrim(genericUtility.getColumnValue("specific_instr", dom)); mval = checkNullAndTrim(genericUtility.getColumnValue("specific_instr", dom));
mval1 = checkNullAndTrim(genericUtility.getColumnValue("item_code", dom)); mval1 = checkNullAndTrim(genericUtility.getColumnValue("item_code", dom));
msite = checkNullAndTrim(genericUtility.getColumnValue("site_code__ori", dom1)); msite = checkNullAndTrim(genericUtility.getColumnValue("site_code__ori", dom1));
System.out.println("----------- Inside emp_code_iapr mval-------------- "+mval);
System.out.println("----------- Inside emp_code_iapr mval-------------- "+mval1);
System.out.println("----------- Inside emp_code_iapr mval-------------- "+msite);
sql = "SELECT SPEC_REQD FROM SITEITEM WHERE SITE_CODE = ? AND ITEM_CODE = ? "; sql = "SELECT SPEC_REQD FROM SITEITEM WHERE SITE_CODE = ? AND ITEM_CODE = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -1855,7 +1754,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1855,7 +1754,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
{ {
mval2 = "N"; mval2 = "N";
} }
System.out.println("----------- Inside specific_instr mval2 -------------- " +mval2);
if("Y".equalsIgnoreCase(mval2)) if("Y".equalsIgnoreCase(mval2))
{ {
if(mval.length() == 0) if(mval.length() == 0)
...@@ -1867,7 +1765,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1867,7 +1765,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
else if("N".equalsIgnoreCase(mval2)) else if("N".equalsIgnoreCase(mval2))
{ {
System.out.println("----------- 1111111111111111-------------- ");
sql = "SELECT SPEC_REQD FROM ITEM WHERE ITEM_CODE = ? "; sql = "SELECT SPEC_REQD FROM ITEM WHERE ITEM_CODE = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, mval1); pstmt.setString(1, mval1);
...@@ -1886,8 +1783,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1886,8 +1783,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
rs.close(); rs.close();
rs = null; rs = null;
} }
System.out.println("----------- Inside specific_instr 111111111111111 -------------- " +mval2);
System.out.println("----------- Inside mval 111111111111111 -------------- " +mval);
if("Y".equalsIgnoreCase(mval2)) if("Y".equalsIgnoreCase(mval2))
{ {
if(mval.length() == 0) if(mval.length() == 0)
...@@ -1919,7 +1814,7 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1919,7 +1814,7 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
ls_itemcode = checkNullAndTrim(genericUtility.getColumnValue("item_code", dom)); ls_itemcode = checkNullAndTrim(genericUtility.getColumnValue("item_code", dom));
double conQty = discommon.convQtyFactor(mval, mval1, ls_itemcode, Double.parseDouble(lc_conv), conn); double conQty = discommon.convQtyFactor(mval, mval1, ls_itemcode, Double.parseDouble(lc_conv), conn);
// Sneha how to show error code // how to throw error code, because the convQtyFactor method returns the double value
//errcode = gf_check_conv_fact(ls_item, mval, mval1, lc_convqtystduom) //errcode = gf_check_conv_fact(ls_item, mval, mval1, lc_convqtystduom)
} }
...@@ -1943,17 +1838,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -1943,17 +1838,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
mrate = (mrate.length() == 0) ? "0" : mrate; mrate = (mrate.length() == 0) ? "0" : mrate;
mmax_rate = (mmax_rate.length() == 0) ? "0" : mmax_rate; mmax_rate = (mmax_rate.length() == 0) ? "0" : mmax_rate;
ls_indent = (ls_indent.length() == 0) ? "@@@" : ls_indent; ls_indent = (ls_indent.length() == 0) ? "@@@" : ls_indent;
System.out.println("-------------mqty------------------"+mqty);
System.out.println("-------------mrate------------------"+mrate);
System.out.println("-------------mmax_rate------------------"+mmax_rate);
System.out.println("-------------mval------------------"+mval);
System.out.println("-------------mval1------------------"+mval1);
System.out.println("-------------mqty------------------"+mqty);
System.out.println("-------------ls_proj_code------------------"+ls_proj_code);
System.out.println("-------------ls_indent------------------"+ls_indent);
System.out.println("-------------ll_lineno------------------"+ll_lineno);
System.out.println("-------------ls_ind_type------------------"+ls_ind_type);
if(errCode.length() == 0) if(errCode.length() == 0)
...@@ -2281,19 +2165,13 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -2281,19 +2165,13 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
String mqty_brow = "", lc_rate_brow = ""; String mqty_brow = "", lc_rate_brow = "";
for(ll_count = 1; ll_count < Integer.parseInt(domId); ll_count++) for(ll_count = 1; ll_count < Integer.parseInt(domId); ll_count++)
{ {
System.out.println("ll_count ==========>>"+ll_count);
System.out.println("domId ==========>>"+domId);
System.out.println("ll_lineno ==========>>"+ll_lineno);
if(!domId.equalsIgnoreCase(ll_lineno)) if(!domId.equalsIgnoreCase(ll_lineno))
{ {
mqty_brow = checkNullAndTrim(genericUtility.getColumnValue("quantity", dom2, "2", domId)); mqty_brow = checkNullAndTrim(genericUtility.getColumnValue("quantity", dom2, "2", domId));
lc_rate_brow = checkNullAndTrim(genericUtility.getColumnValue("max_rate", dom2, "2", domId)); lc_rate_brow = checkNullAndTrim(genericUtility.getColumnValue("max_rate", dom2, "2", domId));
System.out.println("domId ==========>>"+domId);
System.out.println("-------------mqty_brow -----------------"+mqty_brow);
System.out.println("-------------lc_rate_brow -----------------"+lc_rate_brow);
lc_tot_amt = lc_tot_amt + (Double.parseDouble(mqty_brow) * Double.parseDouble(lc_rate_brow)); lc_tot_amt = lc_tot_amt + (Double.parseDouble(mqty_brow) * Double.parseDouble(lc_rate_brow));
System.out.println("domId ==========>>"+domId);
System.out.println("-------------lc_tot_amt -----------------"+lc_tot_amt); System.out.println("-------------lc_tot_amt -----------------"+lc_tot_amt);
//The value ls_temp is not being further used, so the below code is commented [Start] //The value ls_temp is not being further used, so the below code is commented [Start]
...@@ -2368,9 +2246,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -2368,9 +2246,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
ls_emp = checkNullAndTrim(genericUtility.getColumnValue("emp_code__qcaprv", dom)); ls_emp = checkNullAndTrim(genericUtility.getColumnValue("emp_code__qcaprv", dom));
ls_item = checkNullAndTrim(genericUtility.getColumnValue("item_code", dom)); ls_item = checkNullAndTrim(genericUtility.getColumnValue("item_code", dom));
System.out.println("----------- ls_emp -------------- "+ls_emp);
System.out.println("----------- ls_item -------------- "+ls_item);
sql = "SELECT QC_REQD FROM ITEM WHERE ITEM_CODE = ? "; sql = "SELECT QC_REQD FROM ITEM WHERE ITEM_CODE = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, ls_item); pstmt.setString(1, ls_item);
...@@ -2393,7 +2268,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -2393,7 +2268,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
if("Y".equalsIgnoreCase(ls_qc_reqd)) if("Y".equalsIgnoreCase(ls_qc_reqd))
{ {
errCode = getEmployeeResig(ls_emp, "", conn); errCode = getEmployeeResig(ls_emp, "", conn);
System.out.println("----------- Inside emp_code__qcaprv errCode -------------- "+errCode);
if(errCode.length() != 0) if(errCode.length() != 0)
{ {
errCode = "VERREMPL"; errCode = "VERREMPL";
...@@ -2509,7 +2383,7 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -2509,7 +2383,7 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
rs = null; rs = null;
} }
if(ldt_consdate.trim().length() > 0 && ldt_reqdate.length() > 0) if(ldt_consdate.trim().length() > 0 && ldt_reqdate_temp != null)
{ {
String temp = sdf.format(ldt_reqdate_temp); String temp = sdf.format(ldt_reqdate_temp);
mdate = sdf.parse(temp); mdate = sdf.parse(temp);
...@@ -2533,30 +2407,23 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -2533,30 +2407,23 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
ldt_consdate = (ldt_consdate == null || ldt_consdate.length() == 0) ? "" : ldt_consdate; ldt_consdate = (ldt_consdate == null || ldt_consdate.length() == 0) ? "" : ldt_consdate;
mdate1 = (mdate1 == null || mdate1.length() == 0) ? "" : mdate1; mdate1 = (mdate1 == null || mdate1.length() == 0) ? "" : mdate1;
System.out.println("ldt_consdate============>>["+ldt_consdate+"]");
System.out.println("mdate1============>>"+mdate1);
//Timestamp tempTestDate = Timestamp.valueOf("1900-01-01 00:00:00"); || ldt_consdate.equals(tempTestDate) //Timestamp tempTestDate = Timestamp.valueOf("1900-01-01 00:00:00"); || ldt_consdate.equals(tempTestDate)
if(ldt_consdate.trim().length() == 0) if(ldt_consdate.trim().length() == 0)
{ {
errCode = "VTINDREQDT"; errCode = "VTINDREQDT";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("ldt_consdate errCode ============>>"+errCode);
} }
else if(ldt_consdate.trim().length() > 0) else if(ldt_consdate.trim().length() > 0)
{ {
ldt_consdate1 = sdf.parse(ldt_consdate); ldt_consdate1 = sdf.parse(ldt_consdate);
mdate = sdf.parse(mdate1); mdate = sdf.parse(mdate1);
System.out.println("ldt_consdate after ============>>"+ldt_consdate1);
System.out.println("mdate1 after ============>>"+mdate);
if(ldt_consdate1.before(mdate)) if(ldt_consdate1.before(mdate))
{ {
errCode = "VTINDDT"; errCode = "VTINDDT";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
System.out.println("ldt_consdate errCode 111111111 ============>>"+errCode);
} }
} }
...@@ -2572,7 +2439,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -2572,7 +2439,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
{ {
errCode = finCommon.isAnalysis(mval1, mval, "", conn); errCode = finCommon.isAnalysis(mval1, mval, "", conn);
errCode = (errCode.length() == 0 || errCode == null) ? "" : errCode; errCode = (errCode.length() == 0 || errCode == null) ? "" : errCode;
System.out.println("----------- Inside anal_code errCode -------------- "+ errCode);
if(errCode.length() > 0 || errCode != null) if(errCode.length() > 0 || errCode != null)
{ {
errList.add(errCode); errList.add(errCode);
...@@ -2779,12 +2645,13 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -2779,12 +2645,13 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
ld_purc_rate = "", ld_reo_qty = "", ls_unitpur = "", ls_emp_code__qcaprv = "", ls_fname = "",ls_mname = "", ls_lname = "", ld_pur_lead_i = "", ls_supp_pref_i = "", ls_emp_pur_si = "", ld_purc_rate = "", ld_reo_qty = "", ls_unitpur = "", ls_emp_code__qcaprv = "", ls_fname = "",ls_mname = "", ls_lname = "", ld_pur_lead_i = "", ls_supp_pref_i = "", ls_emp_pur_si = "",
ls_emp_iapr_si = "", ls_emp_pur_is = "", ls_emp_iapr_is = "", ls_emp_pur = "", ls_emp_iapr = "", pckinstr = "", indent_type = "", ls_emp_iapr_si = "", ls_emp_pur_is = "", ls_emp_iapr_is = "", ls_emp_pur = "", ls_emp_iapr = "", pckinstr = "", indent_type = "",
ls_cctr_dept = "", cctr = "", ic_pur_lead_time = "", ld_ind_date = "", ls_track_shelf_life = "", ls_qc_reqd = "", ls_site_code__ori = "", ls_cctr_dept = "", cctr = "", ic_pur_lead_time = "", ld_ind_date = "", ls_track_shelf_life = "", ls_qc_reqd = "", ls_site_code__ori = "",
ls_smnfr_code = "", ls_allsmnfr_code = "", acct = "", ls_emppurc = "", ls_itemser = ""; ls_smnfr_code = "", ls_allsmnfr_code = "", ls_emppurc = "", ls_itemser = "";
int qty1 = 0, li_cnt = 0, li_ctr = 0, ld_maxval = 0, cnt = 0, lc_conv = 0, itemCnt = 0; int qty1 = 0, li_cnt = 0, li_ctr = 0, ld_maxval = 0, cnt = 0, lc_conv = 0, itemCnt = 0;
Date ind_date = null; Date ind_date = null;
boolean lb_ind_type_flag = false; boolean lb_ind_type_flag = false;
double ld_last_purrate = 0, lc_budget_amt = 0, ld_rate = 0, ld_amt = 0; double ld_last_purrate = 0, lc_budget_amt = 0, ld_rate = 0, ld_amt = 0;
String [] acct = null;
System.out.println("xtraParams=["+xtraParams+"]"); System.out.println("xtraParams=["+xtraParams+"]");
System.out.println("currentColumn inside itemChanged................. : ["+currentColumn+"]"); System.out.println("currentColumn inside itemChanged................. : ["+currentColumn+"]");
...@@ -2810,9 +2677,9 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -2810,9 +2677,9 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
{ {
case 1: case 1:
{ {
System.out.println("hdrDataDom in itemchanged case 1------->>["+genericUtility.serializeDom(hdrDataDom)+"]"); /* System.out.println("hdrDataDom in itemchanged case 1------->>["+genericUtility.serializeDom(hdrDataDom)+"]");
System.out.println("currFormDataDom in itemchanged case1 ------>>["+genericUtility.serializeDom(currFormDataDom)+"]"); System.out.println("currFormDataDom in itemchanged case1 ------>>["+genericUtility.serializeDom(currFormDataDom)+"]");
System.out.println("allFormDataDom in itemchanged case1 ------>>["+genericUtility.serializeDom(allFormDataDom)+"]"); System.out.println("allFormDataDom in itemchanged case1 ------>>["+genericUtility.serializeDom(allFormDataDom)+"]");*/
valueXmlString.append( "<Detail1>\r\n" ); valueXmlString.append( "<Detail1>\r\n" );
if( currentColumn.trim().equalsIgnoreCase( "itm_defaultedit" ) ) if( currentColumn.trim().equalsIgnoreCase( "itm_defaultedit" ) )
...@@ -3283,10 +3150,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -3283,10 +3150,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
ls_site_code__del = checkNullAndTrim(genericUtility.getColumnValue("site_code__del", hdrDataDom)); ls_site_code__del = checkNullAndTrim(genericUtility.getColumnValue("site_code__del", hdrDataDom));
ls_ind_type = checkNullAndTrim(genericUtility.getColumnValue("ind_type", hdrDataDom)); ls_ind_type = checkNullAndTrim(genericUtility.getColumnValue("ind_type", hdrDataDom));
System.out.println("proj_code ==================>>["+mval+"]");
System.out.println("site_code__del==================>>["+ls_site_code__del+"]");
System.out.println("ind_type==================>>["+ls_ind_type+"]");
sql = "SELECT DESCR FROM PROJECT WHERE PROJ_CODE = ? "; sql = "SELECT DESCR FROM PROJECT WHERE PROJ_CODE = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, mval); pstmt.setString(1, mval);
...@@ -3336,10 +3199,8 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -3336,10 +3199,8 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
String[] ls_dis_ind_type = ls_dis_ind_type_list.split(","); String[] ls_dis_ind_type = ls_dis_ind_type_list.split(",");
for(int i = 0; i < ls_dis_ind_type.length; i++) for(int i = 0; i < ls_dis_ind_type.length; i++)
{ {
System.out.println("ls_dis_ind_type after split ==================>>["+ls_dis_ind_type[i]+"]");
if(ls_ind_type.equalsIgnoreCase(ls_dis_ind_type[i])) if(ls_ind_type.equalsIgnoreCase(ls_dis_ind_type[i]))
{ {
System.out.println("ls_ind_type found equal to ls_dis_ind_type for ==================>>["+ls_dis_ind_type[i]+"]");
lb_ind_type_flag = true; lb_ind_type_flag = true;
} }
} }
...@@ -3826,9 +3687,9 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -3826,9 +3687,9 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
case 2: case 2:
{ {
System.out.println("hdrDataDom in itemchanged case 2------->>["+genericUtility.serializeDom(hdrDataDom)+"]"); /* System.out.println("hdrDataDom in itemchanged case 2------->>["+genericUtility.serializeDom(hdrDataDom)+"]");
System.out.println("currFormDataDom in itemchanged case2 ------>>["+genericUtility.serializeDom(currFormDataDom)+"]"); System.out.println("currFormDataDom in itemchanged case2 ------>>["+genericUtility.serializeDom(currFormDataDom)+"]");
System.out.println("allFormDataDom in itemchanged case2 ------>>["+genericUtility.serializeDom(allFormDataDom)+"]"); System.out.println("allFormDataDom in itemchanged case2 ------>>["+genericUtility.serializeDom(allFormDataDom)+"]");*/
valueXmlString.append( "<Detail2>\r\n" ); valueXmlString.append( "<Detail2>\r\n" );
...@@ -4061,13 +3922,8 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -4061,13 +3922,8 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
System.out.println("cctr==============>>"+cctr); System.out.println("cctr==============>>"+cctr);
if(cctr.length() > 0) if(cctr.length() > 0)
{ {
String [] acctTemp = cctr.split(","); acct = cctr.split(",");
for(String str: acctTemp)
{
acct = str;
}
} }
System.out.println("acct after ==============>>"+acct);
} }
...@@ -4119,28 +3975,18 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -4119,28 +3975,18 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
} }
else else
{ {
// Sneha, lc_tempqty is not used anywhere else. // lc_tempqty is not used anywhere else.
//lc_tempqty = gf_conv_qty_fact(ls_unitpur,itemunit, mval, 999, lc_conv) //lc_tempqty = gf_conv_qty_fact(ls_unitpur,itemunit, mval, 999, lc_conv)
lc_tempqty = discommon.convQtyFactor(ls_unitpur, itemunit, mval, 999, lc_conv, conn); lc_tempqty = discommon.convQtyFactor(ls_unitpur, itemunit, mval, 999, lc_conv, conn);
} }
/* System.out.println("lc_conv --------------->>["+lc_conv+"]");
System.out.println("pckcode --------------->>["+pckcode+"]");
System.out.println("pckinstr --------------->>["+pckinstr+"]");
System.out.println("aprcode --------------->>["+aprcode+"]");
System.out.println("acct --------------->>["+acct+"]");
System.out.println("cctr --------------->>["+cctr+"]");
System.out.println("ls_emp_iapr --------------->>["+ls_emp_iapr+"]");
System.out.println("ls_emp_pur --------------->>["+ls_emp_pur+"]");
System.out.println("ld_pur_lead --------------->>["+ld_pur_lead+"]");
System.out.println("ls_supp_pref --------------->>["+ls_supp_pref+"]");*/
valueXmlString.append( "<conv__qty_stduom><![CDATA[" ).append(lc_conv).append( "]]></conv__qty_stduom>\r\n" ); // UOM Con : valueXmlString.append( "<conv__qty_stduom><![CDATA[" ).append(lc_conv).append( "]]></conv__qty_stduom>\r\n" ); // UOM Con :
valueXmlString.append( "<pack_code><![CDATA[" ).append(pckcode).append( "]]></pack_code>\r\n" ); valueXmlString.append( "<pack_code><![CDATA[" ).append(pckcode).append( "]]></pack_code>\r\n" );
valueXmlString.append( "<packing_descr><![CDATA[" ).append(pckinstr).append( "]]></packing_descr>\r\n" ); valueXmlString.append( "<packing_descr><![CDATA[" ).append(pckinstr).append( "]]></packing_descr>\r\n" );
valueXmlString.append( "<apr_code><![CDATA[" ).append(aprcode).append( "]]></apr_code>\r\n" ); // Appr Code : valueXmlString.append( "<apr_code><![CDATA[" ).append(aprcode).append( "]]></apr_code>\r\n" ); // Appr Code :
valueXmlString.append( "<acct_code><![CDATA[" ).append(acct).append( "]]></acct_code>\r\n" ); // Account : valueXmlString.append( "<acct_code><![CDATA[" ).append(acct[0]).append( "]]></acct_code>\r\n" ); // Account :
valueXmlString.append( "<cctr_code><![CDATA[" ).append(cctr).append( "]]></cctr_code>\r\n" ); // Cost Centre : valueXmlString.append( "<cctr_code><![CDATA[" ).append(acct[1]).append( "]]></cctr_code>\r\n" ); // Cost Centre :
valueXmlString.append( "<emp_code__iapr><![CDATA[" ).append(ls_emp_iapr).append( "]]></emp_code__iapr>\r\n" ); // Indent Appr valueXmlString.append( "<emp_code__iapr><![CDATA[" ).append(ls_emp_iapr).append( "]]></emp_code__iapr>\r\n" ); // Indent Appr
valueXmlString.append( "<emp_code__pur><![CDATA[" ).append(ls_emp_pur).append( "]]></emp_code__pur>\r\n" ); // Purchaser : valueXmlString.append( "<emp_code__pur><![CDATA[" ).append(ls_emp_pur).append( "]]></emp_code__pur>\r\n" ); // Purchaser :
valueXmlString.append( "<pur_lead_time><![CDATA[" ).append(ld_pur_lead).append( "]]></pur_lead_time>\r\n" ); // Lead Time: valueXmlString.append( "<pur_lead_time><![CDATA[" ).append(ld_pur_lead).append( "]]></pur_lead_time>\r\n" ); // Lead Time:
...@@ -4334,8 +4180,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -4334,8 +4180,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
while(rs.next()) while(rs.next())
{ {
ls_smnfr_code = checkNullAndTrim(rs.getString("SUPP_CODE__MNFR")); ls_smnfr_code = checkNullAndTrim(rs.getString("SUPP_CODE__MNFR"));
System.out.println("ls_smnfr_code--------------->>"+ls_smnfr_code);
System.out.println("li_ctr--------------->>"+li_ctr);
if(ls_smnfr_code.length() > 0) if(ls_smnfr_code.length() > 0)
{ {
if(li_ctr == 1) if(li_ctr == 1)
...@@ -4375,15 +4219,15 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -4375,15 +4219,15 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "R-IND"); pstmt.setString(1, "R-IND");
pstmt.setString(2, msite); pstmt.setString(2, msite);
pstmt.setString(3, acct); pstmt.setString(3, acct[0]);
pstmt.setString(4, cctr); pstmt.setString(4, acct[1]);
pstmt.setString(5, ls_anal); pstmt.setString(5, ls_anal);
pstmt.setString(6, ls_dept); pstmt.setString(6, ls_dept);
pstmt.setString(7, "A"); pstmt.setString(7, "A");
pstmt.setString(8, "R-IND"); pstmt.setString(8, "R-IND");
pstmt.setString(9, msite); pstmt.setString(9, msite);
pstmt.setString(10, acct); pstmt.setString(10, acct[0]);
pstmt.setString(11, cctr); pstmt.setString(11, acct[1]);
pstmt.setString(12, ls_anal); pstmt.setString(12, ls_anal);
pstmt.setString(13, ls_dept); pstmt.setString(13, ls_dept);
pstmt.setString(14, "A"); pstmt.setString(14, "A");
...@@ -4392,9 +4236,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -4392,9 +4236,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
{ {
ls_budget_amt_anal = checkNullAndTrim(rs.getString(1)); ls_budget_amt_anal = checkNullAndTrim(rs.getString(1));
ls_consumed_amt_anal = checkNullAndTrim(rs.getString(2)); ls_consumed_amt_anal = checkNullAndTrim(rs.getString(2));
System.out.println("--ls_budget_amt_anal --------------------->>"+ls_budget_amt_anal);
System.out.println("-----ls_consumed_amt_anal---------------->>"+ls_consumed_amt_anal);
} }
if(pstmt != null) if(pstmt != null)
{ {
...@@ -4411,10 +4252,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC ...@@ -4411,10 +4252,6 @@ public class IndentReqIC extends ValidatorEJB implements IndentICLocal, IndentIC
ls_consumed_amt_anal = (ls_consumed_amt_anal.length() == 0) ? "0" : ls_consumed_amt_anal; ls_consumed_amt_anal = (ls_consumed_amt_anal.length() == 0) ? "0" : ls_consumed_amt_anal;
lc_budget_amt = Double.parseDouble(ls_budget_amt_anal) - Double.parseDouble(ls_consumed_amt_anal); lc_budget_amt = Double.parseDouble(ls_budget_amt_anal) - Double.parseDouble(ls_consumed_amt_anal);
System.out.println("--ls_budget_amt_anal after --------------------->>"+ls_budget_amt_anal);
System.out.println("-----ls_consumed_amt_anal after ---------------->>"+ls_consumed_amt_anal);
System.out.println("-----lc_budget_amt after ---------------->>"+lc_budget_amt);
valueXmlString.append( "<budget_amt_anal><![CDATA[" ).append(ls_budget_amt_anal).append( "]]></budget_amt_anal>\r\n" ); valueXmlString.append( "<budget_amt_anal><![CDATA[" ).append(ls_budget_amt_anal).append( "]]></budget_amt_anal>\r\n" );
valueXmlString.append( "<consumed_amt_anal><![CDATA[" ).append(ls_consumed_amt_anal).append( "]]></consumed_amt_anal>\r\n" ); valueXmlString.append( "<consumed_amt_anal><![CDATA[" ).append(ls_consumed_amt_anal).append( "]]></consumed_amt_anal>\r\n" );
valueXmlString.append( "<budget_amt><![CDATA[" ).append(lc_budget_amt).append( "]]></budget_amt>\r\n" ); valueXmlString.append( "<budget_amt><![CDATA[" ).append(lc_budget_amt).append( "]]></budget_amt>\r\n" );
......
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