Commit d3c66396 authored by cpatil's avatar cpatil

Retest Date should be grater then sysdate.

Quantity - Alloc Qty > 0
Invstat.status_type <> 'S'

added this conditions


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94288 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 00f72e32
......@@ -633,9 +633,12 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt
}
//// for stock check
sql =" select sum(quantity-alloc_qty) as stockBalQty from stock a where a.item_code = ? "
+" and a.site_code = ? "
+" and ( a.exp_date > ? or a.retest_date < ? ) ";
sql =" select sum(quantity-alloc_qty) as stockBalQty from stock a ,invstat b " + // added by cpatil on 21/02/14 as per bharat suggestion
" where a.inv_stat = b.inv_stat " + // added by cpatil on 21/02/14 as per bharat suggestion
" and a.quantity - a.alloc_qty > 0 and b.stat_type <> 'S' " + // added by cpatil on 21/02/14 as per bharat suggestion
" and a.item_code = ? " +
" and a.site_code = ? " +
" and ( a.exp_date > ? or a.retest_date > ? ) ";
if(issForBatch)
{
sql = sql + " and a.supp_code__mfg ='"+stockSupplier+"'" ;
......@@ -781,8 +784,8 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt
}
System.out.println("@@@@ supp_code__mfg......................"+ supp_code__mfg);
*/
stockSql ="select a.lot_no, a.loc_code, a.lot_sl, a.rate, a.gross_rate,a.supp_code__mfg "
+" ,(a.quantity-a.alloc_qty) as stockBalQty "
stockSql ="select a.lot_no, a.loc_code, a.lot_sl, a.rate, a.gross_rate,a.supp_code__mfg, "
+" ( a.quantity-a.alloc_qty ) as stockBalQty "
+" from stock a, invstat b, item c "
+" Where a.inv_stat = b.inv_stat and a.item_code = c.item_code "
+" and a.item_code = '" + itemCode + "' "
......
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