BF [ 2012439 ] DiscountSchemaBreak: setting product & category is allowed

This commit is contained in:
teo_sarca 2008-07-07 12:33:01 +00:00
parent 931bae1a4a
commit bc6ae9ad5f
3 changed files with 32 additions and 0 deletions

View File

@ -26,6 +26,9 @@ import java.util.*;
* *
* @author Jorg Janke * @author Jorg Janke
* @version $Id: MDiscountSchemaBreak.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $ * @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 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); return MProductCategory.isCategory(getM_Product_Category_ID(), M_Product_ID);
} // applies } // 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 * String Representation
* @return info * @return info

View File

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

View File

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