Bug Fix [1657123 ] Inventory count problem

This commit is contained in:
armenrz 2007-02-12 01:51:46 +00:00
parent aac05de974
commit ea1c5af324
1 changed files with 8 additions and 0 deletions

View File

@ -108,6 +108,14 @@ public class InventoryCountCreate extends SvrProcess
//
if (p_DeleteOld)
{
//Added Line by armen
String sql1 = "DELETE FROM M_InventoryLineMA ma WHERE EXISTS "
+ "(SELECT * FROM M_InventoryLine l WHERE l.M_InventoryLine_ID=ma.M_InventoryLine_ID"
+ " AND Processed='N' AND M_Inventory_ID=" + p_M_Inventory_ID + ")";
int no1 = DB.executeUpdate(sql1, get_TrxName());
log.fine("doIt - Deleted MA #" + no1);
//End of Added Line
String sql = "DELETE M_InventoryLine WHERE Processed='N' "
+ "AND M_Inventory_ID=" + p_M_Inventory_ID;
int no = DB.executeUpdate(sql, get_TrxName());