From ad8d01291cc8505a3433afec5faade3c7652970b Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 8 Mar 2011 12:31:00 -0500 Subject: [PATCH] Bug#2904321-Create Inventory Count List not taking negative qty products https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2904321&group_id=176962 --- migration/360lts-release/oracle/750_BF2904321.sql | 5 +++++ migration/360lts-release/postgresql/750_BF2904321.sql | 5 +++++ .../src/org/compiere/model/MInventoryLine.java | 5 ++++- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 migration/360lts-release/oracle/750_BF2904321.sql create mode 100644 migration/360lts-release/postgresql/750_BF2904321.sql diff --git a/migration/360lts-release/oracle/750_BF2904321.sql b/migration/360lts-release/oracle/750_BF2904321.sql new file mode 100644 index 0000000000..fa587a21ac --- /dev/null +++ b/migration/360lts-release/oracle/750_BF2904321.sql @@ -0,0 +1,5 @@ +-- Nov 28, 2010 9:58:00 AM CST +-- BF 2904321 - Create Inventory Count List not taking negative qty products +UPDATE AD_Column SET ValueMin=NULL,Updated=TO_DATE('2010-11-28 09:58:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3567 +; + diff --git a/migration/360lts-release/postgresql/750_BF2904321.sql b/migration/360lts-release/postgresql/750_BF2904321.sql new file mode 100644 index 0000000000..a1216b4e49 --- /dev/null +++ b/migration/360lts-release/postgresql/750_BF2904321.sql @@ -0,0 +1,5 @@ +-- Nov 28, 2010 9:58:00 AM CST +-- BF 2904321 - Create Inventory Count List not taking negative qty products +UPDATE AD_Column SET ValueMin=NULL,Updated=TO_TIMESTAMP('2010-11-28 09:58:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=3567 +; + diff --git a/org.adempiere.base/src/org/compiere/model/MInventoryLine.java b/org.adempiere.base/src/org/compiere/model/MInventoryLine.java index 057ee893dc..a07db1ae6a 100644 --- a/org.adempiere.base/src/org/compiere/model/MInventoryLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInventoryLine.java @@ -271,11 +271,14 @@ public class MInventoryLine extends X_M_InventoryLine } // Enforce QtyCount >= 0 - teo_sarca BF [ 1722982 ] - if (getQtyCount().signum() < 0) + // GlobalQSS -> reverting this change because of Bug 2904321 - Create Inventory Count List not taking negative qty products + /* + if ( (!newRecord) && is_ValueChanged("QtyCount") && getQtyCount().signum() < 0) { log.saveError("Warning", Msg.getElement(getCtx(), COLUMNNAME_QtyCount)+" < 0"); return false; } + */ // Enforce Qty UOM if (newRecord || is_ValueChanged("QtyCount")) setQtyCount(getQtyCount());