BF [2840359] - currency precision should be just an integer
https://sourceforge.net/tracker/?func=detail&aid=2840359&group_id=176962&atid=879332
This commit is contained in:
parent
d6087a856f
commit
849e087b40
|
@ -352,12 +352,12 @@ public interface I_I_PriceList
|
|||
/** Set Price Precision.
|
||||
* Precision (number of decimals) for the Price
|
||||
*/
|
||||
public void setPricePrecision (BigDecimal PricePrecision);
|
||||
public void setPricePrecision (int PricePrecision);
|
||||
|
||||
/** Get Price Precision.
|
||||
* Precision (number of decimals) for the Price
|
||||
*/
|
||||
public BigDecimal getPricePrecision();
|
||||
public int getPricePrecision();
|
||||
|
||||
/** Column name PriceStd */
|
||||
public static final String COLUMNNAME_PriceStd = "PriceStd";
|
||||
|
|
|
@ -238,12 +238,12 @@ public interface I_M_PriceList
|
|||
/** Set Price Precision.
|
||||
* Precision (number of decimals) for the Price
|
||||
*/
|
||||
public void setPricePrecision (BigDecimal PricePrecision);
|
||||
public void setPricePrecision (int PricePrecision);
|
||||
|
||||
/** Get Price Precision.
|
||||
* Precision (number of decimals) for the Price
|
||||
*/
|
||||
public BigDecimal getPricePrecision();
|
||||
public int getPricePrecision();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
|
|
@ -167,7 +167,7 @@ public class MPriceList extends X_M_PriceList
|
|||
public static int getPricePrecision (Properties ctx, int M_PriceList_ID)
|
||||
{
|
||||
MPriceList pl = MPriceList.get(ctx, M_PriceList_ID, null);
|
||||
return pl.getPricePrecisionInt();
|
||||
return pl.getPricePrecision();
|
||||
} // getPricePrecision
|
||||
|
||||
/** Cache of Price Lists */
|
||||
|
@ -269,27 +269,4 @@ public class MPriceList extends X_M_PriceList
|
|||
return m_precision.intValue();
|
||||
} // getStandardPrecision
|
||||
|
||||
|
||||
/**
|
||||
* Set Price Precision
|
||||
* @param PricePrecision precision
|
||||
*/
|
||||
public void setPricePrecision (int PricePrecision)
|
||||
{
|
||||
setPricePrecision (BigDecimal.valueOf(PricePrecision));
|
||||
} // setPricePrecision
|
||||
|
||||
|
||||
/**
|
||||
* Get Price Precision as int
|
||||
* @return precision - -1 for none
|
||||
*/
|
||||
public int getPricePrecisionInt ()
|
||||
{
|
||||
BigDecimal bd = getPricePrecision ();
|
||||
if (bd == null)
|
||||
return -1;
|
||||
return bd.intValue();
|
||||
} // getPricePrecisionInt
|
||||
|
||||
} // MPriceList
|
||||
|
|
|
@ -575,20 +575,20 @@ public class X_I_PriceList extends PO implements I_I_PriceList, I_Persistent
|
|||
@param PricePrecision
|
||||
Precision (number of decimals) for the Price
|
||||
*/
|
||||
public void setPricePrecision (BigDecimal PricePrecision)
|
||||
public void setPricePrecision (int PricePrecision)
|
||||
{
|
||||
set_Value (COLUMNNAME_PricePrecision, PricePrecision);
|
||||
set_Value (COLUMNNAME_PricePrecision, Integer.valueOf(PricePrecision));
|
||||
}
|
||||
|
||||
/** Get Price Precision.
|
||||
@return Precision (number of decimals) for the Price
|
||||
*/
|
||||
public BigDecimal getPricePrecision ()
|
||||
public int getPricePrecision ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PricePrecision);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_PricePrecision);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Standard Price.
|
||||
|
|
|
@ -18,11 +18,9 @@
|
|||
package org.compiere.model;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Model for M_PriceList
|
||||
|
@ -49,7 +47,7 @@ public class X_M_PriceList extends PO implements I_M_PriceList, I_Persistent
|
|||
setIsTaxIncluded (false);
|
||||
setM_PriceList_ID (0);
|
||||
setName (null);
|
||||
setPricePrecision (Env.ZERO);
|
||||
setPricePrecision (0);
|
||||
// 2
|
||||
} */
|
||||
}
|
||||
|
@ -354,19 +352,19 @@ public class X_M_PriceList extends PO implements I_M_PriceList, I_Persistent
|
|||
@param PricePrecision
|
||||
Precision (number of decimals) for the Price
|
||||
*/
|
||||
public void setPricePrecision (BigDecimal PricePrecision)
|
||||
public void setPricePrecision (int PricePrecision)
|
||||
{
|
||||
set_Value (COLUMNNAME_PricePrecision, PricePrecision);
|
||||
set_Value (COLUMNNAME_PricePrecision, Integer.valueOf(PricePrecision));
|
||||
}
|
||||
|
||||
/** Get Price Precision.
|
||||
@return Precision (number of decimals) for the Price
|
||||
*/
|
||||
public BigDecimal getPricePrecision ()
|
||||
public int getPricePrecision ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PricePrecision);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_PricePrecision);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
-- Aug 29, 2009 10:19:32 PM EEST
|
||||
-- BF [2840359] - currency precsion should be just an integer
|
||||
UPDATE AD_Column SET AD_Reference_ID=11,Updated=TO_DATE('2009-08-29 22:19:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56979
|
||||
;
|
||||
|
||||
-- Aug 29, 2009 10:25:24 PM EEST
|
||||
-- BF [2840359] - currency precsion should be just an integer
|
||||
UPDATE AD_Column SET AD_Reference_ID=11,Updated=TO_DATE('2009-08-29 22:25:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13051
|
||||
;
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
-- Aug 29, 2009 10:19:32 PM EEST
|
||||
-- BF [2840359] - currency precsion should be just an integer
|
||||
UPDATE AD_Column SET AD_Reference_ID=11,Updated=TO_TIMESTAMP('2009-08-29 22:19:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56979
|
||||
;
|
||||
|
||||
-- Aug 29, 2009 10:25:24 PM EEST
|
||||
-- BF [2840359] - currency precsion should be just an integer
|
||||
UPDATE AD_Column SET AD_Reference_ID=11,Updated=TO_TIMESTAMP('2009-08-29 22:25:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13051
|
||||
;
|
||||
|
Loading…
Reference in New Issue