BF [ 2012439 ] DiscountSchemaBreak: setting product & category is allowed
This commit is contained in:
parent
931bae1a4a
commit
bc6ae9ad5f
|
@ -26,6 +26,9 @@ import java.util.*;
|
|||
*
|
||||
* @author Jorg Janke
|
||||
* @version $Id: MDiscountSchemaBreak.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
|
||||
*
|
||||
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
|
||||
* <li>BF [ 2012439 ] DiscountSchemaBreak: setting product & category is allowed
|
||||
*/
|
||||
public class MDiscountSchemaBreak extends X_M_DiscountSchemaBreak
|
||||
{
|
||||
|
@ -86,6 +89,15 @@ public class MDiscountSchemaBreak extends X_M_DiscountSchemaBreak
|
|||
return MProductCategory.isCategory(getM_Product_Category_ID(), M_Product_ID);
|
||||
} // applies
|
||||
|
||||
@Override
|
||||
protected boolean beforeSave(boolean newRecord) {
|
||||
// If M_Product_ID and M_Product_Category_ID is set, M_Product_ID has priority - teo_sarca [ 2012439 ]
|
||||
if (getM_Product_ID() > 0 && getM_Product_Category_ID() > 0)
|
||||
setM_Product_Category_ID(I_ZERO);
|
||||
//
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* String Representation
|
||||
* @return info
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
-- 07.07.2008 15:22:56 EEST
|
||||
--
|
||||
UPDATE AD_Column SET ReadOnlyLogic='@M_Product_ID@!0',Updated=TO_DATE('2008-07-07 15:22:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=6610
|
||||
;
|
||||
|
||||
-- 07.07.2008 15:23:12 EEST
|
||||
--
|
||||
UPDATE AD_Column SET ReadOnlyLogic='@M_Product_Category_ID@!0',Updated=TO_DATE('2008-07-07 15:23:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=6611
|
||||
;
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
-- 07.07.2008 15:22:56 EEST
|
||||
--
|
||||
UPDATE AD_Column SET ReadOnlyLogic='@M_Product_ID@!0',Updated=TO_TIMESTAMP('2008-07-07 15:22:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=6610
|
||||
;
|
||||
|
||||
-- 07.07.2008 15:23:12 EEST
|
||||
--
|
||||
UPDATE AD_Column SET ReadOnlyLogic='@M_Product_Category_ID@!0',Updated=TO_TIMESTAMP('2008-07-07 15:23:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=6611
|
||||
;
|
||||
|
Loading…
Reference in New Issue