IDEMPIERE-567 Move ProductUOMConversionRateValidate sysconfig key to be client configurable

This commit is contained in:
Carlos Ruiz 2013-01-18 11:38:44 -08:00
parent 2b3f71e48c
commit 9001929ae1
3 changed files with 28 additions and 2 deletions

View File

@ -0,0 +1,13 @@
-- Jan 18, 2013 11:37:40 AM PST
-- IDEMPIERE-567 Move ProductUOMConversionRateValidate sysconfig key to be client configurable
UPDATE AD_SysConfig SET ConfigurationLevel='C',Updated=TO_DATE('2013-01-18 11:37:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50023
;
-- Jan 18, 2013 11:37:44 AM PST
-- IDEMPIERE-567 Move ProductUOMConversionRateValidate sysconfig key to be client configurable
UPDATE AD_SysConfig SET ConfigurationLevel='C',Updated=TO_DATE('2013-01-18 11:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50022
;
SELECT register_migration_script('201301181138_IDEMPIERE-567.sql') FROM dual
;

View File

@ -0,0 +1,13 @@
-- Jan 18, 2013 11:37:40 AM PST
-- IDEMPIERE-567 Move ProductUOMConversionRateValidate sysconfig key to be client configurable
UPDATE AD_SysConfig SET ConfigurationLevel='C',Updated=TO_TIMESTAMP('2013-01-18 11:37:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50023
;
-- Jan 18, 2013 11:37:44 AM PST
-- IDEMPIERE-567 Move ProductUOMConversionRateValidate sysconfig key to be client configurable
UPDATE AD_SysConfig SET ConfigurationLevel='C',Updated=TO_TIMESTAMP('2013-01-18 11:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50022
;
SELECT register_migration_script('201301181138_IDEMPIERE-567.sql') FROM dual
;

View File

@ -702,7 +702,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
return false; return false;
} }
// Enforce Product UOM // Enforce Product UOM
if (MSysConfig.getBooleanValue(MSysConfig.ProductUOMConversionUOMValidate, true)) if (MSysConfig.getBooleanValue(MSysConfig.ProductUOMConversionUOMValidate, true, getAD_Client_ID()))
{ {
if (getM_Product_ID() != 0 if (getM_Product_ID() != 0
&& (newRecord || is_ValueChanged("M_Product_ID"))) && (newRecord || is_ValueChanged("M_Product_ID")))
@ -718,7 +718,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
} }
// The Product UoM needs to be the smallest UoM - Multiplier must be < 0; Divider must be > 0 // The Product UoM needs to be the smallest UoM - Multiplier must be < 0; Divider must be > 0
if (MSysConfig.getBooleanValue(MSysConfig.ProductUOMConversionRateValidate, true)) if (MSysConfig.getBooleanValue(MSysConfig.ProductUOMConversionRateValidate, true, getAD_Client_ID()))
{ {
if (getM_Product_ID() != 0 && getDivideRate().compareTo(Env.ONE) < 0) if (getM_Product_ID() != 0 && getDivideRate().compareTo(Env.ONE) < 0)
{ {