Commit 5e6ac175 authored by manohar's avatar manohar

in itemchanged of item_code purchase return quantity to be calculated for the...

in itemchanged of item_code purchase return quantity to be calculated for the header from/to date instead of the previous period


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91142 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 348550e0
...@@ -1245,6 +1245,24 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean ...@@ -1245,6 +1245,24 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean
stmt.close(); stmt.close();
stmt = null; stmt = null;
} }
/* // 04/06/09 manoharan set cust_stockmode
selQuery = "SELECT VAR_VALUE FROM DISPARM WHERE PRD_CODE = '999999' AND VAR_NAME = 'CUST_STOCK_MODE'";
//System.out.println("Executing Query .............\n" +selQuery);
stmt = conn.prepareStatement( selQuery );
rs = stmt.executeQuery();
if (rs.next())
{
stockMode = rs.getString(1);
}
else
{
stockMode = "S";
}
rs.close();
rs = null;
valueXmlString.append("<cust_stock_mode>").append( stockMode ).append("</cust_stock_mode>\r\n");
// end 04/06/09 manoharan set cust_stockmode*/
} }
if (currentColumn.trim().equals("itm_defaultedit")) if (currentColumn.trim().equals("itm_defaultedit"))
{ {
...@@ -2192,8 +2210,13 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean ...@@ -2192,8 +2210,13 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean
pstmt = conn.prepareStatement(selQuery); pstmt = conn.prepareStatement(selQuery);
pstmt.setString(1,custCode); pstmt.setString(1,custCode);
pstmt.setTimestamp(2,preFromDate); // 11/09/09 manoharan sales return for the period code in header
pstmt.setTimestamp(3,preToDate); // only to be considered
//pstmt.setTimestamp(2,preFromDate);
//pstmt.setTimestamp(3,preToDate);
pstmt.setTimestamp( 2, tsFromDate );
pstmt.setTimestamp( 3, tsToDate );
// end 11/09/09 manoharan
pstmt.setString(4,itemCode); pstmt.setString(4,itemCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
retQty = 0; retQty = 0;
...@@ -2901,7 +2924,7 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean ...@@ -2901,7 +2924,7 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean
String lineNoStr = "0"; String lineNoStr = "0";
int currNodeLen; int currNodeLen;
System.out.println("Checking for duplicate items");
NodeList detailNodes = dom.getElementsByTagName( "Detail2" ); NodeList detailNodes = dom.getElementsByTagName( "Detail2" );
int detLen = detailNodes.getLength(); int detLen = detailNodes.getLength();
...@@ -2932,6 +2955,7 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean ...@@ -2932,6 +2955,7 @@ public class CustStockItem extends ValidatorEJB //implements SessionBean
} }
if( !"D".equalsIgnoreCase( updateFlag ) ) if( !"D".equalsIgnoreCase( updateFlag ) )
{ {
System.out.println("not duplicate lineNoStr [" + lineNoStr + "] itemLineNo [" + itemLineNo+ "]fldValue [" + fldValue + "] columnValue [" + columnValue + "]");
if( !lineNoStr.trim().equals( itemLineNo.trim() ) && fldValue.trim().equalsIgnoreCase( columnValue ) ) if( !lineNoStr.trim().equals( itemLineNo.trim() ) && fldValue.trim().equalsIgnoreCase( columnValue ) )
{ {
System.out.println("lineNoStr [" + lineNoStr + "] itemLineNo [" + itemLineNo+ "]fldValue [" + fldValue + "] columnValue [" + columnValue + "]"); System.out.println("lineNoStr [" + lineNoStr + "] itemLineNo [" + itemLineNo+ "]fldValue [" + fldValue + "] columnValue [" + columnValue + "]");
......
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