Commit 14f65b2a authored by cpatil's avatar cpatil

remove and VALID_UPTO not in ( ? ) condition


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98108 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 42288e2c
...@@ -152,19 +152,20 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri ...@@ -152,19 +152,20 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri
// logic merge by cpatil on 12/06/12 start // logic merge by cpatil on 12/06/12 start
sql = "SELECT count( 1 ) from pricelist where " sql = "SELECT count( 1 ) from pricelist where "
+" PRICE_LIST = ? " + " PRICE_LIST = ? "
+" AND ITEM_CODE = ? " + " AND ITEM_CODE = ? "
// +" AND LIST_TYPE = ? " // +" AND LIST_TYPE = ? "
+" AND ( ? between EFF_FROM AND VALID_UPTO) " + " AND ( ? between EFF_FROM AND VALID_UPTO) "
// +" and slab_no not in ( ? ) and unit not in ( ? ) and list_type not in ( ? ) "; // + " and slab_no not in ( ? ) and unit not in ( ? ) and list_type not in ( ? ) ";
+" and EFF_FROM not in ( ? ) and VALID_UPTO not in ( ? ) "; // added by cpatil 15/06/15 + " and EFF_FROM not in ( ? ) " ;
//+ "and VALID_UPTO not in ( ? ) "; // added by cpatil 15/06/15
chkPlpstmt = conn.prepareStatement( sql ); chkPlpstmt = conn.prepareStatement( sql );
chkPlpstmt.setString( 1, pricelistMrp.trim() ); // cpatil pricelstGen chkPlpstmt.setString( 1, pricelistMrp.trim() ); // cpatil pricelstGen
chkPlpstmt.setString( 2, pricelistItemCode.trim() ); chkPlpstmt.setString( 2, pricelistItemCode.trim() );
//chkPlpstmt.setString( 3, pricelistListype.trim() ); //chkPlpstmt.setString( 3, pricelistListype.trim() );
chkPlpstmt.setTimestamp (3, effFrom ); chkPlpstmt.setTimestamp (3, effFrom );
chkPlpstmt.setTimestamp (4, effFrom ); chkPlpstmt.setTimestamp (4, effFrom );
chkPlpstmt.setTimestamp (5, validUpto ); // chkPlpstmt.setTimestamp (5, validUpto );
chkPlrs = chkPlpstmt.executeQuery(); chkPlrs = chkPlpstmt.executeQuery();
if(chkPlrs.next()) if(chkPlrs.next())
...@@ -181,8 +182,9 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri ...@@ -181,8 +182,9 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri
+" where price_list = ? " +" where price_list = ? "
+" AND item_code = ? " +" AND item_code = ? "
//+" AND LIST_TYPE = ?" //+" AND LIST_TYPE = ?"
+" AND ( ? between EFF_FROM AND VALID_UPTO) " + " AND ( ? between EFF_FROM AND VALID_UPTO) "
+" and EFF_FROM not in ( ? ) and VALID_UPTO not in ( ? ) "; // added by cpatil 15/06/15 + " and EFF_FROM not in ( ? ) " ;
//+"and VALID_UPTO not in ( ? ) "; // added by cpatil 15/06/15
dateOverpstmt = conn.prepareStatement( sql ); dateOverpstmt = conn.prepareStatement( sql );
...@@ -202,7 +204,7 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri ...@@ -202,7 +204,7 @@ public class PriceListPos extends ValidatorEJB implements PriceListPosLocal, Pri
//dateOverpstmt.setString( 4, pricelistListype ); //dateOverpstmt.setString( 4, pricelistListype );
dateOverpstmt.setTimestamp (4, effFrom ); dateOverpstmt.setTimestamp (4, effFrom );
dateOverpstmt.setTimestamp (5, effFrom ); dateOverpstmt.setTimestamp (5, effFrom );
dateOverpstmt.setTimestamp (6, validUpto ); // dateOverpstmt.setTimestamp (6, validUpto );
updtCnt = dateOverpstmt.executeUpdate(); updtCnt = dateOverpstmt.executeUpdate();
......
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