IDEMPIERE-473 Consistent ShelfHeight, ShelfDepth, ShelfWidth in m_product and i_product

This commit is contained in:
Carlos Ruiz 2015-02-26 10:07:30 -05:00
parent bb9b63bdc7
commit caab6efad4
4 changed files with 37 additions and 10 deletions

View File

@ -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
;

View File

@ -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
;

View File

@ -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";

View File

@ -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.