Commit 269dd122 authored by SABURI PATEKAR's avatar SABURI PATEKAR

Fix POPHELP issue where mapped transporter was not listed correctly in Sales Order.

Allow any transporter code when DIST_ROUTE details are not defined.
parent d44a7989
package ibase.webitm.ejb.dis; package ibase.webitm.ejb.dis;
import java.rmi.RemoteException; import java.rmi.RemoteException;
...@@ -425,6 +424,41 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -425,6 +424,41 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
//Commented by sarita as tran_code is not mandatory in despatch transporter[end] //Commented by sarita as tran_code is not mandatory in despatch transporter[end]
//changed by nasruddin 9-1-17 end //changed by nasruddin 9-1-17 end
//--6-Jul-2026
// Added by Saburi on 16-Jun-2026 for Transporter validation based on Distribution Route and Transaction Code
/*{String distRoute = checkNull(genericUtility.getColumnValue("dist_route", dom));
tranCode = checkNull(genericUtility.getColumnValue("tran_code", dom));
BaseLogger.log("3", getUserInfo(), null,"@@@ distRoute :: " + distRoute + " tranCode :: " + tranCode);
if (distRoute != null && distRoute.trim().length() > 0 && tranCode != null && tranCode.trim().length() > 0)
{
sql = "SELECT COUNT(*) CNT FROM DISTROUTEDET WHERE DIST_ROUTE = ? AND TRAN_CODE = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, distRoute);
pstmt.setString(2, tranCode);
rs = pstmt.executeQuery();
int cnt1 = 0;
if (rs.next())
{
cnt1 = rs.getInt("CNT");
}
BaseLogger.log("3", getUserInfo(), null,"@@@ Transporter Validation Count :: " + cnt1);
if (cnt1 == 0)
{
errCode = "VTDISTRT01"; // Invalid Transporter
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}*/
} }
else if (childNodeName.equalsIgnoreCase("stan_code")) else if (childNodeName.equalsIgnoreCase("stan_code"))
{ {
...@@ -2483,7 +2517,6 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -2483,7 +2517,6 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
}//end if //Ignore stock check for no stockable items }//end if //Ignore stock check for no stockable items
} }
else if (childNodeName.equalsIgnoreCase("lot_sl")) else if (childNodeName.equalsIgnoreCase("lot_sl"))
{ {
msaleord = checkNull(genericUtility.getColumnValue("sord_no", dom)); msaleord = checkNull(genericUtility.getColumnValue("sord_no", dom));
...@@ -4792,6 +4825,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -4792,6 +4825,7 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
lineNoSord = checkNull(genericUtility.getColumnValue("line_no__sord", dom)); lineNoSord = checkNull(genericUtility.getColumnValue("line_no__sord", dom));
expLevDom = checkNull(genericUtility.getColumnValue("exp_lev", dom)); expLevDom = checkNull(genericUtility.getColumnValue("exp_lev", dom));
BaseLogger.log("3", getUserInfo(), null, "@@@ expLevDom:-["+expLevDom+"]");
lineNoSord = " " + lineNoSord; lineNoSord = " " + lineNoSord;
lineNoSord = lineNoSord.substring(lineNoSord.length()-3, lineNoSord.length()); lineNoSord = lineNoSord.substring(lineNoSord.length()-3, lineNoSord.length());
...@@ -5085,7 +5119,13 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -5085,7 +5119,13 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
//Condition added By Ganpat Yeram[25/AR/2025] //Condition added By Ganpat Yeram[25/AR/2025]
if(expLevDom==null || expLevDom.trim().length()==0) if(expLevDom==null || expLevDom.trim().length()==0)
{ {
BaseLogger.log("3", getUserInfo(), null, "exp LEVEL :: line_no__sord if exp lev null "+expLev);
valueXmlString.append("<exp_lev>").append("<![CDATA["+expLev+"]]>").append("</exp_lev>"); valueXmlString.append("<exp_lev>").append("<![CDATA["+expLev+"]]>").append("</exp_lev>");
setNodeValue(dom, "exp_lev", getAbsString(expLev));
}else{// added by Kaustubh on 14/may/26
BaseLogger.log("3", getUserInfo(), null, "exp LEVEL :: line_no__sord else "+expLevDom);
valueXmlString.append("<exp_lev>").append("<![CDATA["+expLevDom+"]]>").append("</exp_lev>");
setNodeValue(dom, "exp_lev", getAbsString(expLevDom));
} }
//commented by kunal as instructed by manoharan sir //commented by kunal as instructed by manoharan sir
//valueXmlString.append("<quantity>").append("<![CDATA["+quantity+"]]>").append("</quantity>"); //valueXmlString.append("<quantity>").append("<![CDATA["+quantity+"]]>").append("</quantity>");
...@@ -5095,7 +5135,6 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -5095,7 +5135,6 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
setNodeValue(dom, "item_code__ord", getAbsString(itemCodeOrd)); setNodeValue(dom, "item_code__ord", getAbsString(itemCodeOrd));
setNodeValue(dom, "quantity__ord", orderQty); setNodeValue(dom, "quantity__ord", orderQty);
setNodeValue(dom, "site_code", getAbsString(siteCodeDet)); setNodeValue(dom, "site_code", getAbsString(siteCodeDet));
setNodeValue(dom, "exp_lev", getAbsString(expLev));
//commented by kunal as instructed by manoharan sir //commented by kunal as instructed by manoharan sir
//setNodeValue(dom, "quantity", quantity); //setNodeValue(dom, "quantity", quantity);
//setNodeValue(dom, "quantity_real", quantity); //setNodeValue(dom, "quantity_real", quantity);
...@@ -8463,9 +8502,4 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch ...@@ -8463,9 +8502,4 @@ public class DispatchIC extends ValidatorEJB implements DispatchICLocal,Dispatch
} }
//added by tejahri on 3-jun -25[end] //added by tejahri on 3-jun -25[end]
} }
\ No newline at end of file
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