Commit 41a120b0 authored by mjadhav's avatar mjadhav

lineno space added,palletWt in descimalform


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96669 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a439158a
......@@ -581,7 +581,7 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
String lineno = "",noArt = "",netAmt = "",frtTerm="",deliveryTerm="",commpercon="",commPercOn2="";
String pin = "", stateCode = "",city = "",countCode = "",unitStd = "",salesPersTmp="",crTermTmp="",salesPersTmp1="",salesPersTmp2="";
String transmodeFromCust="",custCodeBil="",pricelist="",pricelistClg="",salespers="",salespers1="",salespers2="",dlvTO="";
String add1="",add2="",add3="",tele1="",tele2="",tele3="",invoiceNo="",packInstr="",palletNo="",dlvDescr="";
String add1="",add2="",add3="",tele1="",tele2="",tele3="",invoiceNo="",packInstr="",palletNo="",dlvDescr="",lineNo="";
Date orderDt = null;
Date orderDateInput=null;
Date lrDate=null;
......@@ -1420,7 +1420,13 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
xmlBuff.append("<remarks><![CDATA["+ "generated from receipt "+tranId+"]]></remarks>");
//xmlBuff.append("<rate><![CDATA["+ exchRate1 +"]]></rate>");
xmlBuff.append("<line_no><![CDATA["+ lineno +"]]></line_no>");
lineno=lineno.trim();
lineno=" "+lineno;
System.out.println("---"+lineno+"---");
lineno = lineno.substring(lineno.length() - 3);
System.out.println("lineno @@@@ "+lineno);
xmlBuff.append("<line_no><![CDATA["+lineno+"]]></line_no>");
xmlBuff.append("<item_code__ord><![CDATA["+ itemCode.trim() +"]]></item_code__ord>");
xmlBuff.append("<item_code><![CDATA["+ itemCode.trim() +"]]></item_code>");
//xmlBuff.append("<rate><![CDATA["+rate +"]]></rate>");
......@@ -1492,6 +1498,7 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
String tranIdForIssue = arrayForTranId[1].substring(0,endIndex);
System.out.println("-tranIdForIssue-"+tranIdForIssue);
System.out.println("dlvDescr :"+dlvDescr);
sql = " update sorder set purc_order = ? ,DLV_TO = ?where sale_order = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,purcOrder);
......@@ -1502,26 +1509,45 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
conn.commit();
/*------------------------changes by mahendra 16-10-14------------------------------*/
/*------------------------changes by mahendra 22-10-14------------------------------*/
System.out.println("update query after before confirm sale order");
System.out.println("tranIdForIssue :"+tranIdForIssue);
System.out.println("packInstr :"+packInstr);
System.out.println("packCode :"+packCode);
System.out.println("palletNo :"+palletNo);
System.out.println("dlvDescr :"+dlvDescr);
sql = " update sorddet set PACK_INSTR = ?,PACK_CODE = ? where sale_order = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,packInstr);
pstmt.setString(2,packCode);
// pstmt.setString(3,palletNo);
pstmt.setString(3,tranIdForIssue);
int row = pstmt.executeUpdate();
System.out.println("updated rows@@@ =="+row);
conn.commit();
/*------------------------------------------------------------------------------------*/
sql = "select PACK_CODE,PACK_INSTR,Line_no from porcpdet where TRAN_ID = ?";
pstmt2 = conn.prepareStatement(sql);
pstmt2.setString(1,tranIdForIssue);
rs2 = pstmt2.executeQuery();
while(rs2.next())
{
packCode=rs2.getString("pack_code");
packInstr=rs2.getString("PACK_INSTR");
lineNo=rs2.getString("Line_no");
System.out.println("packCode :"+packCode +"@packInstr :"+packInstr+" @lineNo :"+lineNo);
sql = " update sorddet set PACK_INSTR = ?,PACK_CODE = ? where sale_order = ? and line_no = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,packInstr);
pstmt.setString(2,packCode);
pstmt.setString(3,tranIdForIssue);
pstmt.setString(4,lineNo);
int row = pstmt.executeUpdate();
System.out.println("updated rows@@@ =="+row);
conn.commit();
}
pstmt2.close();
pstmt2 = null;
rs2.close();
rs2 = null;
/*------------------------------------------------------------------------------------*/
// perameter added on 17/apr/2014 by RITESH
String varValue1 = dComm.getDisparams("999999","AUTO_CONF_SORD", conn);
......@@ -1612,10 +1638,10 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
String locCode = "",rateStduom="",netAmt="";
String varValue = "",unitStd = "",noArt = "",packInstr="";
String stanCodeDlv="",dlvAdd1="",dlvAdd2="",dlvAdd3="",dlvCity="",dlvPin="",countCodeDlv="",tranCode="",stanCodeInit="",status=" ",statusRemarks="",shipmentId="";
String lrDateVal="",siteCodeMfg="",pack_instr="";
String lrDateVal="",siteCodeMfg="",pack_instr="",lineNo="";
Date orderDt = null,statusDate=null,expDate=null,mfgDate=null;
PreparedStatement pstmt = null,pstmt1 =null;
ResultSet rs = null,rs1 = null;
PreparedStatement pstmt = null,pstmt1 =null,pstmt2 =null;
ResultSet rs = null,rs1 = null,rs2=null;
double rateClg=0;
int lnno = 0;
GenericUtility genericUtility = GenericUtility.getInstance();
......@@ -1831,7 +1857,8 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
grossWeightFmPorcp = rs1.getDouble("GROSS_WEIGHT");
tareWeightFmPorcp = rs1.getDouble("TARE_WEIGHT");
netWeightFmPorcp = rs1.getDouble("NET_WEIGHT");
palletWt = rs1.getInt("PALLET_WT");
//palletWt = rs1.getInt("PALLET_WT");
palletWt = rs1.getDouble("PALLET_WT");
packCode = rs1.getString("pack_code") == null ? " " : rs1.getString("pack_code");
}
......@@ -1937,7 +1964,15 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
xmlBuff.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />");
xmlBuff.append("<desp_id/>");
xmlBuff.append("<sord_no><![CDATA["+ saleOrder.trim() +"]]></sord_no>");
xmlBuff.append("<line_no><![CDATA["+ lnno +"]]></line_no>");
lineNo=String.valueOf(lnno);
lineNo=lineNo.trim();
lineNo=" "+lineNo;
System.out.println("---"+lineNo+"---");
lineNo = lineNo.substring(lineNo.length() - 3);
System.out.println("--@@@@@-"+lineNo+"---");
xmlBuff.append("<line_no><![CDATA["+lineNo+"]]></line_no>");
xmlBuff.append("<line_no__sord><![CDATA["+ lnNoSord +"]]></line_no__sord>");
xmlBuff.append("<lot_no><![CDATA["+ lotNo +"]]></lot_no>");
xmlBuff.append("<lot_sl><![CDATA["+ lotSl +"]]></lot_sl>");
......@@ -1947,7 +1982,8 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
xmlBuff.append("<rate><![CDATA["+rate +"]]></rate>");
xmlBuff.append("<item_code__ord><![CDATA["+ itemCode.trim() +"]]></item_code__ord>");
xmlBuff.append("<item_code><![CDATA["+ itemCode +"]]></item_code>");
xmlBuff.append("<quantity><![CDATA["+ quantity.trim() +"]]></quantity>");
xmlBuff.append("<quantity><![CDATA["+ quantity.trim() +"]]></quantity>");
xmlBuff.append("<quantity__ord><![CDATA["+ quantity.trim() +"]]></quantity__ord>");
xmlBuff.append("<unit><![CDATA["+ unit+"]]></unit>");
xmlBuff.append("<conv__qty_stduom><![CDATA["+ conQtyStd +"]]></conv__qty_stduom>");
xmlBuff.append("<unit__rate><![CDATA["+ unitRate +"]]></unit__rate>");
......@@ -2027,7 +2063,40 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
System.out.println("-tranIdForDesp-"+tranIdForDesp);
System.out.println("packInstr : "+packInstr);
System.out.println("packCode : "+packCode);
sql = " update despatchdet set PACK_INSTR = ?,PACK_CODE = ? where desp_id = ? ";
sql = "select PACK_CODE,PACK_INSTR,Line_no from porcpdet where TRAN_ID = ?";
pstmt2 = conn.prepareStatement(sql);
pstmt2.setString(1,tranIdForDesp);
rs2 = pstmt2.executeQuery();
while(rs2.next())
{
packCode=rs2.getString("pack_code");
packInstr=rs2.getString("PACK_INSTR");
lineNo=rs2.getString("Line_no");
System.out.println("packCode :"+packCode +"@packInstr :"+packInstr+" @lineNo :"+lineNo);
sql = " update despatchdet set PACK_INSTR = ?,PACK_CODE = ? where desp_id = ? and line_no = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,packInstr);
pstmt.setString(2,packCode);
pstmt.setString(3,tranIdForDesp);
pstmt.setString(4,lineNo);
int row = pstmt.executeUpdate();
System.out.println("updated rows@@@ =="+row);
conn.commit();
}
pstmt2.close();
pstmt2 = null;
rs2.close();
rs2 = null;
/*sql = " update despatchdet set PACK_INSTR = ?,PACK_CODE = ? where desp_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,packInstr);
pstmt.setString(2,packCode);
......@@ -2035,7 +2104,7 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
int row = pstmt.executeUpdate();
System.out.println("updated rows@@@ =="+row);
conn.commit();
conn.commit();*/
/*-----------------------------------------------------------------------*/
......
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