Commit 30299092 authored by dpawar's avatar dpawar

add site_code mfg


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96337 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0ac212f5
...@@ -236,10 +236,11 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -236,10 +236,11 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
rs = null; rs = null;
pstmt = null; pstmt = null;
sql="select channel_partner from site_customer where site_code= ? and " sql="select channel_partner from site_customer where site_code= ? and "
+ "cust_code = ?"; + "cust_code = ? and available_yn = ?";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1,SiteCodeL); pstmt.setString(1,SiteCodeL);
pstmt.setString(2,CustCodeL); pstmt.setString(2,CustCodeL);
pstmt.setString(3,"N");
rs=pstmt.executeQuery(); rs=pstmt.executeQuery();
if(rs.next()){ if(rs.next()){
ChanPart=rs.getString(1); ChanPart=rs.getString(1);
...@@ -256,15 +257,17 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -256,15 +257,17 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
rs = null; rs = null;
pstmt = null; pstmt = null;
if(ChanPart.length() == 0){ if(ChanPart.length() == 0){
sql="select channel_partner from customer where cust_code = ? "; sql="select channel_partner from customer where cust_code = ? and available_yn = ? ";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1,CustCodeL); pstmt.setString(1,CustCodeL);
pstmt.setString(2,"N");
rs=pstmt.executeQuery(); rs=pstmt.executeQuery();
if(rs.next()){ if(rs.next()){
avalyn=rs.getString(1); ChanPart=rs.getString(1);
} }
avalyn=avalyn ==null ? "N" : avalyn.trim(); ChanPart=ChanPart ==null ? "N" : ChanPart.trim();
if("N".equalsIgnoreCase(avalyn)){ System.out.println("ChanPart cust----->>["+ChanPart+"]");
if("N".equalsIgnoreCase(ChanPart) || ChanPart.length() ==0 ){
errCode = "VTCUSTCD4"; errCode = "VTCUSTCD4";
errString = getErrorString("sale_order_no",errCode,userId); errString = getErrorString("sale_order_no",errCode,userId);
break; break;
...@@ -568,7 +571,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -568,7 +571,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
errCode = "VTAVAIL"; errCode = "VTAVAIL";
errString = getErrorString("loc_code",errCode,userId); errString = getErrorString("loc_code",errCode,userId);
break; break;
} }
} }
} }
...@@ -665,7 +668,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -665,7 +668,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
int count = 0; int count = 0;
double minputQty = 0d, remQuantity = 0d, stockQty = 0d, integralQty = 0d; double minputQty = 0d, remQuantity = 0d, stockQty = 0d, integralQty = 0d;
double grossPer = 0d,netPer = 0d,grossWt = 0d,tarePer = 0d,netWt = 0d,tareWt =0d, rateClgVal = 0d, rate2 = 0d; double grossPer = 0d,netPer = 0d,grossWt = 0d,tarePer = 0d,netWt = 0d,tareWt =0d, rateClgVal = 0d, rate2 = 0d;
double disAmount = 0d, shipperQty = 0d,discount =0; double disAmount = 0d, shipperQty = 0d,discount =0,holdQtyL=0;
int minShelfLife = 0, noArt1 = 0; int minShelfLife = 0, noArt1 = 0;
int mLineNoDist =0; int mLineNoDist =0;
double qtyConfirm =0,qtyShipped =0,lcQtyOrderAlt =0,lcFact =0; double qtyConfirm =0,qtyShipped =0,lcQtyOrderAlt =0,lcFact =0;
...@@ -675,7 +678,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -675,7 +678,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
String sql="",currencyCode="",exchRate1="",currCodeFrt="",currCodeIns="",currCodedlv="",stanCode="",custCode="",custCodeDlv="",siteCodeDesc=""; String sql="",currencyCode="",exchRate1="",currCodeFrt="",currCodeIns="",currCodedlv="",stanCode="",custCode="",custCodeDlv="",siteCodeDesc="";
String stanCodeDlv="",dlvCity="",dlvPin="",countCodeDlv="",stanCodeInit="",status="",statusRemarks="", String stanCodeDlv="",dlvCity="",dlvPin="",countCodeDlv="",stanCodeInit="",status="",statusRemarks="",
custCodeBil="",dlvAdd1="",dlvAdd2="",dlvAdd3="",despId="",remarksDes="",noArtDes="",sorderNo="", custCodeBil="",dlvAdd1="",dlvAdd2="",dlvAdd3="",despId="",remarksDes="",noArtDes="",sorderNo="",
siteCodeShip="",availableYn="",addUser="",chgUserL="",chgTermL=""; siteCodeShip="",availableYn="",addUser="",chgUserL="",chgTermL="",lotslL="",lotStatus="HOLD";
ArrayList<String> addUsersList=new ArrayList<String>(); ArrayList<String> addUsersList=new ArrayList<String>();
Date orderDt = null,statusDate=null,mfgDate=null,expiryDate=null,sOrdDate=null; Date orderDt = null,statusDate=null,mfgDate=null,expiryDate=null,sOrdDate=null;
try try
...@@ -1031,6 +1034,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1031,6 +1034,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
rs=pstmt.executeQuery(); rs=pstmt.executeQuery();
while(rs.next()){ while(rs.next()){
siteCode=checkNull(rs.getString("site_code"));
lotslL=checkNull(rs.getString("lot_sl"));
valueXmlString.append("<Detail3 domID='" +rs.getInt("line_no")+ "' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n"); valueXmlString.append("<Detail3 domID='" +rs.getInt("line_no")+ "' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n");
valueXmlString.append("<attribute selected=\"Y\" updateFlag=\"E\" status=\"O\" pkNames=\"\"/>\r\n"); valueXmlString.append("<attribute selected=\"Y\" updateFlag=\"E\" status=\"O\" pkNames=\"\"/>\r\n");
...@@ -1067,7 +1072,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1067,7 +1072,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
valueXmlString.append("<tax_env><![CDATA["+ checkNull(rs.getString("tax_env"))+"]]></tax_env>"); valueXmlString.append("<tax_env><![CDATA["+ checkNull(rs.getString("tax_env"))+"]]></tax_env>");
valueXmlString.append("<rate__clg><![CDATA["+ (rs.getDouble("rate__clg")) +"]]></rate__clg>"); valueXmlString.append("<rate__clg><![CDATA["+ (rs.getDouble("rate__clg")) +"]]></rate__clg>");
//valueXmlString.append("<tot_net_amt><![CDATA["+ netTotAmt.trim()+"]]></tot_net_amt>"); //valueXmlString.append("<tot_net_amt><![CDATA["+ netTotAmt.trim()+"]]></tot_net_amt>");
valueXmlString.append("<site_code><![CDATA["+ checkNull(rs.getString("site_code"))+"]]></site_code>"); valueXmlString.append("<site_code><![CDATA["+ checkNull(rs.getString("site_code"))+"]]></site_code>");
valueXmlString.append("<site_code__mfg><![CDATA["+ checkNull(rs.getString("site_code__mfg")) +"]]></site_code__mfg>");
valueXmlString.append("<quantity__stduom><![CDATA["+ (rs.getDouble("quantity__stduom"))+"]]></quantity__stduom>"); valueXmlString.append("<quantity__stduom><![CDATA["+ (rs.getDouble("quantity__stduom"))+"]]></quantity__stduom>");
//valueXmlString.append("<pack_code><![CDATA["+ checkNull(rs.getString("pack_code"))+"]]></pack_code>"); //valueXmlString.append("<pack_code><![CDATA["+ checkNull(rs.getString("pack_code"))+"]]></pack_code>");
valueXmlString.append("<unit__std><![CDATA["+ checkNull(rs.getString("unit__std"))+"]]></unit__std>"); valueXmlString.append("<unit__std><![CDATA["+ checkNull(rs.getString("unit__std"))+"]]></unit__std>");
...@@ -1079,9 +1085,6 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1079,9 +1085,6 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
//valueXmlString.append("<quantity_inv><![CDATA["+ quantity +"]]></quantity_inv>"); //valueXmlString.append("<quantity_inv><![CDATA["+ quantity +"]]></quantity_inv>");
valueXmlString.append("<quantity_real><![CDATA["+ (rs.getDouble("quantity_real")) +"]]></quantity_real>"); valueXmlString.append("<quantity_real><![CDATA["+ (rs.getDouble("quantity_real")) +"]]></quantity_real>");
//mfg_date,exp_date,pending_qty,quantity__ord,quantity_real
mfgDate=rs.getDate("mfg_date"); mfgDate=rs.getDate("mfg_date");
expiryDate=rs.getDate("exp_date"); expiryDate=rs.getDate("exp_date");
if(mfgDate!=null){ if(mfgDate!=null){
...@@ -1099,6 +1102,28 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1099,6 +1102,28 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
valueXmlString.append("<dimension><![CDATA["+ checkNull(rs.getString("dimension")) +"]]></dimension>"); valueXmlString.append("<dimension><![CDATA["+ checkNull(rs.getString("dimension")) +"]]></dimension>");
valueXmlString.append("<pallet_wt><![CDATA["+ (rs.getDouble("pallet_wt")) +"]]></pallet_wt>"); valueXmlString.append("<pallet_wt><![CDATA["+ (rs.getDouble("pallet_wt")) +"]]></pallet_wt>");
//for hold status Start
sql = "select hold_qty from stock where site_code = ? and lot_sl = ? and quantity > 0";
pstmt1=conn.prepareStatement(sql);
pstmt1.setString(1,siteCode);
pstmt1.setString(2,lotslL);
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
holdQtyL=rs1.getDouble(1);
}
System.out.println("Edit mode holdQtyL---->>["+holdQtyL+"]");
if(holdQtyL > 0){
valueXmlString.append("<lot_status><![CDATA["+ lotStatus +"]]></lot_status>");
}else{
valueXmlString.append("<lot_status><![CDATA[]]></lot_status>");
}
//for hold status End
valueXmlString.append("</Detail3>"); valueXmlString.append("</Detail3>");
}//end while }//end while
if(rs!=null){ if(rs!=null){
...@@ -1211,6 +1236,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1211,6 +1236,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
valueXmlString.append("<rate__clg><![CDATA["+ rateClg +"]]></rate__clg>"); valueXmlString.append("<rate__clg><![CDATA["+ rateClg +"]]></rate__clg>");
valueXmlString.append("<tot_net_amt><![CDATA["+ netTotAmt.trim()+"]]></tot_net_amt>"); valueXmlString.append("<tot_net_amt><![CDATA["+ netTotAmt.trim()+"]]></tot_net_amt>");
valueXmlString.append("<site_code><![CDATA["+ siteCodeDet.trim()+"]]></site_code>"); valueXmlString.append("<site_code><![CDATA["+ siteCodeDet.trim()+"]]></site_code>");
valueXmlString.append("<quantity__stduom><![CDATA["+ quntyStduom.trim()+"]]></quantity__stduom>"); valueXmlString.append("<quantity__stduom><![CDATA["+ quntyStduom.trim()+"]]></quantity__stduom>");
valueXmlString.append("<pack_code><![CDATA["+ packCode.trim()+"]]></pack_code>"); valueXmlString.append("<pack_code><![CDATA["+ packCode.trim()+"]]></pack_code>");
valueXmlString.append("<unit__std><![CDATA["+ unitStd+"]]></unit__std>"); valueXmlString.append("<unit__std><![CDATA["+ unitStd+"]]></unit__std>");
...@@ -1221,8 +1248,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1221,8 +1248,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
valueXmlString.append("<rate__stduom><![CDATA["+ rateStduom +"]]></rate__stduom>"); valueXmlString.append("<rate__stduom><![CDATA["+ rateStduom +"]]></rate__stduom>");
valueXmlString.append("<conv__rtuom_stduom><![CDATA["+ convRtuomStduom +"]]></conv__rtuom_stduom>"); valueXmlString.append("<conv__rtuom_stduom><![CDATA["+ convRtuomStduom +"]]></conv__rtuom_stduom>");
valueXmlString.append("<tot_net_amt><![CDATA["+ netAmt +"]]></tot_net_amt>"); valueXmlString.append("<tot_net_amt><![CDATA["+ netAmt +"]]></tot_net_amt>");
valueXmlString.append("<quantity__inv><![CDATA["+ quantity +"]]></quantity__inv>");
valueXmlString.append("<quantity__real><![CDATA["+ quantity +"]]></quantity__real>");
/*valueXmlString.append("<gross_weight>").append("<![CDATA[").append(grossWeight1).append("]]>").append("</gross_weight>"); /*valueXmlString.append("<gross_weight>").append("<![CDATA[").append(grossWeight1).append("]]>").append("</gross_weight>");
valueXmlString.append("<nett_weight>").append("<![CDATA[").append(netWeight1).append("]]>").append("</nett_weight>"); valueXmlString.append("<nett_weight>").append("<![CDATA[").append(netWeight1).append("]]>").append("</nett_weight>");
...@@ -1267,7 +1293,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1267,7 +1293,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
else if(currentColumn.trim().equalsIgnoreCase("lot_sl")) else if(currentColumn.trim().equalsIgnoreCase("lot_sl"))
{ {
String lineNoAdd="",lnNoSord="",quantity="",rate1="",conQtyStd="",itemDescr="",itemCodeOrd=""; String lineNoAdd="",lnNoSord="",quantity="",rate1="",conQtyStd="",itemDescr="",itemCodeOrd="";
String unitRate="",taxClass="",taxChap="",taxEnv="",netTotAmt="",quntyStduom="",avalyn="", String unitRate="",taxClass="",taxChap="",taxEnv="",netTotAmt="",quntyStduom="",avalyn="",siteCodeMfg="",
siteCodeDet="",unitStd="", noArt="", convRtuomStduom="",netAmt="",rateStduom=""; siteCodeDet="",unitStd="", noArt="", convRtuomStduom="",netAmt="",rateStduom="";
String expLev="1."; String expLev="1.";
System.out.println("Form 3 itm_default_add called................."); System.out.println("Form 3 itm_default_add called.................");
...@@ -1311,22 +1337,27 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1311,22 +1337,27 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
noArt = checkNull(rs.getString("no_art")); noArt = checkNull(rs.getString("no_art"));
rateStduom = rs.getString("rate__stduom"); rateStduom = rs.getString("rate__stduom");
convRtuomStduom = rs.getString("conv__rtuom_stduom"); convRtuomStduom = rs.getString("conv__rtuom_stduom");
netAmt = rs.getString("net_amt"); netAmt = rs.getString("net_amt");
} }
pstmt.close(); pstmt.close();
rs.close(); rs.close();
pstmt = null; pstmt = null;
rs = null; rs = null;
itemDescr=checkNull(getColumnDescr(conn, "descr", "item", "item_code", itemCode));
System.out.println("lnNoSord lotSl item change-------->>["+lnNoSord+"]"); System.out.println("lnNoSord lotSl item change-------->>["+lnNoSord+"]");
if(lotSlL.length() == 0){
valueXmlString.append("<Detail3 domID='" +lineNo1+ "' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n"); valueXmlString.append("<Detail3 domID='" +lineNo1+ "' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n");
valueXmlString.append("<attribute selected=\"Y\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>\r\n"); valueXmlString.append("<attribute selected=\"Y\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>\r\n");
}else{
valueXmlString.append("<Detail3 domID='" +lineNo1+ "' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n");
valueXmlString.append("<attribute selected=\"Y\" updateFlag=\"E\" status=\"N\" pkNames=\"\"/>\r\n");
}
valueXmlString.append("<desp_id><![CDATA["+ despId +"]]></desp_id>");//expLev valueXmlString.append("<desp_id><![CDATA["+ despId +"]]></desp_id>");
valueXmlString.append("<lot_no><![CDATA[]]></lot_no>"); valueXmlString.append("<lot_no><![CDATA[]]></lot_no>");
...@@ -1347,7 +1378,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1347,7 +1378,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
valueXmlString.append("<tax_env><![CDATA["+ taxEnv+"]]></tax_env>"); valueXmlString.append("<tax_env><![CDATA["+ taxEnv+"]]></tax_env>");
valueXmlString.append("<rate__clg><![CDATA["+ rateClg +"]]></rate__clg>"); valueXmlString.append("<rate__clg><![CDATA["+ rateClg +"]]></rate__clg>");
valueXmlString.append("<tot_net_amt><![CDATA["+ netTotAmt.trim()+"]]></tot_net_amt>"); valueXmlString.append("<tot_net_amt><![CDATA["+ netTotAmt.trim()+"]]></tot_net_amt>");
valueXmlString.append("<site_code><![CDATA["+ siteCodeDet.trim()+"]]></site_code>"); valueXmlString.append("<site_code><![CDATA["+ siteCodeDet.trim()+"]]></site_code>");
valueXmlString.append("<quantity__stduom><![CDATA["+ quntyStduom.trim()+"]]></quantity__stduom>"); valueXmlString.append("<quantity__stduom><![CDATA["+ quntyStduom.trim()+"]]></quantity__stduom>");
valueXmlString.append("<pack_code><![CDATA["+ packCode.trim()+"]]></pack_code>"); valueXmlString.append("<pack_code><![CDATA["+ packCode.trim()+"]]></pack_code>");
valueXmlString.append("<unit__std><![CDATA["+ unitStd+"]]></unit__std>"); valueXmlString.append("<unit__std><![CDATA["+ unitStd+"]]></unit__std>");
...@@ -1366,7 +1398,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1366,7 +1398,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
sql = "select loc_code,lot_no,item_code,quantity,gross_weight,net_weight,tare_weight,no_art," sql = "select loc_code,lot_no,item_code,quantity,gross_weight,net_weight,tare_weight,no_art,"
+ "hold_qty,alloc_qty from stock where site_code = ? and lot_sl = ? and quantity > 0"; + "hold_qty,alloc_qty,site_code__mfg,mfg_date,exp_date from stock where site_code = ? and lot_sl = ? and quantity > 0";
pstmt1=conn.prepareStatement(sql); pstmt1=conn.prepareStatement(sql);
pstmt1.setString(1,siteCodeL); pstmt1.setString(1,siteCodeL);
pstmt1.setString(2,lotSlL); pstmt1.setString(2,lotSlL);
...@@ -1374,9 +1406,9 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1374,9 +1406,9 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
if(rs1.next()) if(rs1.next())
{ {
locCode = rs1.getString("loc_code")==null?"":rs1.getString("loc_code").trim(); locCode = checkNull(rs1.getString("loc_code"));
lotNo = rs1.getString("lot_no")==null?"":rs1.getString("lot_no").trim(); lotNo = checkNull(rs1.getString("lot_no"));
itemCode = rs1.getString("item_code")==null?"":rs1.getString("item_code").trim(); itemCode = checkNull(rs1.getString("item_code"));
squantity = rs1.getDouble("quantity"); squantity = rs1.getDouble("quantity");
grossWeight = rs1.getDouble("gross_weight"); grossWeight = rs1.getDouble("gross_weight");
netWeight = rs1.getDouble("net_weight"); netWeight = rs1.getDouble("net_weight");
...@@ -1385,6 +1417,12 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1385,6 +1417,12 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
holdQty = rs1.getDouble("hold_qty"); holdQty = rs1.getDouble("hold_qty");
allocQty = rs1.getDouble("alloc_qty"); allocQty = rs1.getDouble("alloc_qty");
siteCodeMfg = rs1.getString("site_code__mfg")==null?"":rs1.getString("site_code__mfg").trim();
siteCodeMfg= checkNull(rs1.getString("site_code__mfg"));
mfgDate=rs1.getDate("mfg_date");
expiryDate=rs1.getDate("exp_date");
} }
pstmt1.close(); pstmt1.close();
rs1.close(); rs1.close();
...@@ -1398,6 +1436,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1398,6 +1436,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
//valueXmlString.append("<line_no__sord><![CDATA["+ lnNoSord +"]]></line_no__sord>"); //valueXmlString.append("<line_no__sord><![CDATA["+ lnNoSord +"]]></line_no__sord>");
//valueXmlString.append("<Detail3 domID='" +domID1+ "' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n"); //valueXmlString.append("<Detail3 domID='" +domID1+ "' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n");
valueXmlString.append("<site_code__mfg><![CDATA["+ siteCodeMfg +"]]></site_code__mfg>");
valueXmlString.append("<sord_no><![CDATA["+ sorderNo+"]]></sord_no>"); valueXmlString.append("<sord_no><![CDATA["+ sorderNo+"]]></sord_no>");
valueXmlString.append("<line_no><![CDATA["+ lineNo1+"]]></line_no>"); valueXmlString.append("<line_no><![CDATA["+ lineNo1+"]]></line_no>");
...@@ -1416,13 +1455,22 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1416,13 +1455,22 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
} }
valueXmlString.append("<quantity><![CDATA["+ actualQty+"]]></quantity>"); valueXmlString.append("<quantity><![CDATA["+ actualQty+"]]></quantity>");
valueXmlString.append("<quantity__inv><![CDATA["+actualQty +"]]></quantity__inv>"); valueXmlString.append("<quantity_inv><![CDATA["+actualQty +"]]></quantity_inv>");
valueXmlString.append("<quantity__real><![CDATA["+ actualQty +"]]></quantity__real>"); valueXmlString.append("<quantity_real><![CDATA["+ actualQty +"]]></quantity_real>");
valueXmlString.append("<quantity__ord><![CDATA["+ actualQty +"]]></quantity__ord>");
valueXmlString.append("<gross_weight><![CDATA["+ grossWeight+"]]></gross_weight>"); valueXmlString.append("<gross_weight><![CDATA["+ grossWeight+"]]></gross_weight>");
valueXmlString.append("<nett_weight><![CDATA["+ netWeight+"]]></nett_weight>"); valueXmlString.append("<nett_weight><![CDATA["+ netWeight+"]]></nett_weight>");
valueXmlString.append("<tare_weight><![CDATA["+ tareWeight+"]]></tare_weight>"); valueXmlString.append("<tare_weight><![CDATA["+ tareWeight+"]]></tare_weight>");
if(mfgDate!=null){
valueXmlString.append("<mfg_date>").append("<![CDATA[").append(sdf.format(mfgDate).toString()).append("]]>").append("</mfg_date>");
}
if(expiryDate !=null){
valueXmlString.append("<exp_date>").append("<![CDATA[").append(sdf.format(expiryDate).toString()).append("]]>").append("</exp_date>");
}
valueXmlString.append("<lot_sl><![CDATA["+ lotSlL +"]]></lot_sl>"); valueXmlString.append("<lot_sl><![CDATA["+ lotSlL +"]]></lot_sl>");
if(holdQty > 0){ if(holdQty > 0){
...@@ -1690,7 +1738,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1690,7 +1738,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
int count=0; int count=0;
String sql="",siteCode="",currencyCode="",exchRate1="",transMode="",currCodeFrt="",currCodeIns="",stanCode="",stanCodeDlv=""; String sql="",siteCode="",currencyCode="",exchRate1="",transMode="",currCodeFrt="",currCodeIns="",stanCode="",stanCodeDlv="";
String dlvCity="",dlvPin="",countCodeDlv="",tranCode="",stanCodeInit="",status="",statusRemarks="",custCode="",custCodeDlv=""; String dlvCity="",dlvPin="",countCodeDlv="",tranCode="",stanCodeInit="",status="",statusRemarks="",custCode="",custCodeDlv="";
String custCodeBil="",siteCodeShip="",dlvAdd1="",dlvAdd2="",dlvAdd3="",siteCodeDesc="",tranName="",currAppdate=""; String custCodeBil="",siteCodeShip="",dlvAdd1="",dlvAdd2="",dlvAdd3="",siteCodeDesc="",tranName="",currAppdate="",availableYn="";
Date orderDt=null,statusDate=null; Date orderDt=null,statusDate=null;
System.out.println("--------no data found in Despatch-------------"); System.out.println("--------no data found in Despatch-------------");
System.out.println("chgUser567-------->>["+chgUser+"]"); System.out.println("chgUser567-------->>["+chgUser+"]");
...@@ -1701,9 +1749,9 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1701,9 +1749,9 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
sql = "select item_ser,site_code,curr_code,exch_rate,tran_code, trans_mode,curr_code__frt,curr_code__ins,cust_code__dlv," + sql = "select item_ser,site_code,curr_code,exch_rate,tran_code, trans_mode,curr_code__frt,curr_code__ins,cust_code__dlv," +
"stan_code,order_date,exch_rate__frt,exch_rate__ins,fob_value,conf_date,chg_date,state_code__dlv,udf__str1,udf__str2," + "stan_code,order_date,exch_rate__frt,exch_rate__ins,fob_value,conf_date,chg_date,state_code__dlv,udf__str1,udf__str2," +
"dlv_city,dlv_pin,count_code__dlv,tran_code,stan_code,stan_code__init,parent__tran_id,rev__tran,status_remarks," "dlv_city,dlv_pin,count_code__dlv,tran_code,stan_code,stan_code__init,parent__tran_id,rev__tran,status_remarks,"
+ "spec_reason,dist_route,status,status_date,cust_code,cust_code__dlv," + "spec_reason,dist_route,status,status_date,cust_code,cust_code__dlv,available_yn,"
+ "cust_code__bil,site_code__ship,dlv_add1,dlv_add2,dlv_add3"+ + "cust_code__bil,site_code__ship,dlv_add1,dlv_add2,dlv_add3"+
" from sorder where sale_order = ? " ; " from sorder where sale_order = ? " ;//available_yn
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,sorderId); pstmt.setString(1,sorderId);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -1732,6 +1780,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1732,6 +1780,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
custCodeDlv=checkNull(rs.getString("cust_code__dlv")); custCodeDlv=checkNull(rs.getString("cust_code__dlv"));
custCodeBil=checkNull(rs.getString("cust_code__bil")); custCodeBil=checkNull(rs.getString("cust_code__bil"));
siteCodeShip=checkNull(rs.getString("site_code__ship")); siteCodeShip=checkNull(rs.getString("site_code__ship"));
availableYn=checkNull(rs.getString("available_yn"));
dlvAdd1=checkNull(rs.getString("dlv_add1")); dlvAdd1=checkNull(rs.getString("dlv_add1"));
dlvAdd2=checkNull(rs.getString("dlv_add2")); dlvAdd2=checkNull(rs.getString("dlv_add2"));
...@@ -1764,10 +1813,12 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa ...@@ -1764,10 +1813,12 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
valueXmlString.append("<curr_code__frt><![CDATA["+ currCodeFrt.trim() +"]]></curr_code__frt>"); valueXmlString.append("<curr_code__frt><![CDATA["+ currCodeFrt.trim() +"]]></curr_code__frt>");
valueXmlString.append("<curr_code__ins><![CDATA["+ currCodeIns.trim() +"]]></curr_code__ins>"); valueXmlString.append("<curr_code__ins><![CDATA["+ currCodeIns.trim() +"]]></curr_code__ins>");
valueXmlString.append("<curr_code><![CDATA["+ currencyCode.trim() +"]]></curr_code>"); valueXmlString.append("<curr_code><![CDATA["+ currencyCode.trim() +"]]></curr_code>");
valueXmlString.append("<exch_rate><![CDATA["+ exchRate1 +"]]></exch_rate>");// CAN NOT BE NULL valueXmlString.append("<exch_rate><![CDATA["+ exchRate1 +"]]></exch_rate>");
valueXmlString.append("<exch_rate__frt><![CDATA["+ exchRate1 +"]]></exch_rate__frt>"); valueXmlString.append("<exch_rate__frt><![CDATA["+ exchRate1 +"]]></exch_rate__frt>");
valueXmlString.append("<exch_rate__ins><![CDATA["+ exchRate1 +"]]></exch_rate__ins>"); valueXmlString.append("<exch_rate__ins><![CDATA["+ exchRate1 +"]]></exch_rate__ins>");
valueXmlString.append("<available_yn><![CDATA["+ availableYn +"]]></available_yn>");
valueXmlString.append("<site_code__ship><![CDATA["+ siteCodeShip +"]]></site_code__ship>"); valueXmlString.append("<site_code__ship><![CDATA["+ siteCodeShip +"]]></site_code__ship>");
siteCodeDesc=checkNull(getColumnDescr(conn, "descr", "site", "site_code", siteCodeShip)); siteCodeDesc=checkNull(getColumnDescr(conn, "descr", "site", "site_code", siteCodeShip));
......
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