Commit db9e4276 authored by manohar's avatar manohar

Optimisation and bug fix in despatchPost()


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104024 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e5134467
......@@ -3252,16 +3252,19 @@ public class InvAcct
lotSl = rs1.getString("lot_sl");
sordNo = rs1.getString("sord_no");
rateStduom = rs1.getDouble("rate__stduom");
sql = "select item_ser,order_date from sorder where sale_order = ?" ;
// 23-Nov-16 manoharan order_type included and below one select commentd
sql = "select item_ser,order_date,order_type from sorder where sale_order = ?" ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,sordNo);
rs = pstmt.executeQuery();
while(rs.next())
// 23-Nov-16 manoharan
//while(rs.next())
if(rs.next())
{
itemSerSord = rs.getString("item_ser");
ordDate = rs.getTimestamp("order_date");
ordType = rs.getString("order_type");
}
pstmt.close();
......@@ -3274,7 +3277,9 @@ public class InvAcct
pstmt.setString(1,itemSerSord);
rs = pstmt.executeQuery();
while(rs.next())
// 23-Nov-16 manoharan
//while(rs.next())
if(rs.next())
{
postType = rs.getString("post_type");
}
......@@ -3282,8 +3287,9 @@ public class InvAcct
pstmt = null;
rs.close();
rs = null;
if(postType == "S")//if post type is standerd then inventory accounting is on standard rate
// 23-Nov-16 manoharan
//if(postType == "S")//if post type is standerd then inventory accounting is on standard rate
if("S".equals(postType))
{
priceList = dis.getDisparams("999999", "STD_SO_PL", conn);
......@@ -3328,22 +3334,25 @@ public class InvAcct
}
// 23-Nov-16 manoharan stk_opt included and below one select commented
// Selecting the Item Series from ITEM Table
sql = "select item_ser from item where item_code = ?";
sql = "select item_ser, stk_opt from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
rs = pstmt.executeQuery();
while(rs.next())
// 23-Nov-16 manoharan
//while(rs.next())
if(rs.next())
{
itemSer = rs.getString("item_ser");
stkOpt = rs.getString("stk_opt");
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
/* // 23-Nov-16 manoharan
sql = "select order_type from sorder where sale_order = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,sordNo);
......@@ -3357,6 +3366,7 @@ public class InvAcct
pstmt = null;
rs.close();
rs = null;
*/
// Getting ACCT & CCTR Code for COGS
......@@ -3390,7 +3400,7 @@ public class InvAcct
cctCodecog = " ";
}
System.out.println("ACCT CODE COGS ========= "+accCodeCog+" CCTR CODE COGS ==========="+cctCodecog);
/* // 23-Nov-16 manoharan commented and included in previous select
sql = "select stk_opt from item where item_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
......@@ -3404,6 +3414,7 @@ public class InvAcct
pstmt = null;
rs.close();
rs = null;
*/
System.out.println("STK OPTION@@@@@@@@@@@@@@@@@@@@@@@@@@@@3377"+stkOpt);
if("0".equalsIgnoreCase(stkOpt))
{
......@@ -3558,7 +3569,9 @@ public class InvAcct
pstmt.setString(5,lotSl);
rs = pstmt.executeQuery();
while(rs.next())
// 23-Nov-16 Manoharan
//while(rs.next())
if(rs.next())
{
acctCodeIn = rs.getString("acct_code__inv");
cctrCodeIn = rs.getString("cctr_code__inv");
......
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