Commit 4ae305f2 authored by ngadkari's avatar ngadkari

change quantity validation same as sales return

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@202835 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f1b80e79
...@@ -7455,8 +7455,8 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu ...@@ -7455,8 +7455,8 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu
lsRetOpt = genericUtility.getColumnValue( "ret_opt", dom1 ); lsRetOpt = genericUtility.getColumnValue( "ret_opt", dom1 );
String llLineNoInvStr = getNumString(genericUtility.getColumnValue( "line_no__inv", dom ));//dw_detedit[ii_currformno].getitemnumber(1,"line_no__inv") String llLineNoInvStr = getNumString(genericUtility.getColumnValue( "line_no__inv", dom ));//dw_detedit[ii_currformno].getitemnumber(1,"line_no__inv")
llLineNoInv = Integer.parseInt( llLineNoInvStr == null || llLineNoInvStr.trim().length() == 0 ? "0" : llLineNoInvStr.trim() ); llLineNoInv = Integer.parseInt( llLineNoInvStr == null || llLineNoInvStr.trim().length() == 0 ? "0" : llLineNoInvStr.trim() );
//llLineNoInvtraceStr = getNumString(genericUtility.getColumnValue( "line_no__invtrace", dom ));// dw_detedit[ii_currformno].getitemnumber(1,"line_no__invtrace") llLineNoInvtraceStr = getNumString(genericUtility.getColumnValue( "line_no__invtrace", dom ));// dw_detedit[ii_currformno].getitemnumber(1,"line_no__invtrace")// uncommented by nandkumar gadkari on 1-07-19
//llLineNoInvtrace = Integer.parseInt( llLineNoInvtraceStr == null || llLineNoInvtraceStr.trim().length() == 0 ? "0" : llLineNoInvtraceStr.trim() ); llLineNoInvtrace = Integer.parseInt( llLineNoInvtraceStr == null || llLineNoInvtraceStr.trim().length() == 0 ? "0" : llLineNoInvtraceStr.trim() );// uncommented by nandkumar gadkari on 1-07-19
System.out.println( " ldCurrQty :: " + ldCurrQty ); System.out.println( " ldCurrQty :: " + ldCurrQty );
if( ldCurrQty == 0 ) if( ldCurrQty == 0 )
{ {
...@@ -7470,7 +7470,8 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu ...@@ -7470,7 +7470,8 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu
if( lsInvoiceId != null && lsInvoiceId.trim().length() > 0 && !"null".equalsIgnoreCase( lsInvoiceId.trim() ) ) if( lsInvoiceId != null && lsInvoiceId.trim().length() > 0 && !"null".equalsIgnoreCase( lsInvoiceId.trim() ) )
{ {
System.out.println( " llLineNoInvtrace :val1: " + llLineNoInv ); System.out.println( " llLineNoInvtrace :val1: " + llLineNoInv );
if ( llLineNoInv == 0 ) //if ( llLineNoInv == 0 ) condition change by nandkumar gadkari on 01-07-19
if ( llLineNoInvtrace == 0 )
{ {
sqlStr = " select sum( case when quantity__stduom is null then 0 else quantity__stduom end ) lc_invqty_lot " sqlStr = " select sum( case when quantity__stduom is null then 0 else quantity__stduom end ) lc_invqty_lot "
+" from invoice_trace " +" from invoice_trace "
...@@ -7501,13 +7502,13 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu ...@@ -7501,13 +7502,13 @@ public class SReturnForm extends ValidatorEJB implements SReturnFormLocal, SRetu
sqlStr = " select sum(case when quantity__stduom is null then 0 else quantity__stduom end) lc_invqty_lot " sqlStr = " select sum(case when quantity__stduom is null then 0 else quantity__stduom end) lc_invqty_lot "
+" from invoice_trace " +" from invoice_trace "
+" where invoice_id = ? " //:ls_invoice_id +" where invoice_id = ? " //:ls_invoice_id
+" and inv_line_no = ? "; //:ll_line_no__inv +" and inv_line_no = ? " //:ll_line_no__inv
//+" and line_no = ? "; //:ll_line_no__invtrace ; +" and line_no = ? "; //:ll_line_no__invtrace ;// uncommented by nandkumar gadkari on 1-07-19
pstmt = conn.prepareStatement( sqlStr ); pstmt = conn.prepareStatement( sqlStr );
pstmt.setString( 1, lsInvoiceId ); pstmt.setString( 1, lsInvoiceId );
pstmt.setInt( 2, llLineNoInv ); pstmt.setInt( 2, llLineNoInv );
//pstmt.setInt( 3, llLineNoInvtrace ); pstmt.setInt( 3, llLineNoInvtrace );
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