diff --git a/migration/i2.1z/oracle/201502261003_IDEMPIERE-473.sql b/migration/i2.1z/oracle/201502261003_IDEMPIERE-473.sql new file mode 100644 index 0000000000..0d7d7763d2 --- /dev/null +++ b/migration/i2.1z/oracle/201502261003_IDEMPIERE-473.sql @@ -0,0 +1,15 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-473 Consistent ShelfHeight in m_product and i_product +-- Feb 26, 2015 10:02:41 AM COT +UPDATE AD_Column SET AD_Reference_ID=12,Updated=TO_DATE('2015-02-26 10:02:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7848 +; + +-- Feb 26, 2015 10:02:43 AM COT +ALTER TABLE I_Product MODIFY ShelfHeight NUMBER DEFAULT NULL +; + +SELECT register_migration_script('201502261003_IDEMPIERE-473.sql') FROM dual +; + diff --git a/migration/i2.1z/postgresql/201502261003_IDEMPIERE-473.sql b/migration/i2.1z/postgresql/201502261003_IDEMPIERE-473.sql new file mode 100644 index 0000000000..8ad8c385ef --- /dev/null +++ b/migration/i2.1z/postgresql/201502261003_IDEMPIERE-473.sql @@ -0,0 +1,12 @@ +-- IDEMPIERE-473 Consistent ShelfHeight in m_product and i_product +-- Feb 26, 2015 10:02:41 AM COT +UPDATE AD_Column SET AD_Reference_ID=12,Updated=TO_TIMESTAMP('2015-02-26 10:02:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7848 +; + +-- Feb 26, 2015 10:02:43 AM COT +INSERT INTO t_alter_column values('i_product','ShelfHeight','NUMERIC',null,'NULL') +; + +SELECT register_migration_script('201502261003_IDEMPIERE-473.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/compiere/model/I_I_Product.java b/org.adempiere.base/src/org/compiere/model/I_I_Product.java index 844cc39131..87f8fa64f3 100644 --- a/org.adempiere.base/src/org/compiere/model/I_I_Product.java +++ b/org.adempiere.base/src/org/compiere/model/I_I_Product.java @@ -563,12 +563,12 @@ public interface I_I_Product /** Set Shelf Height. * Shelf height required */ - public void setShelfHeight (int ShelfHeight); + public void setShelfHeight (BigDecimal ShelfHeight); /** Get Shelf Height. * Shelf height required */ - public int getShelfHeight(); + public BigDecimal getShelfHeight(); /** Column name ShelfWidth */ public static final String COLUMNNAME_ShelfWidth = "ShelfWidth"; diff --git a/org.adempiere.base/src/org/compiere/model/X_I_Product.java b/org.adempiere.base/src/org/compiere/model/X_I_Product.java index 74582283c9..022444e850 100644 --- a/org.adempiere.base/src/org/compiere/model/X_I_Product.java +++ b/org.adempiere.base/src/org/compiere/model/X_I_Product.java @@ -33,7 +33,7 @@ public class X_I_Product extends PO implements I_I_Product, I_Persistent /** * */ - private static final long serialVersionUID = 20141030L; + private static final long serialVersionUID = 20150226L; /** Standard Constructor */ public X_I_Product (Properties ctx, int I_Product_ID, String trxName) @@ -815,20 +815,20 @@ public class X_I_Product extends PO implements I_I_Product, I_Persistent @param ShelfHeight Shelf height required */ - public void setShelfHeight (int ShelfHeight) + public void setShelfHeight (BigDecimal ShelfHeight) { - set_Value (COLUMNNAME_ShelfHeight, Integer.valueOf(ShelfHeight)); + set_Value (COLUMNNAME_ShelfHeight, ShelfHeight); } /** Get Shelf Height. @return Shelf height required */ - public int getShelfHeight () + public BigDecimal getShelfHeight () { - Integer ii = (Integer)get_Value(COLUMNNAME_ShelfHeight); - if (ii == null) - return 0; - return ii.intValue(); + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ShelfHeight); + if (bd == null) + return Env.ZERO; + return bd; } /** Set Shelf Width.