Commit d8a8fb6e authored by prane's avatar prane

1) validaiton for mismatch of po line and line_no__ord with item

2) bug fixed to set po line on item code itemchange

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@212517 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 32a4256d
......@@ -1072,6 +1072,45 @@ PoReturnICRemote {
}
//Added by Pavan Rane 21NOV19 start[validaiton for mismatch of po line and line_no__ord with item]
tranIdRef = checkNull(genericUtility.getColumnValue("tran_id__ref", dom1));
lineNoOrd = checkNull(genericUtility.getColumnValue("line_no__ord", dom));
if (lineNoOrd != null && lineNoOrd.trim().length() > 0) {
lineNoOrd = " " + lineNoOrd;
lineNoOrd = lineNoOrd.substring(lineNoOrd.length() - 3, lineNoOrd.length());
}
lineNoRcp = checkNull(genericUtility.getColumnValue("line_no__rcp", dom));
if (lineNoRcp != null && lineNoRcp.trim().length() > 0) {
lineNoRcp = " " + lineNoRcp.trim();
lineNoRcp = lineNoRcp.substring(lineNoRcp.length() - 3, lineNoRcp.length());
}
System.out.println("@@tranIdRef@@[" + tranIdRef + "]lineNoOrd["+lineNoOrd+"]lineNoOrd["+lineNoOrd+"]");
if (tranIdRef != null && tranIdRef.trim().length() > 0)
{
cnt = 0;
sql = "select count(1) from porcpdet where tran_id = ? and line_no = ? and line_no__ord = ? "
+ "and item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranIdRef);
pstmt.setString(2, lineNoRcp);
pstmt.setString(3, lineNoOrd);
pstmt.setString(4, itemCode);
rs = pstmt.executeQuery();
if (rs.next()) {
cnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(cnt == 0)
{
errCode = "VTINVLINE";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
//Added by Pavan Rane 21NOV19 End[validaiton for mismatch of po line and line_no__ord with item]
}
}//end item code case childNodeName.equalsIgnoreCase("line_no__ord")
......@@ -6470,16 +6509,12 @@ valueXmlString.append("<tax_env protect =\"0\">").append("<![CDATA[" + taxEnv +
"purc_order", dom));
mPordLine = checkNull(genericUtility.getColumnValue(
"line_no__ord", dom));
ls_supp_code = checkNull(genericUtility.getColumnValue(
"supp_code", dom));
ls_site_code = checkNull(genericUtility.getColumnValue(
"site_code", dom));
ls_item_ser = checkNull(genericUtility.getColumnValue(
"item_ser", dom));
ls_tranidref = checkNull(genericUtility.getColumnValue(
"tran_id__ref", dom));
//Modified by Pavan Rane 21NOV19 start[values taken from dom1 instead of dom]
ls_supp_code = checkNull(genericUtility.getColumnValue("supp_code", dom1));
ls_site_code = checkNull(genericUtility.getColumnValue("site_code", dom1));
ls_item_ser = checkNull(genericUtility.getColumnValue("item_ser", dom1));
ls_tranidref = checkNull(genericUtility.getColumnValue("tran_id__ref", dom1));
//Modified by Pavan Rane 21NOV19 end[values taken from dom1 instead of dom]
if ((mPordLine == null || mPordLine.trim().length() == 0)
&& (ls_tranidref.trim().length() == 0 || ls_tranidref == null)) {
sql = "select d.purc_order, d.line_no "
......@@ -6517,12 +6552,15 @@ valueXmlString.append("<tax_env protect =\"0\">").append("<![CDATA[" + taxEnv +
&& (ls_tranidref.trim().length() > 0 && ls_tranidref != null)) {
sql = " select d.purc_order, d.line_no " +
" from porder h, porddet d ,PORCP P "
" from porder h, porddet d ,PORCP P, PORCPDET c "
+ " where H.purc_order = P.purc_order "
+ " AND h.supp_code = ? "
+ " and h.site_code__dlv = ? "
+ " and h.item_ser = ? "
+ " and d.purc_order = h.purc_order "
//Modified by Pavan Rane 21NOV19 start[join added as per suggested by sm sir]
+ " and P.tran_id = c.tran_id and c.line_no__ord = d.line_no "
//Modified by Pavan Rane 21NOV19 end[join added as per suggested by sm sir]
+ " and d.item_code = ? "
+ " AND P.TRAN_ID = ? ";
pstmt = conn.prepareStatement(sql);
......
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