Commit 34b7fc58 authored by mjadhav's avatar mjadhav

remove UNION condition from receipt quantity


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98773 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 58006cbf
......@@ -3804,14 +3804,14 @@ private double GetRcpQty(String custCode, String orderType, String itemSer,Strin
"and ( (invoice.tran_date >=?) and (invoice.tran_date <= ? ) " +
"or ((invoice.tran_date >=? ) and (invoice.tran_date <= ? ) ) and(exists (SELECT cust_stock_inv.invoice_id " +
" FROM cust_stock_inv cust_stock_inv WHERE cust_stock_inv.invoice_id = invoice.invoice_id and " +
" cust_stock_inv.dlv_flg = 'N' )) ) " +
"UNION " +
" cust_stock_inv.dlv_flg = 'N' )) ) )" ;
/*"UNION " +
" SELECT distinct cinv.invoice_id FROM CUST_STOCK_INV cinv , " +
" invoice invoice WHERE cinv.invoice_id=invoice.invoice_id and invoice.cust_code = ? " +
" and invoice.item_ser= ? and invoice.inv_type = ? and invoice.confirmed = 'Y' and " +
"CASE WHEN cinv.dlv_flg IS NULL THEN 'N' ELSE cinv.dlv_flg END='N' ) " ;
*/
pstmt = conn.prepareStatement( sql );
pstmt.setString(1, itenmCode);
......@@ -3823,9 +3823,9 @@ private double GetRcpQty(String custCode, String orderType, String itemSer,Strin
pstmt.setTimestamp(7, toDate );
pstmt.setTimestamp(8, prdFrom );
pstmt.setTimestamp(9, prdTo );
pstmt.setString(10, custCode );
/* pstmt.setString(10, custCode );
pstmt.setString(11, itemSer);
pstmt.setString(12, orderType);
pstmt.setString(12, orderType);*/
rs = pstmt.executeQuery();
while( rs.next() )
......@@ -4182,13 +4182,13 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
"and ( (invoice.tran_date >=?) and (invoice.tran_date <= ? ) " +
"or ((invoice.tran_date >=? ) and (invoice.tran_date <= ? ) ) and(exists (SELECT cust_stock_inv.invoice_id " +
" FROM cust_stock_inv cust_stock_inv WHERE cust_stock_inv.invoice_id = invoice.invoice_id and " +
" cust_stock_inv.dlv_flg = 'N' )) ) " +
"UNION " +
" cust_stock_inv.dlv_flg = 'N' )) )) " ;
/* "UNION " +
" SELECT distinct cinv.invoice_id FROM CUST_STOCK_INV cinv , " +
" invoice invoice WHERE cinv.invoice_id=invoice.invoice_id and invoice.cust_code = ? " +
" and invoice.item_ser= ? and invoice.inv_type = ? and invoice.confirmed = 'Y' and " +
"CASE WHEN cinv.dlv_flg IS NULL THEN 'N' ELSE cinv.dlv_flg END='N' ) " ;
*/
pstmt = conn.prepareStatement( sql );
......@@ -4201,9 +4201,9 @@ private double GetFreeQty(String custCode,String itemCode,String itemSer,String
pstmt.setTimestamp(7, toDate );
pstmt.setTimestamp(8, prdFrom );
pstmt.setTimestamp(9, prdTo );
pstmt.setString(10, custCode );
/*pstmt.setString(10, custCode );
pstmt.setString(11, itemSer);
pstmt.setString(12, orderType);
pstmt.setString(12, orderType);*/
rs = pstmt.executeQuery();
while( 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