From ea1c5af324254696a0ee7b00b156a9a0e12a5a01 Mon Sep 17 00:00:00 2001 From: armenrz Date: Mon, 12 Feb 2007 01:51:46 +0000 Subject: [PATCH] Bug Fix [1657123 ] Inventory count problem --- base/src/org/compiere/process/InventoryCountCreate.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/base/src/org/compiere/process/InventoryCountCreate.java b/base/src/org/compiere/process/InventoryCountCreate.java index bb95c789e9..147df6df7c 100644 --- a/base/src/org/compiere/process/InventoryCountCreate.java +++ b/base/src/org/compiere/process/InventoryCountCreate.java @@ -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());