* Feature request by Adaxa *
https://sourceforge.net/tracker/?func=detail&aid=2828826&group_id=176962&atid=879335 - add optional marketing campaign to promotion. https://sourceforge.net/tracker/?func=detail&aid=2828878&group_id=176962&atid=879335 - add optional activity filter to promotion pre condition
This commit is contained in:
parent
c69672f3c6
commit
f0b1f779fa
|
@ -63,6 +63,21 @@ public interface I_M_Promotion
|
|||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name C_Campaign_ID */
|
||||
public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
|
||||
|
||||
/** Set Campaign.
|
||||
* Marketing Campaign
|
||||
*/
|
||||
public void setC_Campaign_ID (int C_Campaign_ID);
|
||||
|
||||
/** Get Campaign.
|
||||
* Marketing Campaign
|
||||
*/
|
||||
public int getC_Campaign_ID();
|
||||
|
||||
public I_C_Campaign getC_Campaign() throws RuntimeException;
|
||||
|
||||
/** Column name Created */
|
||||
public static final String COLUMNNAME_Created = "Created";
|
||||
|
||||
|
|
|
@ -63,6 +63,21 @@ public interface I_M_PromotionPreCondition
|
|||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name C_Activity_ID */
|
||||
public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID";
|
||||
|
||||
/** Set Activity.
|
||||
* Business Activity
|
||||
*/
|
||||
public void setC_Activity_ID (int C_Activity_ID);
|
||||
|
||||
/** Get Activity.
|
||||
* Business Activity
|
||||
*/
|
||||
public int getC_Activity_ID();
|
||||
|
||||
public I_C_Activity getC_Activity() throws RuntimeException;
|
||||
|
||||
/** Column name C_BP_Group_ID */
|
||||
public static final String COLUMNNAME_C_BP_Group_ID = "C_BP_Group_ID";
|
||||
|
||||
|
|
|
@ -308,6 +308,9 @@ public class PromotionRule {
|
|||
description += (", " + ol.getName());
|
||||
nol.setDescription(description);
|
||||
nol.set_ValueOfColumn("M_Promotion_ID", promotion.getM_Promotion_ID());
|
||||
if (promotion.getC_Campaign_ID() > 0) {
|
||||
nol.setC_Campaign_ID(promotion.getC_Campaign_ID());
|
||||
}
|
||||
if (!nol.save())
|
||||
throw new AdempiereException("Failed to add discount line to order");
|
||||
}
|
||||
|
@ -327,6 +330,7 @@ public class PromotionRule {
|
|||
String warehouseFilter = "M_PromotionPreCondition.M_Warehouse_ID IS NULL OR M_PromotionPreCondition.M_Warehouse_ID = ?";
|
||||
String dateFilter = "M_PromotionPreCondition.StartDate <= ? AND (M_PromotionPreCondition.EndDate >= ? OR M_PromotionPreCondition.EndDate IS NULL)";
|
||||
|
||||
//optional promotion code filter
|
||||
String promotionCode = (String)order.get_Value("PromotionCode");
|
||||
|
||||
StringBuffer sql = new StringBuffer();
|
||||
|
@ -341,6 +345,15 @@ public class PromotionRule {
|
|||
} else {
|
||||
sql.append(" AND (M_PromotionPreCondition.PromotionCode IS NULL)");
|
||||
}
|
||||
|
||||
//optional activity filter
|
||||
int C_Activity_ID = order.getC_Activity_ID();
|
||||
if (C_Activity_ID > 0) {
|
||||
sql.append(" AND (M_PromotionPreCondition.C_Activity_ID = ? OR M_PromotionPreCondition.C_Activity_ID IS NULL)");
|
||||
} else {
|
||||
sql.append(" AND (M_PromotionPreCondition.C_Activity_ID IS NULL)");
|
||||
}
|
||||
|
||||
sql.append(" AND (M_Promotion.AD_Client_ID in (0, ?))")
|
||||
.append(" AND (M_Promotion.AD_Org_ID in (0, ?))")
|
||||
.append(" AND (M_Promotion.IsActive = 'Y')")
|
||||
|
@ -363,6 +376,9 @@ public class PromotionRule {
|
|||
if (promotionCode != null && promotionCode.trim().length() > 0) {
|
||||
stmt.setString(pindex++, promotionCode);
|
||||
}
|
||||
if (C_Activity_ID > 0) {
|
||||
stmt.setInt(pindex++, C_Activity_ID);
|
||||
}
|
||||
stmt.setInt(pindex++, order.getAD_Client_ID());
|
||||
stmt.setInt(pindex++, order.getAD_Org_ID());
|
||||
rs = stmt.executeQuery();
|
||||
|
|
|
@ -17,8 +17,10 @@
|
|||
/** Generated Model - DO NOT CHANGE */
|
||||
package org.adempiere.model;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
|
@ -31,7 +33,7 @@ public class X_M_Promotion extends PO implements I_M_Promotion, I_Persistent
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20081221L;
|
||||
private static final long serialVersionUID = 20090729L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_M_Promotion (Properties ctx, int M_Promotion_ID, String trxName)
|
||||
|
@ -74,6 +76,45 @@ public class X_M_Promotion extends PO implements I_M_Promotion, I_Persistent
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
public I_C_Campaign getC_Campaign() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Campaign.Table_Name);
|
||||
I_C_Campaign result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Campaign.
|
||||
@param C_Campaign_ID
|
||||
Marketing Campaign
|
||||
*/
|
||||
public void setC_Campaign_ID (int C_Campaign_ID)
|
||||
{
|
||||
if (C_Campaign_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Campaign_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID));
|
||||
}
|
||||
|
||||
/** Get Campaign.
|
||||
@return Marketing Campaign
|
||||
*/
|
||||
public int getC_Campaign_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Description.
|
||||
@param Description
|
||||
Optional short description of the record
|
||||
|
|
|
@ -33,7 +33,7 @@ public class X_M_PromotionPreCondition extends PO implements I_M_PromotionPreCon
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20081221L;
|
||||
private static final long serialVersionUID = 20090729L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_M_PromotionPreCondition (Properties ctx, int M_PromotionPreCondition_ID, String trxName)
|
||||
|
@ -77,6 +77,45 @@ public class X_M_PromotionPreCondition extends PO implements I_M_PromotionPreCon
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
public I_C_Activity getC_Activity() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Activity.Table_Name);
|
||||
I_C_Activity result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Activity.
|
||||
@param C_Activity_ID
|
||||
Business Activity
|
||||
*/
|
||||
public void setC_Activity_ID (int C_Activity_ID)
|
||||
{
|
||||
if (C_Activity_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Activity_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID));
|
||||
}
|
||||
|
||||
/** Get Activity.
|
||||
@return Business Activity
|
||||
*/
|
||||
public int getC_Activity_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_BP_Group getC_BP_Group() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_BP_Group.Table_Name);
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
-- Jul 29, 2009 3:33:32 PM MYT
|
||||
-- FR[2828826] Add optional marketing campaign to promotion
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,57951,550,0,19,53178,'C_Campaign_ID',TO_DATE('2009-07-29 15:33:30','YYYY-MM-DD HH24:MI:SS'),100,'Marketing Campaign','D',22,'The Campaign defines a unique marketing program. Projects can be associated with a pre defined Marketing Campaign. You can then report based on a specific Campaign.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Campaign',0,TO_DATE('2009-07-29 15:33:30','YYYY-MM-DD HH24:MI:SS'),100,1.000000000000)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 3:33:32 PM MYT
|
||||
-- FR[2828826] Add optional marketing campaign to promotion
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=57951 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 3:33:38 PM MYT
|
||||
-- FR[2828826] Add optional marketing campaign to promotion
|
||||
ALTER TABLE M_Promotion ADD C_Campaign_ID NUMBER(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 3:35:03 PM MYT
|
||||
-- FR[2828826] Add optional marketing campaign to promotion
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,57951,57377,0,53203,TO_DATE('2009-07-29 15:34:56','YYYY-MM-DD HH24:MI:SS'),100,'Marketing Campaign',14,'D','The Campaign defines a unique marketing program. Projects can be associated with a pre defined Marketing Campaign. You can then report based on a specific Campaign.','Y','Y','Y','N','N','N','N','N','Campaign',70,0,TO_DATE('2009-07-29 15:34:56','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 3:35:03 PM MYT
|
||||
-- FR[2828826] Add optional marketing campaign to promotion
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=57377 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
-- Jul 29, 2009 5:19:30 PM MYT
|
||||
-- FR[2828878] Add optional activity filter to Promotion
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,57952,1005,0,19,53180,'C_Activity_ID',TO_DATE('2009-07-29 17:19:28','YYYY-MM-DD HH24:MI:SS'),100,'Business Activity','D',22,'Activities indicate tasks that are performed and used to utilize Activity based Costing','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Activity',0,TO_DATE('2009-07-29 17:19:28','YYYY-MM-DD HH24:MI:SS'),100,1.000000000000)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 5:19:30 PM MYT
|
||||
-- FR[2828878] Add optional activity filter to Promotion
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=57952 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 5:19:35 PM MYT
|
||||
-- FR[2828878] Add optional activity filter to Promotion
|
||||
ALTER TABLE M_PromotionPreCondition ADD C_Activity_ID NUMBER(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 5:20:23 PM MYT
|
||||
-- FR[2828878] Add optional activity filter to Promotion
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,57952,57378,0,53204,TO_DATE('2009-07-29 17:20:22','YYYY-MM-DD HH24:MI:SS'),100,'Business Activity',14,'D','Activities indicate tasks that are performed and used to utilize Activity based Costing','Y','Y','Y','N','N','N','N','N','Activity',150,0,TO_DATE('2009-07-29 17:20:22','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 5:20:24 PM MYT
|
||||
-- FR[2828878] Add optional activity filter to Promotion
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=57378 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
-- Jul 29, 2009 3:33:32 PM MYT
|
||||
-- FR[2828826] Add optional marketing campaign to promotion
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,57951,550,0,19,53178,'C_Campaign_ID',TO_TIMESTAMP('2009-07-29 15:33:30','YYYY-MM-DD HH24:MI:SS'),100,'Marketing Campaign','D',22,'The Campaign defines a unique marketing program. Projects can be associated with a pre defined Marketing Campaign. You can then report based on a specific Campaign.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Campaign',0,TO_TIMESTAMP('2009-07-29 15:33:30','YYYY-MM-DD HH24:MI:SS'),100,1.000000000000)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 3:33:32 PM MYT
|
||||
-- FR[2828826] Add optional marketing campaign to promotion
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=57951 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 3:33:38 PM MYT
|
||||
-- FR[2828826] Add optional marketing campaign to promotion
|
||||
ALTER TABLE M_Promotion ADD COLUMN C_Campaign_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 3:35:03 PM MYT
|
||||
-- FR[2828826] Add optional marketing campaign to promotion
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,57951,57377,0,53203,TO_TIMESTAMP('2009-07-29 15:34:56','YYYY-MM-DD HH24:MI:SS'),100,'Marketing Campaign',14,'D','The Campaign defines a unique marketing program. Projects can be associated with a pre defined Marketing Campaign. You can then report based on a specific Campaign.','Y','Y','Y','N','N','N','N','N','Campaign',70,0,TO_TIMESTAMP('2009-07-29 15:34:56','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 3:35:03 PM MYT
|
||||
-- FR[2828826] Add optional marketing campaign to promotion
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=57377 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
-- Jul 29, 2009 5:19:30 PM MYT
|
||||
-- FR[2828878] Add optional activity filter to Promotion
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,57952,1005,0,19,53180,'C_Activity_ID',TO_TIMESTAMP('2009-07-29 17:19:28','YYYY-MM-DD HH24:MI:SS'),100,'Business Activity','D',22,'Activities indicate tasks that are performed and used to utilize Activity based Costing','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Activity',0,TO_TIMESTAMP('2009-07-29 17:19:28','YYYY-MM-DD HH24:MI:SS'),100,1.000000000000)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 5:19:30 PM MYT
|
||||
-- FR[2828878] Add optional activity filter to Promotion
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=57952 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 5:19:35 PM MYT
|
||||
-- FR[2828878] Add optional activity filter to Promotion
|
||||
ALTER TABLE M_PromotionPreCondition ADD COLUMN C_Activity_ID NUMERIC(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 5:20:23 PM MYT
|
||||
-- FR[2828878] Add optional activity filter to Promotion
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,57952,57378,0,53204,TO_TIMESTAMP('2009-07-29 17:20:22','YYYY-MM-DD HH24:MI:SS'),100,'Business Activity',14,'D','Activities indicate tasks that are performed and used to utilize Activity based Costing','Y','Y','Y','N','N','N','N','N','Activity',150,0,TO_TIMESTAMP('2009-07-29 17:20:22','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- Jul 29, 2009 5:20:24 PM MYT
|
||||
-- FR[2828878] Add optional activity filter to Promotion
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=57378 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
COMMIT;
|
||||
|
Loading…
Reference in New Issue