Commit 3ed6d4c0 authored by mmhatre's avatar mmhatre

add code for allocation from cust code end

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@210874 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 27a23180
......@@ -2,6 +2,7 @@ package ibase.webitm.ejb.dis;
import ibase.system.config.AppConnectParm;
import ibase.system.config.ConnDriver;
import ibase.utility.BaseLogger;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.utility.UserInfoBean;
......@@ -231,7 +232,7 @@ public class PostOrderActivity {
String xmlString="",chgUser="",chgTerm="",loginEmpCode="";
Timestamp sysDate=null;
String userId = "";//Added By Pavan R 27/DEC/17
String custPordPO = "", itemCodeDesp = "", isChannelPartner = "", confPasswd = "";
String custPordPO = "", itemCodeDesp = "", isChannelPartner = "", confPasswd = "", custCodeEnd = "", freeProductLoc="";
try
{
//Modified by Anjali R. on [23/11/2018][Start]
......@@ -270,7 +271,10 @@ public class PostOrderActivity {
jobWorkType=distCommon.getDisparams("999999", "JOBWORK_TYPE", conn);
subContType=distCommon.getDisparams("999999", "SUBCONTRACT_TYPE", conn);
acceptCriteria=distCommon.getDisparams("999999", "ACCEPT_CRITERIA", conn);
//Manish Mhatre 16oct19 start [to de-allocate free qty customer stock]
freeProductLoc = distCommon.getDisparams("999999", "FREE_PRODUCT_LOCATION", conn);
BaseLogger.log("3", null, null, "FREE_PRODUCT_LOCATION["+freeProductLoc+"]");
//Manish Mhatre 16oct19 end [to de-allocate free qty customer stock]
if("NULLFOUND".equalsIgnoreCase(acceptCriteria) || acceptCriteria==null)
{
acceptCriteria="E";
......@@ -779,7 +783,7 @@ public class PostOrderActivity {
//Pavan Rane 11jun19 end
xmlBuff.append("</Detail1>");
String itemCode="",sordNoDet="",soLineNoDet="",taxClass="",taxChap="",taxEnv="", taxChapDesp="";
String itemCode="",sordNoDet="",soLineNoDet="",taxClass="",taxChap="",taxEnv="", taxChapDesp="",explev="";
String unit="",unitStd="",locCode="",lotNo="",lotSl="",siteMfg="",dimension="",packInstr="";
Timestamp mfgDate=null,expDate=null,retestDate=null;
double quantity=0,qtyStdUom=0,convQtyStdUom=0,rateStdUom=0,rateClg=0,noArt=0,grossWt=0,tareWt=0,netWt=0,palletWt=0;
......@@ -802,7 +806,7 @@ public class PostOrderActivity {
+ "despdt.loc_code,despdt.lot_no,despdt.lot_sl,despdt.mfg_date,despdt.exp_date,despdt.rate__stduom,"
+ "despdt.rate__clg,despdt.no_art,despdt.site_code__mfg," +
"despdt.GROSS_WEIGHT,despdt.TARE_WEIGHT,despdt.NETT_WEIGHT,"
+ "despdt.retest_date,despdt.dimension,despdt.pallet_wt,despdt.pack_instr, despdt.tax_chap " +
+ "despdt.retest_date,despdt.dimension,despdt.pallet_wt,despdt.pack_instr, despdt.tax_chap,despdt.exp_lev, sdet.cust_code__end " +
" from despatchdet despdt,SORDDET sdet where despdt.sord_no =sdet.sale_order and " +
" despdt.line_no__sord = sdet.line_no and despdt.desp_id=? ";
//Added and Commented by sarita to remove tax_class , tax_chap,tax_env data getting from SORDDET table on 26 DEC 2018 [END]
......@@ -842,10 +846,13 @@ public class PostOrderActivity {
dimension=rs.getString("dimension");
palletWt=rs.getDouble("pallet_wt");
packInstr=rs.getString("pack_instr");
taxChapDesp=rs.getString("tax_chap"); //Pavan Rane 26jul19 [tax chap to be set based on deps or pord in CP Auto-GRN]
taxChapDesp=checkNull(rs.getString("tax_chap")); //Pavan Rane 26jul19 [tax chap to be set based on deps or pord in CP Auto-GRN]
System.out.println("@@Commented by mayur on 28-02-18@@");
System.out.println("siteMfg["+siteMfg+"]");
//Addded by Manish Mhatre 16oct19 start [to de-allocate free qty customer stock]
explev=rs.getString("exp_lev");
custCodeEnd=checkNull(rs.getString("cust_code__end"));
//Addded by Manish Mhatre 16oct19 end [to de-allocate free qty customer stock]
//Commented by sarita on 26 DEC 2018 [START]
/*System.out.println("taxClass["+taxClass+"]");*/
System.out.println("taxChapDesp["+taxChapDesp+"]");
......@@ -1264,7 +1271,42 @@ public class PostOrderActivity {
// changes by arun pal 30/05/17 start
prevQty=0.0;
// changes by arun pal 30/05/17 end
}
//Manish Mhatre 16oct19 start [to de-allocate free qty customer stock]
if(custCodeEnd != null && custCodeEnd.trim().length() > 0)
{
sql = "select b.nature from sorder a, sorditem b"
+ " where a.sale_order = b.sale_order"
+ " and b.sale_order = ? "
+ " and b.line_no = ? "
+ " and b.item_code = ? "
+ " and b.exp_lev = ? ";
//+ " and a.cust_code__end is not null";
pstmt1=conn.prepareStatement(sql);
pstmt1.setString(1,sordNo );
pstmt1.setString(2, soLineNoDet);
pstmt1.setString(3, itemCode);
pstmt1.setString(4, explev);
rs1=pstmt1.executeQuery();
if(rs1.next())
{
String nature= rs1.getString("nature");
if("F".equalsIgnoreCase(nature) && rateStdUom == 0)
{
if(!"NULLFOUND".equalsIgnoreCase(freeProductLoc))
{
sitelocCode = freeProductLoc;
}
}
}
rs1.close();
rs1=null;
pstmt1.close();
pstmt1=null;
}
//Manish Mhatre 16oct19 end [to de-allocate free qty customer stock]
noArt=5;
xmlBuff.append("<Detail2 dbID='' domID='"+lineNo+"' objName=\"porcp\" objContext=\"2\">");
xmlBuff.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />");
......@@ -1369,6 +1411,9 @@ public class PostOrderActivity {
{
xmlBuff.append("<canc_bo><![CDATA[N]]></canc_bo>");
}
//added by Manish Mhatre 16oct19 start [to set cust_code__end in porcpdet]
xmlBuff.append("<cust_code__end><![CDATA[" + custCodeEnd + "]]></cust_code__end>");
//added by Manish Mhatre 16oct19 end [to set cust_code__end in porcpdet]
xmlBuff.append("</Detail2>");
}
......
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