Commit e8241bda authored by dpawar's avatar dpawar

trim item code and cust code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97908 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e0e14463
...@@ -7489,16 +7489,21 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales ...@@ -7489,16 +7489,21 @@ public class SalesReturn extends ValidatorEJB implements SalesReturnLocal, Sales
else if( childNodeName.equalsIgnoreCase( "cust_item__ref" ) ) else if( childNodeName.equalsIgnoreCase( "cust_item__ref" ) )
{ {
itemCode = genericUtility.getColumnValue( "cust_item__ref", dom ); itemCode = genericUtility.getColumnValue( "cust_item__ref", dom );
custCode = genericUtility.getColumnValue( "cust_code", dom1 ); custCode = genericUtility.getColumnValue( "cust_code", dom1 );
//Changed by Dadaso on 22/04/15 [trim cust code ]
custCode = custCode == null ? "" : custCode.trim();
if( itemCode != null && itemCode.trim().length() > 0 && !"null".equals(itemCode)) if( itemCode != null && itemCode.trim().length() > 0 && !"null".equals(itemCode))
{ {
//Changed by Dadaso on 22/04/15 [trim itemCode ]
itemCode = itemCode.trim();
sqlStr = " select count(*) mitem_cnt from customeritem " sqlStr = " select count(*) mitem_cnt from customeritem "
+" where cust_code = ? " //:custCode +" where cust_code = ? " //:custCode
+" and item_code__ref = ? "; //:ls_item_code ; +" and item_code__ref = ? "; //:ls_item_code ;
pstmt = conn.prepareStatement( sqlStr ); pstmt = conn.prepareStatement( sqlStr );
pstmt.setString( 1, custCode ); pstmt.setString( 1, custCode );
pstmt.setString( 2, itemCode ); pstmt.setString( 2, itemCode );
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
......
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