FR 2962094 - Finish implementation of weighted average costing

1st step -> create column to manage the processed date+time (in order to allow reposting of documents in the same order they were completed - this will be the second step)
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2962094
This commit is contained in:
Carlos Ruiz 2010-03-03 01:31:36 +00:00
parent 5fdefd4be3
commit dfe03fabfa
43 changed files with 2134 additions and 80 deletions

View File

@ -262,6 +262,19 @@ public interface I_C_AllocationHdr
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -297,6 +297,19 @@ public interface I_C_BankStatement
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -307,6 +307,19 @@ public interface I_C_Cash
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -486,10 +486,10 @@ public interface I_C_Invoice
/** Column name DunningGrace */
public static final String COLUMNNAME_DunningGrace = "DunningGrace";
/** Set Dunning Grace */
/** Set Dunning Grace Date */
public void setDunningGrace (Timestamp DunningGrace);
/** Get Dunning Grace */
/** Get Dunning Grace Date */
public Timestamp getDunningGrace();
/** Column name GenerateTo */
@ -756,6 +756,19 @@ public interface I_C_Invoice
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -895,10 +895,14 @@ public interface I_C_Order
/** Column name OrderType */
public static final String COLUMNNAME_OrderType = "OrderType";
/** Set OrderType */
/** Set Order Type.
* Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition)
*/
public void setOrderType (String OrderType);
/** Get OrderType */
/** Get Order Type.
* Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition)
*/
public String getOrderType();
/** Column name Pay_BPartner_ID */
@ -992,6 +996,19 @@ public interface I_C_Order
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -860,6 +860,19 @@ public interface I_C_Payment
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -257,6 +257,19 @@ public interface I_C_ProjectIssue
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -393,6 +393,19 @@ public interface I_GL_Journal
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -752,6 +752,19 @@ public interface I_M_InOut
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -337,6 +337,19 @@ public interface I_M_Inventory
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -242,6 +242,19 @@ public interface I_M_MatchInv
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -283,6 +283,19 @@ public interface I_M_MatchPO
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -510,6 +510,19 @@ public interface I_M_Movement
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -236,6 +236,19 @@ public interface I_M_Production
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -307,6 +307,19 @@ public interface I_M_Requisition
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -684,7 +684,7 @@ public abstract class PO
value = Integer.parseInt((String)value);
}
}
return set_Value (index, value);
} // setValue
@ -721,6 +721,7 @@ public abstract class PO
log.log(Level.WARNING, "Virtual Column" + colInfo);
return false;
}
//
// globalqss -- Bug 1618469 - is throwing not updateable even on new records
// if (!p_info.isColumnUpdateable(index))
@ -818,9 +819,36 @@ public abstract class PO
log.finest(ColumnName + " = " + m_newValues[index] + " (OldValue="+m_oldValues[index]+")");
}
set_Keys (ColumnName, m_newValues[index]);
// FR 2962094 Fill ProcessedOn when the Processed column is changing from N to Y
setProcessedOn(ColumnName, value, m_oldValues[index]);
return true;
} // setValue
/* FR 2962094 - Finish implementation of weighted average costing
Fill the column ProcessedOn (if it exists) with a bigdecimal representation of current timestamp (with nanoseconds)
*/
private void setProcessedOn(String ColumnName, Object value, Object oldValue) {
if ("Processed".equals(ColumnName)
&& value instanceof Boolean
&& ((Boolean)value).booleanValue() == true
&& (oldValue == null
|| (oldValue instanceof Boolean
&& ((Boolean)oldValue).booleanValue() == false))) {
if (get_ColumnIndex("ProcessedOn") > 0) {
// fill processed on column
//get current time from db
Timestamp ts = DB.getSQLValueTS(null, "SELECT CURRENT_TIMESTAMP FROM DUAL");
long mili = ts.getTime();
int nano = ts.getNanos();
double doublets = Double.parseDouble(Long.toString(mili) + "." + Integer.toString(nano));
BigDecimal bdtimestamp = new BigDecimal(doublets);
set_Value("ProcessedOn", bdtimestamp);
}
}
}
/**
* Set Value w/o check (update, r/o, ..).
* Used when Column is R/O
@ -895,6 +923,10 @@ public abstract class PO
log.finest(ColumnName + " = " + m_newValues[index]
+ " (" + (m_newValues[index]==null ? "-" : m_newValues[index].getClass().getName()) + ")");
set_Keys (ColumnName, m_newValues[index]);
// FR 2962094 Fill ProcessedOn when the Processed column is changing from N to Y
setProcessedOn(ColumnName, value, m_oldValues[index]);
return true;
} // set_ValueNoCheck

View File

@ -33,7 +33,7 @@ public class X_C_AllocationHdr extends PO implements I_C_AllocationHdr, I_Persis
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_C_AllocationHdr (Properties ctx, int C_AllocationHdr_ID, String trxName)
@ -421,6 +421,26 @@ public class X_C_AllocationHdr extends PO implements I_C_AllocationHdr, I_Persis
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_C_BankStatement extends PO implements I_C_BankStatement, I_Persis
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_C_BankStatement (Properties ctx, int C_BankStatement_ID, String trxName)
@ -476,6 +476,26 @@ public class X_C_BankStatement extends PO implements I_C_BankStatement, I_Persis
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_C_Cash extends PO implements I_C_Cash, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_C_Cash (Properties ctx, int C_Cash_ID, String trxName)
@ -511,6 +511,26 @@ public class X_C_Cash extends PO implements I_C_Cash, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_C_Invoice extends PO implements I_C_Invoice, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_C_Invoice (Properties ctx, int C_Invoice_ID, String trxName)
@ -859,15 +859,15 @@ public class X_C_Invoice extends PO implements I_C_Invoice, I_Persistent
return new KeyNamePair(get_ID(), getDocumentNo());
}
/** Set Dunning Grace.
@param DunningGrace Dunning Grace */
/** Set Dunning Grace Date.
@param DunningGrace Dunning Grace Date */
public void setDunningGrace (Timestamp DunningGrace)
{
set_Value (COLUMNNAME_DunningGrace, DunningGrace);
}
/** Get Dunning Grace.
@return Dunning Grace */
/** Get Dunning Grace Date.
@return Dunning Grace Date */
public Timestamp getDunningGrace ()
{
return (Timestamp)get_Value(COLUMNNAME_DunningGrace);
@ -1333,6 +1333,26 @@ public class X_C_Invoice extends PO implements I_C_Invoice, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20091216L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_C_Order (Properties ctx, int C_Order_ID, String trxName)
@ -1637,15 +1637,18 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
return ii.intValue();
}
/** Set OrderType.
@param OrderType OrderType */
/** Set Order Type.
@param OrderType
Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition)
*/
public void setOrderType (String OrderType)
{
set_Value (COLUMNNAME_OrderType, OrderType);
}
/** Get OrderType.
@return OrderType */
/** Get Order Type.
@return Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition)
*/
public String getOrderType ()
{
return (String)get_Value(COLUMNNAME_OrderType);
@ -1826,6 +1829,26 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_C_Payment extends PO implements I_C_Payment, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_C_Payment (Properties ctx, int C_Payment_ID, String trxName)
@ -1418,6 +1418,26 @@ public class X_C_Payment extends PO implements I_C_Payment, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_C_ProjectIssue extends PO implements I_C_ProjectIssue, I_Persiste
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_C_ProjectIssue (Properties ctx, int C_ProjectIssue_ID, String trxName)
@ -377,6 +377,26 @@ public class X_C_ProjectIssue extends PO implements I_C_ProjectIssue, I_Persiste
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_GL_Journal (Properties ctx, int GL_Journal_ID, String trxName)
@ -689,6 +689,26 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_M_InOut (Properties ctx, int M_InOut_ID, String trxName)
@ -1325,6 +1325,26 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_M_Inventory extends PO implements I_M_Inventory, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_M_Inventory (Properties ctx, int M_Inventory_ID, String trxName)
@ -559,6 +559,26 @@ public class X_M_Inventory extends PO implements I_M_Inventory, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_M_MatchInv extends PO implements I_M_MatchInv, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_M_MatchInv (Properties ctx, int M_MatchInv_ID, String trxName)
@ -341,6 +341,26 @@ public class X_M_MatchInv extends PO implements I_M_MatchInv, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_M_MatchPO extends PO implements I_M_MatchPO, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_M_MatchPO (Properties ctx, int M_MatchPO_ID, String trxName)
@ -413,6 +413,26 @@ public class X_M_MatchPO extends PO implements I_M_MatchPO, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_M_Movement extends PO implements I_M_Movement, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_M_Movement (Properties ctx, int M_Movement_ID, String trxName)
@ -882,6 +882,26 @@ public class X_M_Movement extends PO implements I_M_Movement, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -17,9 +17,11 @@
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for M_Production
@ -31,7 +33,7 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_M_Production (Properties ctx, int M_Production_ID, String trxName)
@ -335,6 +337,26 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -33,7 +33,7 @@ public class X_M_Requisition extends PO implements I_M_Requisition, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_M_Requisition (Properties ctx, int M_Requisition_ID, String trxName)
@ -513,6 +513,26 @@ public class X_M_Requisition extends PO implements I_M_Requisition, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -681,6 +681,19 @@ public interface I_DD_Order
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -365,6 +365,19 @@ public interface I_HR_Process
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -134,6 +134,8 @@ public interface I_PP_Cost_Collector
*/
public int getC_DocType_ID();
public I_C_DocType getC_DocType() throws RuntimeException;
/** Column name C_DocTypeTarget_ID */
public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID";
@ -435,10 +437,14 @@ public interface I_PP_Cost_Collector
/** Column name PP_Order_ID */
public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID";
/** Set Manufacturing Order */
/** Set Manufacturing Order.
* Manufacturing Order
*/
public void setPP_Order_ID (int PP_Order_ID);
/** Get Manufacturing Order */
/** Get Manufacturing Order.
* Manufacturing Order
*/
public int getPP_Order_ID();
public org.eevolution.model.I_PP_Order getPP_Order() throws RuntimeException;
@ -446,10 +452,14 @@ public interface I_PP_Cost_Collector
/** Column name PP_Order_Node_ID */
public static final String COLUMNNAME_PP_Order_Node_ID = "PP_Order_Node_ID";
/** Set Manufacturing Order Activity */
/** Set Manufacturing Order Activity.
* Workflow Node (activity), step or process
*/
public void setPP_Order_Node_ID (int PP_Order_Node_ID);
/** Get Manufacturing Order Activity */
/** Get Manufacturing Order Activity.
* Workflow Node (activity), step or process
*/
public int getPP_Order_Node_ID();
public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws RuntimeException;
@ -478,6 +488,19 @@ public interface I_PP_Cost_Collector
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";

View File

@ -241,10 +241,14 @@ public interface I_PP_Order
/** Column name DateConfirm */
public static final String COLUMNNAME_DateConfirm = "DateConfirm";
/** Set DateConfirm */
/** Set DateConfirm.
* Date Confirm of this Order
*/
public void setDateConfirm (Timestamp DateConfirm);
/** Get DateConfirm */
/** Get DateConfirm.
* Date Confirm of this Order
*/
public Timestamp getDateConfirm();
/** Column name DateDelivered */
@ -276,10 +280,14 @@ public interface I_PP_Order
/** Column name DateFinishSchedule */
public static final String COLUMNNAME_DateFinishSchedule = "DateFinishSchedule";
/** Set DateFinishSchedule */
/** Set Date Finish Schedule.
* Scheduled Finish date for this Order
*/
public void setDateFinishSchedule (Timestamp DateFinishSchedule);
/** Get DateFinishSchedule */
/** Get Date Finish Schedule.
* Scheduled Finish date for this Order
*/
public Timestamp getDateFinishSchedule();
/** Column name DateOrdered */
@ -311,19 +319,27 @@ public interface I_PP_Order
/** Column name DateStart */
public static final String COLUMNNAME_DateStart = "DateStart";
/** Set DateStart */
/** Set Date Start.
* Date Start for this Order
*/
public void setDateStart (Timestamp DateStart);
/** Get DateStart */
/** Get Date Start.
* Date Start for this Order
*/
public Timestamp getDateStart();
/** Column name DateStartSchedule */
public static final String COLUMNNAME_DateStartSchedule = "DateStartSchedule";
/** Set DateStartSchedule */
/** Set Date Start Schedule.
* Scheduled start date for this Order
*/
public void setDateStartSchedule (Timestamp DateStartSchedule);
/** Get DateStartSchedule */
/** Get Date Start Schedule.
* Scheduled start date for this Order
*/
public Timestamp getDateStartSchedule();
/** Column name Description */
@ -544,10 +560,14 @@ public interface I_PP_Order
/** Column name OrderType */
public static final String COLUMNNAME_OrderType = "OrderType";
/** Set OrderType */
/** Set Order Type.
* Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition)
*/
public void setOrderType (String OrderType);
/** Get OrderType */
/** Get Order Type.
* Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition)
*/
public String getOrderType();
/** Column name Planner_ID */
@ -577,10 +597,14 @@ public interface I_PP_Order
/** Column name PP_Order_ID */
public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID";
/** Set Manufacturing Order */
/** Set Manufacturing Order.
* Manufacturing Order
*/
public void setPP_Order_ID (int PP_Order_ID);
/** Get Manufacturing Order */
/** Get Manufacturing Order.
* Manufacturing Order
*/
public int getPP_Order_ID();
/** Column name PP_Product_BOM_ID */
@ -624,6 +648,19 @@ public interface I_PP_Order
*/
public boolean isProcessed();
/** Column name ProcessedOn */
public static final String COLUMNNAME_ProcessedOn = "ProcessedOn";
/** Set Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn);
/** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
@ -715,13 +752,13 @@ public interface I_PP_Order
/** Column name QtyScrap */
public static final String COLUMNNAME_QtyScrap = "QtyScrap";
/** Set QtyScrap.
* Scrap Quantity for this componet
/** Set Scrap %.
* Scrap % Quantity for this componet
*/
public void setQtyScrap (BigDecimal QtyScrap);
/** Get QtyScrap.
* Scrap Quantity for this componet
/** Get Scrap %.
* Scrap % Quantity for this componet
*/
public BigDecimal getQtyScrap();

View File

@ -34,7 +34,7 @@ public class X_DD_Order extends PO implements I_DD_Order, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_DD_Order (Properties ctx, int DD_Order_ID, String trxName)
@ -43,7 +43,12 @@ public class X_DD_Order extends PO implements I_DD_Order, I_Persistent
/** if (DD_Order_ID == 0)
{
setC_BPartner_ID (0);
setC_BPartner_Location_ID (0);
setC_DocType_ID (0);
setDateOrdered (new Timestamp( System.currentTimeMillis() ));
// @#Date@
setDatePromised (new Timestamp( System.currentTimeMillis() ));
// @#Date@
setDD_Order_ID (0);
setDeliveryRule (null);
// A
@ -1186,6 +1191,26 @@ public class X_DD_Order extends PO implements I_DD_Order, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -17,10 +17,12 @@
/** Generated Model - DO NOT CHANGE */
package org.eevolution.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.model.*;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for HR_Process
@ -32,7 +34,7 @@ public class X_HR_Process extends PO implements I_HR_Process, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_HR_Process (Properties ctx, int HR_Process_ID, String trxName)
@ -639,6 +641,26 @@ public class X_HR_Process extends PO implements I_HR_Process, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -34,7 +34,7 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_PP_Cost_Collector (Properties ctx, int PP_Cost_Collector_ID, String trxName)
@ -198,6 +198,11 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
return ii.intValue();
}
public I_C_DocType getC_DocType() throws RuntimeException
{
return (I_C_DocType)MTable.get(getCtx(), I_C_DocType.Table_Name)
.getPO(getC_DocType_ID(), get_TrxName()); }
/** Set Document Type.
@param C_DocType_ID
Document type or rules
@ -773,7 +778,9 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
.getPO(getPP_Order_ID(), get_TrxName()); }
/** Set Manufacturing Order.
@param PP_Order_ID Manufacturing Order */
@param PP_Order_ID
Manufacturing Order
*/
public void setPP_Order_ID (int PP_Order_ID)
{
if (PP_Order_ID < 1)
@ -783,7 +790,8 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
}
/** Get Manufacturing Order.
@return Manufacturing Order */
@return Manufacturing Order
*/
public int getPP_Order_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID);
@ -798,7 +806,9 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
.getPO(getPP_Order_Node_ID(), get_TrxName()); }
/** Set Manufacturing Order Activity.
@param PP_Order_Node_ID Manufacturing Order Activity */
@param PP_Order_Node_ID
Workflow Node (activity), step or process
*/
public void setPP_Order_Node_ID (int PP_Order_Node_ID)
{
if (PP_Order_Node_ID < 1)
@ -808,7 +818,8 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
}
/** Get Manufacturing Order Activity.
@return Manufacturing Order Activity */
@return Workflow Node (activity), step or process
*/
public int getPP_Order_Node_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_ID);
@ -866,6 +877,26 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)

View File

@ -34,7 +34,7 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent
/**
*
*/
private static final long serialVersionUID = 20090915L;
private static final long serialVersionUID = 20100302L;
/** Standard Constructor */
public X_PP_Order (Properties ctx, int PP_Order_ID, String trxName)
@ -400,14 +400,17 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent
}
/** Set DateConfirm.
@param DateConfirm DateConfirm */
@param DateConfirm
Date Confirm of this Order
*/
public void setDateConfirm (Timestamp DateConfirm)
{
set_ValueNoCheck (COLUMNNAME_DateConfirm, DateConfirm);
}
/** Get DateConfirm.
@return DateConfirm */
@return Date Confirm of this Order
*/
public Timestamp getDateConfirm ()
{
return (Timestamp)get_Value(COLUMNNAME_DateConfirm);
@ -447,15 +450,18 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent
return (Timestamp)get_Value(COLUMNNAME_DateFinish);
}
/** Set DateFinishSchedule.
@param DateFinishSchedule DateFinishSchedule */
/** Set Date Finish Schedule.
@param DateFinishSchedule
Scheduled Finish date for this Order
*/
public void setDateFinishSchedule (Timestamp DateFinishSchedule)
{
set_Value (COLUMNNAME_DateFinishSchedule, DateFinishSchedule);
}
/** Get DateFinishSchedule.
@return DateFinishSchedule */
/** Get Date Finish Schedule.
@return Scheduled Finish date for this Order
*/
public Timestamp getDateFinishSchedule ()
{
return (Timestamp)get_Value(COLUMNNAME_DateFinishSchedule);
@ -495,29 +501,35 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent
return (Timestamp)get_Value(COLUMNNAME_DatePromised);
}
/** Set DateStart.
@param DateStart DateStart */
/** Set Date Start.
@param DateStart
Date Start for this Order
*/
public void setDateStart (Timestamp DateStart)
{
set_ValueNoCheck (COLUMNNAME_DateStart, DateStart);
}
/** Get DateStart.
@return DateStart */
/** Get Date Start.
@return Date Start for this Order
*/
public Timestamp getDateStart ()
{
return (Timestamp)get_Value(COLUMNNAME_DateStart);
}
/** Set DateStartSchedule.
@param DateStartSchedule DateStartSchedule */
/** Set Date Start Schedule.
@param DateStartSchedule
Scheduled start date for this Order
*/
public void setDateStartSchedule (Timestamp DateStartSchedule)
{
set_Value (COLUMNNAME_DateStartSchedule, DateStartSchedule);
}
/** Get DateStartSchedule.
@return DateStartSchedule */
/** Get Date Start Schedule.
@return Scheduled start date for this Order
*/
public Timestamp getDateStartSchedule ()
{
return (Timestamp)get_Value(COLUMNNAME_DateStartSchedule);
@ -929,15 +941,18 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent
return ii.intValue();
}
/** Set OrderType.
@param OrderType OrderType */
/** Set Order Type.
@param OrderType
Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition)
*/
public void setOrderType (String OrderType)
{
set_Value (COLUMNNAME_OrderType, OrderType);
}
/** Get OrderType.
@return OrderType */
/** Get Order Type.
@return Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition)
*/
public String getOrderType ()
{
return (String)get_Value(COLUMNNAME_OrderType);
@ -993,7 +1008,9 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent
}
/** Set Manufacturing Order.
@param PP_Order_ID Manufacturing Order */
@param PP_Order_ID
Manufacturing Order
*/
public void setPP_Order_ID (int PP_Order_ID)
{
if (PP_Order_ID < 1)
@ -1003,7 +1020,8 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent
}
/** Get Manufacturing Order.
@return Manufacturing Order */
@return Manufacturing Order
*/
public int getPP_Order_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID);
@ -1094,6 +1112,26 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent
return false;
}
/** Set Processed On.
@param ProcessedOn
The date+time (expressed in decimal format) when the document has been processed
*/
public void setProcessedOn (BigDecimal ProcessedOn)
{
set_Value (COLUMNNAME_ProcessedOn, ProcessedOn);
}
/** Get Processed On.
@return The date+time (expressed in decimal format) when the document has been processed
*/
public BigDecimal getProcessedOn ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
@ -1246,17 +1284,17 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent
return bd;
}
/** Set QtyScrap.
/** Set Scrap %.
@param QtyScrap
Scrap Quantity for this componet
Scrap % Quantity for this componet
*/
public void setQtyScrap (BigDecimal QtyScrap)
{
set_Value (COLUMNNAME_QtyScrap, QtyScrap);
}
/** Get QtyScrap.
@return Scrap Quantity for this componet
/** Get Scrap %.
@return Scrap % Quantity for this componet
*/
public BigDecimal getQtyScrap ()
{

View File

@ -0,0 +1,237 @@
-- Mar 2, 2010 2:06:30 PM COT
-- FR_2962094_Finish implementation of weighted average costing
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54128,0,'ProcessedOn',TO_DATE('2010-03-02 14:06:28','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D','The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','Processed On','Processed On',TO_DATE('2010-03-02 14:06:28','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 2, 2010 2:06:30 PM COT
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54128 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Mar 2, 2010 2:08:58 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59034,54128,0,22,735,'ProcessedOn',TO_DATE('2010-03-02 14:08:57','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:08:57','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:08:58 PM COT
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=59034 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:09:03 PM COT
ALTER TABLE C_AllocationHdr ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:09:54 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59035,54128,0,22,392,'ProcessedOn',TO_DATE('2010-03-02 14:09:54','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:09:54','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:09:54 PM COT
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=59035 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:09:56 PM COT
ALTER TABLE C_BankStatement ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:10:39 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59036,54128,0,22,407,'ProcessedOn',TO_DATE('2010-03-02 14:10:38','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:10:38','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:10:39 PM COT
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=59036 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:10:42 PM COT
ALTER TABLE C_Cash ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:11:19 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59037,54128,0,22,318,'ProcessedOn',TO_DATE('2010-03-02 14:11:19','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:11:19','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:11:19 PM COT
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=59037 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:11:22 PM COT
ALTER TABLE C_Invoice ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:11:48 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59038,54128,0,22,259,'ProcessedOn',TO_DATE('2010-03-02 14:11:48','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:11:48','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:11:48 PM COT
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=59038 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:11:51 PM COT
ALTER TABLE C_Order ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:12:19 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59039,54128,0,22,335,'ProcessedOn',TO_DATE('2010-03-02 14:12:15','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:12:15','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:12:19 PM COT
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=59039 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:12:22 PM COT
ALTER TABLE C_Payment ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:12:53 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59040,54128,0,22,623,'ProcessedOn',TO_DATE('2010-03-02 14:12:52','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:12:52','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:12:53 PM COT
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=59040 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:12:55 PM COT
ALTER TABLE C_ProjectIssue ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:13:31 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59041,54128,0,22,53037,'ProcessedOn',TO_DATE('2010-03-02 14:13:31','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:13:31','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:13:31 PM COT
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=59041 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:13:34 PM COT
ALTER TABLE DD_Order ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:13:58 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59042,54128,0,22,224,'ProcessedOn',TO_DATE('2010-03-02 14:13:57','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:13:57','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:13:58 PM COT
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=59042 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:14:00 PM COT
ALTER TABLE GL_Journal ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:14:24 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59043,54128,0,22,53092,'ProcessedOn',TO_DATE('2010-03-02 14:14:24','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:14:24','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:14:24 PM COT
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=59043 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:14:36 PM COT
ALTER TABLE HR_Process ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:15:02 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59044,54128,0,22,319,'ProcessedOn',TO_DATE('2010-03-02 14:15:00','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:15:00','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:15:02 PM COT
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=59044 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:15:05 PM COT
ALTER TABLE M_InOut ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:15:29 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59045,54128,0,22,321,'ProcessedOn',TO_DATE('2010-03-02 14:15:28','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:15:28','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:15:29 PM COT
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=59045 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:15:30 PM COT
ALTER TABLE M_Inventory ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:15:52 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59046,54128,0,22,472,'ProcessedOn',TO_DATE('2010-03-02 14:15:51','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:15:51','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:15:52 PM COT
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=59046 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:15:53 PM COT
ALTER TABLE M_MatchInv ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:16:16 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59047,54128,0,22,473,'ProcessedOn',TO_DATE('2010-03-02 14:16:15','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:16:15','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:16:16 PM COT
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=59047 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:16:17 PM COT
ALTER TABLE M_MatchPO ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:16:43 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59048,54128,0,22,323,'ProcessedOn',TO_DATE('2010-03-02 14:16:42','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:16:42','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:16:43 PM COT
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=59048 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:16:44 PM COT
ALTER TABLE M_Movement ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:17:09 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59049,54128,0,22,325,'ProcessedOn',TO_DATE('2010-03-02 14:17:09','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:17:09','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:17:09 PM COT
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=59049 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:17:11 PM COT
ALTER TABLE M_Production ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:17:33 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59050,54128,0,22,702,'ProcessedOn',TO_DATE('2010-03-02 14:17:33','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:17:33','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:17:33 PM COT
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=59050 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:17:35 PM COT
ALTER TABLE M_Requisition ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:18:10 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59051,54128,0,22,53035,'ProcessedOn',TO_DATE('2010-03-02 14:18:09','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:18:09','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:18:10 PM COT
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=59051 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:18:12 PM COT
ALTER TABLE PP_Cost_Collector ADD ProcessedOn NUMBER DEFAULT NULL
;
-- Mar 2, 2010 2:18:38 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59052,54128,0,22,53027,'ProcessedOn',TO_DATE('2010-03-02 14:18:38','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:18:38','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:18:38 PM COT
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=59052 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:18:40 PM COT
ALTER TABLE PP_Order ADD ProcessedOn NUMBER DEFAULT NULL
;

View File

@ -0,0 +1,421 @@
-- create temporary index
CREATE INDEX tmp_ad_wf_activity_speed ON ad_wf_activity(ad_table_id, record_id);
-- ****** SET ProcessedOn on table C_AllocationHdr ******
-- try to get the processed from ad_changelog
update C_AllocationHdr set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 735 and record_id = C_AllocationHdr.C_AllocationHdr_id and ad_column_id = 12309
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_AllocationHdr set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 735 and a.record_id = C_AllocationHdr.C_AllocationHdr_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_AllocationHdr set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_BankStatement ******
-- try to get the processed from ad_changelog
update C_BankStatement set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 392 and record_id = C_BankStatement.C_BankStatement_id and ad_column_id = 4924
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_BankStatement set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 392 and a.record_id = C_BankStatement.C_BankStatement_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_BankStatement set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_Cash ******
-- try to get the processed from ad_changelog
update C_Cash set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 407 and record_id = C_Cash.C_Cash_id and ad_column_id = 5258
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_Cash set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 407 and a.record_id = C_Cash.C_Cash_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_Cash set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_Invoice ******
-- try to get the processed from ad_changelog
update C_Invoice set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 318 and record_id = C_Invoice.C_Invoice_id and ad_column_id = 3497
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_Invoice set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 318 and a.record_id = C_Invoice.C_Invoice_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_Invoice set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_Order ******
-- try to get the processed from ad_changelog
update C_Order set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 259 and record_id = C_Order.C_Order_id and ad_column_id = 3398
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_Order set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 259 and a.record_id = C_Order.C_Order_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_Order set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_Payment ******
-- try to get the processed from ad_changelog
update C_Payment set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 335 and record_id = C_Payment.C_Payment_id and ad_column_id = 3878
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_Payment set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 335 and a.record_id = C_Payment.C_Payment_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_Payment set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_ProjectIssue ******
-- try to get the processed from ad_changelog
update C_ProjectIssue set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 623 and record_id = C_ProjectIssue.C_ProjectIssue_id and ad_column_id = 9842
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_ProjectIssue set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 623 and a.record_id = C_ProjectIssue.C_ProjectIssue_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_ProjectIssue set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table DD_Order ******
-- try to get the processed from ad_changelog
update DD_Order set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 53037 and record_id = DD_Order.DD_Order_id and ad_column_id = 53912
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update DD_Order set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 53037 and a.record_id = DD_Order.DD_Order_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update DD_Order set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table GL_Journal ******
-- try to get the processed from ad_changelog
update GL_Journal set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 224 and record_id = GL_Journal.GL_Journal_id and ad_column_id = 5953
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update GL_Journal set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 224 and a.record_id = GL_Journal.GL_Journal_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update GL_Journal set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table HR_Process ******
-- try to get the processed from ad_changelog
update HR_Process set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 53092 and record_id = HR_Process.HR_Process_id and ad_column_id = 54876
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update HR_Process set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 53092 and a.record_id = HR_Process.HR_Process_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update HR_Process set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_InOut ******
-- try to get the processed from ad_changelog
update M_InOut set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 319 and record_id = M_InOut.M_InOut_id and ad_column_id = 3518
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_InOut set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 319 and a.record_id = M_InOut.M_InOut_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_InOut set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_Inventory ******
-- try to get the processed from ad_changelog
update M_Inventory set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 321 and record_id = M_Inventory.M_Inventory_id and ad_column_id = 3553
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_Inventory set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 321 and a.record_id = M_Inventory.M_Inventory_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_Inventory set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_MatchInv ******
-- try to get the processed from ad_changelog
update M_MatchInv set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 472 and record_id = M_MatchInv.M_MatchInv_id and ad_column_id = 6511
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_MatchInv set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 472 and a.record_id = M_MatchInv.M_MatchInv_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_MatchInv set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_MatchPO ******
-- try to get the processed from ad_changelog
update M_MatchPO set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 473 and record_id = M_MatchPO.M_MatchPO_id and ad_column_id = 6527
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_MatchPO set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 473 and a.record_id = M_MatchPO.M_MatchPO_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_MatchPO set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_Movement ******
-- try to get the processed from ad_changelog
update M_Movement set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 323 and record_id = M_Movement.M_Movement_id and ad_column_id = 3580
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_Movement set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 323 and a.record_id = M_Movement.M_Movement_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_Movement set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_Production ******
-- try to get the processed from ad_changelog
update M_Production set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 325 and record_id = M_Production.M_Production_id and ad_column_id = 3609
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_Production set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 325 and a.record_id = M_Production.M_Production_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_Production set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_Requisition ******
-- try to get the processed from ad_changelog
update M_Requisition set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 702 and record_id = M_Requisition.M_Requisition_id and ad_column_id = 11473
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_Requisition set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 702 and a.record_id = M_Requisition.M_Requisition_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_Requisition set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table PP_Cost_Collector ******
-- try to get the processed from ad_changelog
update PP_Cost_Collector set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 53035 and record_id = PP_Cost_Collector.PP_Cost_Collector_id and ad_column_id = 53834
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update PP_Cost_Collector set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 53035 and a.record_id = PP_Cost_Collector.PP_Cost_Collector_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update PP_Cost_Collector set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table PP_Order ******
-- try to get the processed from ad_changelog
update PP_Order set processedon =
(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog
where ad_table_id = 53027 and record_id = PP_Order.PP_Order_id and ad_column_id = 53664
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update PP_Order set processedon =
(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 53027 and a.record_id = PP_Order.PP_Order_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update PP_Order set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000
where processedon is null and processed = 'Y';
-- drop temporary index
DROP INDEX tmp_ad_wf_activity_speed;

View File

@ -0,0 +1,237 @@
-- Mar 2, 2010 2:06:30 PM COT
-- FR_2962094_Finish implementation of weighted average costing
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54128,0,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:06:28','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D','The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','Processed On','Processed On',TO_TIMESTAMP('2010-03-02 14:06:28','YYYY-MM-DD HH24:MI:SS'),100)
;
-- Mar 2, 2010 2:06:30 PM COT
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54128 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Mar 2, 2010 2:08:58 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59034,54128,0,22,735,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:08:57','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:08:57','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:08:58 PM COT
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=59034 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:09:03 PM COT
ALTER TABLE C_AllocationHdr ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:09:54 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59035,54128,0,22,392,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:09:54','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:09:54','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:09:54 PM COT
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=59035 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:09:56 PM COT
ALTER TABLE C_BankStatement ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:10:39 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59036,54128,0,22,407,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:10:38','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:10:38','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:10:39 PM COT
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=59036 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:10:42 PM COT
ALTER TABLE C_Cash ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:11:19 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59037,54128,0,22,318,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:11:19','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:11:19','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:11:19 PM COT
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=59037 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:11:22 PM COT
ALTER TABLE C_Invoice ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:11:48 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59038,54128,0,22,259,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:11:48','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:11:48','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:11:48 PM COT
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=59038 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:11:51 PM COT
ALTER TABLE C_Order ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:12:19 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59039,54128,0,22,335,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:12:15','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:12:15','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:12:19 PM COT
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=59039 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:12:22 PM COT
ALTER TABLE C_Payment ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:12:53 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59040,54128,0,22,623,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:12:52','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:12:52','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:12:53 PM COT
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=59040 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:12:55 PM COT
ALTER TABLE C_ProjectIssue ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:13:31 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59041,54128,0,22,53037,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:13:31','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:13:31','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:13:31 PM COT
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=59041 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:13:34 PM COT
ALTER TABLE DD_Order ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:13:58 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59042,54128,0,22,224,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:13:57','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:13:57','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:13:58 PM COT
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=59042 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:14:00 PM COT
ALTER TABLE GL_Journal ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:14:24 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59043,54128,0,22,53092,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:14:24','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:14:24','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:14:24 PM COT
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=59043 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:14:36 PM COT
ALTER TABLE HR_Process ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:15:02 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59044,54128,0,22,319,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:15:00','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:15:00','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:15:02 PM COT
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=59044 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:15:05 PM COT
ALTER TABLE M_InOut ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:15:29 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59045,54128,0,22,321,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:15:28','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:15:28','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:15:29 PM COT
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=59045 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:15:30 PM COT
ALTER TABLE M_Inventory ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:15:52 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59046,54128,0,22,472,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:15:51','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:15:51','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:15:52 PM COT
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=59046 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:15:53 PM COT
ALTER TABLE M_MatchInv ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:16:16 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59047,54128,0,22,473,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:16:15','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:16:15','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:16:16 PM COT
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=59047 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:16:17 PM COT
ALTER TABLE M_MatchPO ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:16:43 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59048,54128,0,22,323,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:16:42','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:16:42','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:16:43 PM COT
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=59048 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:16:44 PM COT
ALTER TABLE M_Movement ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:17:09 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59049,54128,0,22,325,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:17:09','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:17:09','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:17:09 PM COT
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=59049 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:17:11 PM COT
ALTER TABLE M_Production ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:17:33 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59050,54128,0,22,702,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:17:33','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:17:33','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:17:33 PM COT
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=59050 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:17:35 PM COT
ALTER TABLE M_Requisition ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:18:10 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59051,54128,0,22,53035,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:18:09','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:18:09','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:18:10 PM COT
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=59051 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:18:12 PM COT
ALTER TABLE PP_Cost_Collector ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;
-- Mar 2, 2010 2:18:38 PM COT
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,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59052,54128,0,22,53027,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:18:38','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:18:38','YYYY-MM-DD HH24:MI:SS'),100,0)
;
-- Mar 2, 2010 2:18:38 PM COT
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=59052 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Mar 2, 2010 2:18:40 PM COT
ALTER TABLE PP_Order ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL
;

View File

@ -0,0 +1,421 @@
-- create temporary index
CREATE INDEX tmp_ad_wf_activity_speed ON ad_wf_activity(ad_table_id, record_id);
-- ****** SET ProcessedOn on table C_AllocationHdr ******
-- try to get the processed from ad_changelog
update C_AllocationHdr set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 735 and record_id = C_AllocationHdr.C_AllocationHdr_id and ad_column_id = 12309
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_AllocationHdr set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 735 and a.record_id = C_AllocationHdr.C_AllocationHdr_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_AllocationHdr set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_BankStatement ******
-- try to get the processed from ad_changelog
update C_BankStatement set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 392 and record_id = C_BankStatement.C_BankStatement_id and ad_column_id = 4924
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_BankStatement set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 392 and a.record_id = C_BankStatement.C_BankStatement_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_BankStatement set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_Cash ******
-- try to get the processed from ad_changelog
update C_Cash set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 407 and record_id = C_Cash.C_Cash_id and ad_column_id = 5258
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_Cash set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 407 and a.record_id = C_Cash.C_Cash_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_Cash set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_Invoice ******
-- try to get the processed from ad_changelog
update C_Invoice set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 318 and record_id = C_Invoice.C_Invoice_id and ad_column_id = 3497
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_Invoice set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 318 and a.record_id = C_Invoice.C_Invoice_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_Invoice set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_Order ******
-- try to get the processed from ad_changelog
update C_Order set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 259 and record_id = C_Order.C_Order_id and ad_column_id = 3398
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_Order set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 259 and a.record_id = C_Order.C_Order_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_Order set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_Payment ******
-- try to get the processed from ad_changelog
update C_Payment set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 335 and record_id = C_Payment.C_Payment_id and ad_column_id = 3878
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_Payment set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 335 and a.record_id = C_Payment.C_Payment_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_Payment set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table C_ProjectIssue ******
-- try to get the processed from ad_changelog
update C_ProjectIssue set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 623 and record_id = C_ProjectIssue.C_ProjectIssue_id and ad_column_id = 9842
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update C_ProjectIssue set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 623 and a.record_id = C_ProjectIssue.C_ProjectIssue_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update C_ProjectIssue set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table DD_Order ******
-- try to get the processed from ad_changelog
update DD_Order set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 53037 and record_id = DD_Order.DD_Order_id and ad_column_id = 53912
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update DD_Order set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 53037 and a.record_id = DD_Order.DD_Order_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update DD_Order set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table GL_Journal ******
-- try to get the processed from ad_changelog
update GL_Journal set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 224 and record_id = GL_Journal.GL_Journal_id and ad_column_id = 5953
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update GL_Journal set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 224 and a.record_id = GL_Journal.GL_Journal_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update GL_Journal set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table HR_Process ******
-- try to get the processed from ad_changelog
update HR_Process set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 53092 and record_id = HR_Process.HR_Process_id and ad_column_id = 54876
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update HR_Process set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 53092 and a.record_id = HR_Process.HR_Process_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update HR_Process set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_InOut ******
-- try to get the processed from ad_changelog
update M_InOut set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 319 and record_id = M_InOut.M_InOut_id and ad_column_id = 3518
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_InOut set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 319 and a.record_id = M_InOut.M_InOut_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_InOut set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_Inventory ******
-- try to get the processed from ad_changelog
update M_Inventory set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 321 and record_id = M_Inventory.M_Inventory_id and ad_column_id = 3553
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_Inventory set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 321 and a.record_id = M_Inventory.M_Inventory_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_Inventory set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_MatchInv ******
-- try to get the processed from ad_changelog
update M_MatchInv set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 472 and record_id = M_MatchInv.M_MatchInv_id and ad_column_id = 6511
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_MatchInv set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 472 and a.record_id = M_MatchInv.M_MatchInv_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_MatchInv set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_MatchPO ******
-- try to get the processed from ad_changelog
update M_MatchPO set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 473 and record_id = M_MatchPO.M_MatchPO_id and ad_column_id = 6527
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_MatchPO set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 473 and a.record_id = M_MatchPO.M_MatchPO_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_MatchPO set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_Movement ******
-- try to get the processed from ad_changelog
update M_Movement set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 323 and record_id = M_Movement.M_Movement_id and ad_column_id = 3580
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_Movement set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 323 and a.record_id = M_Movement.M_Movement_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_Movement set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_Production ******
-- try to get the processed from ad_changelog
update M_Production set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 325 and record_id = M_Production.M_Production_id and ad_column_id = 3609
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_Production set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 325 and a.record_id = M_Production.M_Production_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_Production set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table M_Requisition ******
-- try to get the processed from ad_changelog
update M_Requisition set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 702 and record_id = M_Requisition.M_Requisition_id and ad_column_id = 11473
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update M_Requisition set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 702 and a.record_id = M_Requisition.M_Requisition_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update M_Requisition set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table PP_Cost_Collector ******
-- try to get the processed from ad_changelog
update PP_Cost_Collector set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 53035 and record_id = PP_Cost_Collector.PP_Cost_Collector_id and ad_column_id = 53834
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update PP_Cost_Collector set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 53035 and a.record_id = PP_Cost_Collector.PP_Cost_Collector_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update PP_Cost_Collector set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- ****** SET ProcessedOn on table PP_Order ******
-- try to get the processed from ad_changelog
update PP_Order set processedon =
(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog
where ad_table_id = 53027 and record_id = PP_Order.PP_Order_id and ad_column_id = 53664
and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null))
where processedon is null and processed = 'Y';
-- if not then try to get the processed from ad_wf_activity
update PP_Order set processedon =
(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n
where a.ad_table_id = 53027 and a.record_id = PP_Order.PP_Order_id
and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC')
where processedon is null and processed = 'Y';
-- fallback to created date
update PP_Order set processedon = EXTRACT(EPOCH FROM created)*1000
where processedon is null and processed = 'Y';
-- drop temporary index
DROP INDEX tmp_ad_wf_activity_speed;