FR 1860642 - Enhance document numbering
This commit is contained in:
parent
5945691c36
commit
0a3a977925
|
@ -78,8 +78,9 @@ public interface Server
|
|||
* Get Document No based on Document Type
|
||||
* @param C_DocType_ID document type
|
||||
* @param trxName optional Transaction Name
|
||||
* @param definite is definite sequence
|
||||
* @return document no or null */
|
||||
public java.lang.String getDocumentNo( int C_DocType_ID,java.lang.String trxName )
|
||||
public java.lang.String getDocumentNo( int C_DocType_ID, java.lang.String trxName, boolean definite )
|
||||
throws java.rmi.RemoteException;
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.compiere.util.KeyNamePair;
|
|||
|
||||
/** Generated Interface for C_DocType
|
||||
* @author Trifon Trifonov (generated)
|
||||
* @version Release 3.3.1b
|
||||
* @version Release 3.3.1t
|
||||
*/
|
||||
public interface I_C_DocType
|
||||
{
|
||||
|
@ -136,6 +136,15 @@ public interface I_C_DocType
|
|||
*/
|
||||
public int getC_DocType_ID();
|
||||
|
||||
/** Column name DefiniteSequence_ID */
|
||||
public static final String COLUMNNAME_DefiniteSequence_ID = "DefiniteSequence_ID";
|
||||
|
||||
/** Set Definite Sequence */
|
||||
public void setDefiniteSequence_ID (int DefiniteSequence_ID);
|
||||
|
||||
/** Get Definite Sequence */
|
||||
public int getDefiniteSequence_ID();
|
||||
|
||||
/** Column name Description */
|
||||
public static final String COLUMNNAME_Description = "Description";
|
||||
|
||||
|
@ -333,6 +342,24 @@ public interface I_C_DocType
|
|||
*/
|
||||
public boolean isIndexed();
|
||||
|
||||
/** Column name IsOverwriteDateOnComplete */
|
||||
public static final String COLUMNNAME_IsOverwriteDateOnComplete = "IsOverwriteDateOnComplete";
|
||||
|
||||
/** Set Overwrite Date on Complete */
|
||||
public void setIsOverwriteDateOnComplete (boolean IsOverwriteDateOnComplete);
|
||||
|
||||
/** Get Overwrite Date on Complete */
|
||||
public boolean isOverwriteDateOnComplete();
|
||||
|
||||
/** Column name IsOverwriteSeqOnComplete */
|
||||
public static final String COLUMNNAME_IsOverwriteSeqOnComplete = "IsOverwriteSeqOnComplete";
|
||||
|
||||
/** Set Overwrite Sequence on Complete */
|
||||
public void setIsOverwriteSeqOnComplete (boolean IsOverwriteSeqOnComplete);
|
||||
|
||||
/** Get Overwrite Sequence on Complete */
|
||||
public boolean isOverwriteSeqOnComplete();
|
||||
|
||||
/** Column name IsPickQAConfirm */
|
||||
public static final String COLUMNNAME_IsPickQAConfirm = "IsPickQAConfirm";
|
||||
|
||||
|
|
|
@ -1478,13 +1478,30 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
|
||||
m_processMsg = info.toString();
|
||||
setProcessed(true);
|
||||
setDocAction(DOCACTION_Close);
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setMovementDate(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Material Policy
|
||||
* Sets line ASI
|
||||
|
|
|
@ -591,13 +591,31 @@ public class MInventory extends X_M_Inventory implements DocAction
|
|||
m_processMsg = valid;
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
|
||||
//
|
||||
setProcessed(true);
|
||||
setDocAction(DOCACTION_Close);
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setMovementDate(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Material Policy.
|
||||
* (NOT USED)
|
||||
|
|
|
@ -1858,6 +1858,9 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
m_processMsg = valid;
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
|
||||
// Counter Documents
|
||||
MInvoice counter = createCounterDoc();
|
||||
|
@ -1869,7 +1872,22 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
setDocAction(DOCACTION_Close);
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setDateInvoiced(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Counter Document
|
||||
* @return counter invoice
|
||||
|
|
|
@ -548,12 +548,31 @@ public class MJournal extends X_GL_Journal implements DocAction
|
|||
m_processMsg = valid;
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
|
||||
//
|
||||
setProcessed(true);
|
||||
setDocAction(DOCACTION_Close);
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setDateDoc(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Void Document.
|
||||
* @return true if success
|
||||
|
|
|
@ -477,12 +477,31 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
|
|||
m_processMsg = valid;
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
|
||||
//
|
||||
setProcessed(true);
|
||||
setDocAction(DOCACTION_Close);
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setDateDoc(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Void Document.
|
||||
* @return false
|
||||
|
|
|
@ -531,13 +531,30 @@ public class MMovement extends X_M_Movement implements DocAction
|
|||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
|
||||
//
|
||||
setProcessed(true);
|
||||
setDocAction(DOCACTION_Close);
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setMovementDate(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check Material Policy
|
||||
* Sets line ASI
|
||||
|
|
|
@ -1668,6 +1668,11 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||
if (m_processMsg != null)
|
||||
return DocAction.STATUS_Invalid;
|
||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
|
||||
if (m_processMsg != null)
|
||||
return DocAction.STATUS_Invalid;
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
setProcessed(true);
|
||||
return DocAction.STATUS_Completed;
|
||||
}
|
||||
|
@ -1750,6 +1755,9 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
|
||||
setProcessed(true);
|
||||
m_processMsg = info.toString();
|
||||
//
|
||||
|
@ -1757,6 +1765,21 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setDateOrdered(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Shipment
|
||||
* @param dt order document type
|
||||
|
|
|
@ -1646,12 +1646,31 @@ public final class MPayment extends X_C_Payment
|
|||
m_processMsg = valid;
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
|
||||
//
|
||||
setProcessed(true);
|
||||
setDocAction(DOCACTION_Close);
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setDateTrx(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Counter Document
|
||||
* @return payment
|
||||
|
|
|
@ -401,12 +401,33 @@ public class MRMA extends X_M_RMA implements DocAction
|
|||
m_processMsg = valid;
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
|
||||
//
|
||||
setProcessed(true);
|
||||
setDocAction(DOCACTION_Close);
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
/* No Document Date on RMA
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setDate???(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
*/
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Void Document.
|
||||
* @return true if success
|
||||
|
|
|
@ -336,12 +336,31 @@ public class MRequisition extends X_M_Requisition implements DocAction
|
|||
m_processMsg = valid;
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
// Set the definite document number after completed (if needed)
|
||||
setDefiniteDocumentNo();
|
||||
|
||||
//
|
||||
setProcessed(true);
|
||||
setDocAction(ACTION_Close);
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setDateDoc(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Void Document.
|
||||
* Same as Close.
|
||||
|
|
|
@ -497,7 +497,7 @@ public class MSequence extends X_AD_Sequence
|
|||
* @param trxName optional Transaction Name
|
||||
* @return document no or null
|
||||
*/
|
||||
public static synchronized String getDocumentNo (int C_DocType_ID, String trxName)
|
||||
public static synchronized String getDocumentNo (int C_DocType_ID, String trxName, boolean definite)
|
||||
{
|
||||
if (C_DocType_ID == 0)
|
||||
{
|
||||
|
@ -513,7 +513,7 @@ public class MSequence extends X_AD_Sequence
|
|||
{
|
||||
if (server != null)
|
||||
{ // See ServerBean
|
||||
String dn = server.getDocumentNo (C_DocType_ID, trxName);
|
||||
String dn = server.getDocumentNo (C_DocType_ID, trxName, definite);
|
||||
s_log.finest("Server => " + dn);
|
||||
if (dn != null)
|
||||
return dn;
|
||||
|
@ -532,12 +532,21 @@ public class MSequence extends X_AD_Sequence
|
|||
{
|
||||
s_log.finer("DocType_ID=" + C_DocType_ID + " Not DocNo controlled");
|
||||
return null;
|
||||
}
|
||||
if (definite && ! dt.isOverwriteSeqOnComplete()) {
|
||||
s_log.finer("DocType_ID=" + C_DocType_ID + " Not Sequence Overwrite on Complete");
|
||||
return null;
|
||||
}
|
||||
if (dt == null || dt.getDocNoSequence_ID() == 0)
|
||||
{
|
||||
s_log.warning ("No Sequence for DocType - " + dt);
|
||||
return null;
|
||||
}
|
||||
if (definite && dt.getDefiniteSequence_ID() == 0)
|
||||
{
|
||||
s_log.warning ("No Definite Sequence for DocType - " + dt);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Check AdempiereSys
|
||||
boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
|
||||
|
@ -583,8 +592,12 @@ public class MSequence extends X_AD_Sequence
|
|||
return null;
|
||||
//
|
||||
pstmt = conn.prepareStatement(selectSQL,
|
||||
ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
|
||||
pstmt.setInt(1, dt.getDocNoSequence_ID());
|
||||
ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
|
||||
if (definite)
|
||||
pstmt.setInt(1, dt.getDefiniteSequence_ID());
|
||||
else
|
||||
pstmt.setInt(1, dt.getDocNoSequence_ID());
|
||||
|
||||
//
|
||||
ResultSet rs = pstmt.executeQuery();
|
||||
// s_log.fine("AC=" + conn.getAutoCommit() + " -Iso=" + conn.getTransactionIsolation()
|
||||
|
|
|
@ -2134,7 +2134,7 @@ public abstract class PO
|
|||
if (index == -1)
|
||||
index = p_info.getColumnIndex("C_DocType_ID");
|
||||
if (index != -1) // get based on Doc Type (might return null)
|
||||
value = DB.getDocumentNo(get_ValueAsInt(index), m_trxName);
|
||||
value = DB.getDocumentNo(get_ValueAsInt(index), m_trxName, false);
|
||||
if (value == null) // not overwritten by DocType and not manually entered
|
||||
value = DB.getDocumentNo(AD_Client_ID, p_info.getTableName(), m_trxName);
|
||||
}
|
||||
|
@ -2291,7 +2291,7 @@ public abstract class PO
|
|||
if (dt == -1)
|
||||
dt = p_info.getColumnIndex("C_DocType_ID");
|
||||
if (dt != -1) // get based on Doc Type (might return null)
|
||||
value = DB.getDocumentNo(get_ValueAsInt(dt), m_trxName);
|
||||
value = DB.getDocumentNo(get_ValueAsInt(dt), m_trxName, false);
|
||||
if (value == null) // not overwritten by DocType and not manually entered
|
||||
value = DB.getDocumentNo(getAD_Client_ID(), p_info.getTableName(), m_trxName);
|
||||
set_ValueNoCheck(columnName, value);
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.compiere.util.KeyNamePair;
|
|||
|
||||
/** Generated Model for C_DocType
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.3.1b - $Id$ */
|
||||
* @version Release 3.3.1t - $Id$ */
|
||||
public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
|
||||
{
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
|
|||
/** Load Meta Data */
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||
return poi;
|
||||
}
|
||||
|
||||
|
@ -253,6 +253,28 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** DefiniteSequence_ID AD_Reference_ID=128 */
|
||||
public static final int DEFINITESEQUENCE_ID_AD_Reference_ID=128;
|
||||
/** Set Definite Sequence.
|
||||
@param DefiniteSequence_ID Definite Sequence */
|
||||
public void setDefiniteSequence_ID (int DefiniteSequence_ID)
|
||||
{
|
||||
if (DefiniteSequence_ID <= 0)
|
||||
set_Value (COLUMNNAME_DefiniteSequence_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_DefiniteSequence_ID, Integer.valueOf(DefiniteSequence_ID));
|
||||
}
|
||||
|
||||
/** Get Definite Sequence.
|
||||
@return Definite Sequence */
|
||||
public int getDefiniteSequence_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_DefiniteSequence_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Description.
|
||||
@param Description
|
||||
Optional short description of the record
|
||||
|
@ -688,6 +710,48 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Set Overwrite Date on Complete.
|
||||
@param IsOverwriteDateOnComplete Overwrite Date on Complete */
|
||||
public void setIsOverwriteDateOnComplete (boolean IsOverwriteDateOnComplete)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsOverwriteDateOnComplete, Boolean.valueOf(IsOverwriteDateOnComplete));
|
||||
}
|
||||
|
||||
/** Get Overwrite Date on Complete.
|
||||
@return Overwrite Date on Complete */
|
||||
public boolean isOverwriteDateOnComplete ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsOverwriteDateOnComplete);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Overwrite Sequence on Complete.
|
||||
@param IsOverwriteSeqOnComplete Overwrite Sequence on Complete */
|
||||
public void setIsOverwriteSeqOnComplete (boolean IsOverwriteSeqOnComplete)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsOverwriteSeqOnComplete, Boolean.valueOf(IsOverwriteSeqOnComplete));
|
||||
}
|
||||
|
||||
/** Get Overwrite Sequence on Complete.
|
||||
@return Overwrite Sequence on Complete */
|
||||
public boolean isOverwriteSeqOnComplete ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsOverwriteSeqOnComplete);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Pick/QA Confirmation.
|
||||
@param IsPickQAConfirm
|
||||
Require Pick or QA Confirmation before processing
|
||||
|
|
|
@ -18,8 +18,10 @@ package org.compiere.process;
|
|||
|
||||
import java.io.*;
|
||||
import java.math.*;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.*;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.DB;
|
||||
|
||||
/**
|
||||
* Template for DocAction
|
||||
|
@ -159,6 +161,9 @@ public class DocActionTemplate extends PO implements DocAction
|
|||
}
|
||||
**/
|
||||
// Add up Amounts
|
||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
|
||||
if (m_processMsg != null)
|
||||
return DocAction.STATUS_Invalid;
|
||||
m_justPrepared = true;
|
||||
// if (!DOCACTION_Complete.equals(getDocAction()))
|
||||
// setDocAction(DOCACTION_Complete);
|
||||
|
@ -200,6 +205,11 @@ public class DocActionTemplate extends PO implements DocAction
|
|||
if (!DocAction.STATUS_InProgress.equals(status))
|
||||
return status;
|
||||
}
|
||||
|
||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||
if (m_processMsg != null)
|
||||
return DocAction.STATUS_Invalid;
|
||||
|
||||
// Implicit Approval
|
||||
// if (!isApproved())
|
||||
approveIt();
|
||||
|
@ -213,11 +223,36 @@ public class DocActionTemplate extends PO implements DocAction
|
|||
m_processMsg = valid;
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
// setDefiniteDocumentNo();
|
||||
|
||||
// setProcessed(true);
|
||||
// setDocAction(DOCACTION_Close);
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
/*
|
||||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
setDateInvoiced(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
String value = null;
|
||||
int index = p_info.getColumnIndex("C_DocType_ID");
|
||||
if (index == -1)
|
||||
index = p_info.getColumnIndex("C_DocTypeTarget_ID");
|
||||
if (index != -1) // get based on Doc Type (might return null)
|
||||
value = DB.getDocumentNo(get_ValueAsInt(index), get_TrxName(), true);
|
||||
if (value != null) {
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Void Document.
|
||||
* Same as Close.
|
||||
|
|
|
@ -1395,11 +1395,12 @@ public final class DB
|
|||
* Get Document No based on Document Type
|
||||
* @param C_DocType_ID document type
|
||||
* @param trxName optional Transaction Name
|
||||
* @param definite
|
||||
* @return document no or null
|
||||
*/
|
||||
public static String getDocumentNo(int C_DocType_ID, String trxName)
|
||||
public static String getDocumentNo(int C_DocType_ID, String trxName, boolean definite)
|
||||
{
|
||||
return MSequence.getDocumentNo (C_DocType_ID, trxName);
|
||||
return MSequence.getDocumentNo (C_DocType_ID, trxName, definite);
|
||||
} // getDocumentNo
|
||||
|
||||
|
||||
|
@ -1449,7 +1450,7 @@ public final class DB
|
|||
return getDocumentNo (AD_Client_ID, TableName, trxName);
|
||||
}
|
||||
|
||||
String retValue = getDocumentNo (C_DocType_ID, trxName);
|
||||
String retValue = getDocumentNo (C_DocType_ID, trxName, false);
|
||||
if (!onlyDocType && retValue == null)
|
||||
return getDocumentNo (AD_Client_ID, TableName, trxName);
|
||||
return retValue;
|
||||
|
|
|
@ -0,0 +1,207 @@
|
|||
-- Dec 29, 2007 5:52:00 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Element (AD_Org_ID,AD_Element_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,AD_Client_ID,UpdatedBy) VALUES (0,53320,'IsOverwriteSeqOnComplete',TO_DATE('2007-12-29 17:51:59','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Overwrite Sequence on Complete','Overwrite Sequence on Complete',TO_DATE('2007-12-29 17:51:59','YYYY-MM-DD HH24:MI:SS'),0,100)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:52:00 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=53320 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
UPDATE AD_Element_Trl SET istranslated='Y', name = 'Sobreescribir Secuencia al Completar', printname = 'Sobreescribir Secuencia al Completar'
|
||||
WHERE AD_Element_ID=53320 and ad_language like 'es_%'
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:53:26 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Element (AD_Org_ID,AD_Element_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,AD_Client_ID,UpdatedBy) VALUES (0,53321,'DefiniteSequence_ID',TO_DATE('2007-12-29 17:53:26','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Definite Sequence','Definite Sequence',TO_DATE('2007-12-29 17:53:26','YYYY-MM-DD HH24:MI:SS'),0,100)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:53:26 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=53321 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
UPDATE AD_Element_Trl SET istranslated='Y', name = 'Secuencia Definitiva', printname = 'Secuencia Definitiva'
|
||||
WHERE AD_Element_ID=53321 and ad_language like 'es_%'
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:54:09 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Element (AD_Org_ID,AD_Element_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,AD_Client_ID,UpdatedBy) VALUES (0,53322,'IsOverwriteDateOnComplete',TO_DATE('2007-12-29 17:54:09','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Overwrite Date on Complete','Overwrite Date on Complete',TO_DATE('2007-12-29 17:54:09','YYYY-MM-DD HH24:MI:SS'),0,100)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:54:09 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=53322 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
UPDATE AD_Element_Trl SET istranslated='Y', name = 'Sobreescribir Fecha al Completar', printname = 'Sobreescribir Fecha al Completar'
|
||||
WHERE AD_Element_ID=53322 and ad_language like 'es_%'
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:55:55 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Column (AD_Org_ID,AD_Element_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version,AD_Client_ID,AD_Column_ID) VALUES (0,53320,20,217,'IsOverwriteSeqOnComplete',TO_DATE('2007-12-29 17:55:55','YYYY-MM-DD HH24:MI:SS'),100,'N','D',1,'Y','N','N','N','N','N','N','N','N','N','Y','Overwrite Sequence on Complete',0,TO_DATE('2007-12-29 17:55:55','YYYY-MM-DD HH24:MI:SS'),100,1.00,0,54087)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:55:56 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=54087 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:56:02 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
ALTER TABLE C_DocType ADD IsOverwriteSeqOnComplete CHAR(1) DEFAULT 'N' CHECK (IsOverwriteSeqOnComplete IN ('Y','N'))
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:57:54 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Column (AD_Org_ID,AD_Reference_Value_ID,AD_Element_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version,AD_Client_ID,AD_Column_ID) VALUES (0,128,53321,18,217,'DefiniteSequence_ID',TO_DATE('2007-12-29 17:57:54','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','N','N','N','N','N','N','Y','Definite Sequence',TO_DATE('2007-12-29 17:57:54','YYYY-MM-DD HH24:MI:SS'),100,1,0,54088)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:57:54 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=54088 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:58:04 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
ALTER TABLE C_DocType ADD DefiniteSequence_ID NUMBER(10)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:58:27 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Column (AD_Org_ID,AD_Element_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version,AD_Client_ID,AD_Column_ID) VALUES (0,53322,20,217,'IsOverwriteDateOnComplete',TO_DATE('2007-12-29 17:58:26','YYYY-MM-DD HH24:MI:SS'),100,'N','D',1,'Y','N','N','N','N','N','N','N','N','N','Y','Overwrite Date on Complete',0,TO_DATE('2007-12-29 17:58:26','YYYY-MM-DD HH24:MI:SS'),100,1.00,0,54089)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:58:27 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=54089 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:58:37 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
ALTER TABLE C_DocType ADD IsOverwriteDateOnComplete CHAR(1) DEFAULT 'N' CHECK (IsOverwriteDateOnComplete IN ('Y','N'))
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:14 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field (AD_Column_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,AD_Client_ID,UpdatedBy,AD_Field_ID) VALUES (54088,0,167,TO_DATE('2007-12-29 18:00:13','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Definite Sequence',TO_DATE('2007-12-29 18:00:13','YYYY-MM-DD HH24:MI:SS'),0,100,54230)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:14 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=54230 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:15 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field (AD_Column_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,AD_Client_ID,UpdatedBy,AD_Field_ID) VALUES (54089,0,167,TO_DATE('2007-12-29 18:00:15','YYYY-MM-DD HH24:MI:SS'),100,1,'D','Y','Y','Y','N','N','N','N','N','Overwrite Date on Complete',TO_DATE('2007-12-29 18:00:15','YYYY-MM-DD HH24:MI:SS'),0,100,54232)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:15 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=54232 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field (AD_Column_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,AD_Client_ID,UpdatedBy,AD_Field_ID) VALUES (54087,0,167,TO_DATE('2007-12-29 18:00:15','YYYY-MM-DD HH24:MI:SS'),100,1,'D','Y','Y','Y','N','N','N','N','N','Overwrite Sequence on Complete',TO_DATE('2007-12-29 18:00:15','YYYY-MM-DD HH24:MI:SS'),0,100,54233)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=54233 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:52 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=290,Updated=TO_DATE('2007-12-29 18:00:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54233
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:57 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET IsSameLine='Y', SeqNo=300,Updated=TO_DATE('2007-12-29 18:00:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54230
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:01:04 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=310,Updated=TO_DATE('2007-12-29 18:01:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54232
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:01:31 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET DisplayLogic='@IsOverwriteSeqOnComplete@=''Y''',Updated=TO_DATE('2007-12-29 18:01:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54230
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=54233
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=54230
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=54232
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=10345
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=10346
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=10481
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=10480
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=10371
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=10528
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=10340
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=6567
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=3125
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:57 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET DisplayLogic='@IsDocNoControlled@=''Y''',Updated=TO_DATE('2007-12-29 20:21:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54233
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:22:06 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET DisplayLogic='@IsDocNoControlled@=''Y'' & @IsOverwriteSeqOnComplete@=''Y''',Updated=TO_DATE('2007-12-29 20:22:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54230
|
||||
;
|
||||
|
|
@ -0,0 +1,207 @@
|
|||
-- Dec 29, 2007 5:52:00 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Element (AD_Org_ID,AD_Element_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,AD_Client_ID,UpdatedBy) VALUES (0,53320,'IsOverwriteSeqOnComplete',TO_TIMESTAMP('2007-12-29 17:51:59','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Overwrite Sequence on Complete','Overwrite Sequence on Complete',TO_TIMESTAMP('2007-12-29 17:51:59','YYYY-MM-DD HH24:MI:SS'),0,100)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:52:00 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=53320 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
UPDATE AD_Element_Trl SET istranslated='Y', name = 'Sobreescribir Secuencia al Completar', printname = 'Sobreescribir Secuencia al Completar'
|
||||
WHERE AD_Element_ID=53320 and ad_language like 'es_%'
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:53:26 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Element (AD_Org_ID,AD_Element_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,AD_Client_ID,UpdatedBy) VALUES (0,53321,'DefiniteSequence_ID',TO_TIMESTAMP('2007-12-29 17:53:26','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Definite Sequence','Definite Sequence',TO_TIMESTAMP('2007-12-29 17:53:26','YYYY-MM-DD HH24:MI:SS'),0,100)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:53:26 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=53321 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
UPDATE AD_Element_Trl SET istranslated='Y', name = 'Secuencia Definitiva', printname = 'Secuencia Definitiva'
|
||||
WHERE AD_Element_ID=53321 and ad_language like 'es_%'
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:54:09 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Element (AD_Org_ID,AD_Element_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,AD_Client_ID,UpdatedBy) VALUES (0,53322,'IsOverwriteDateOnComplete',TO_TIMESTAMP('2007-12-29 17:54:09','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Overwrite Date on Complete','Overwrite Date on Complete',TO_TIMESTAMP('2007-12-29 17:54:09','YYYY-MM-DD HH24:MI:SS'),0,100)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:54:09 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=53322 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
UPDATE AD_Element_Trl SET istranslated='Y', name = 'Sobreescribir Fecha al Completar', printname = 'Sobreescribir Fecha al Completar'
|
||||
WHERE AD_Element_ID=53322 and ad_language like 'es_%'
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:55:55 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Column (AD_Org_ID,AD_Element_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version,AD_Client_ID,AD_Column_ID) VALUES (0,53320,20,217,'IsOverwriteSeqOnComplete',TO_TIMESTAMP('2007-12-29 17:55:55','YYYY-MM-DD HH24:MI:SS'),100,'N','D',1,'Y','N','N','N','N','N','N','N','N','N','Y','Overwrite Sequence on Complete',0,TO_TIMESTAMP('2007-12-29 17:55:55','YYYY-MM-DD HH24:MI:SS'),100,1.00,0,54087)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:55:56 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=54087 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:56:02 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
ALTER TABLE C_DocType ADD COLUMN IsOverwriteSeqOnComplete CHAR(1) DEFAULT 'N' CHECK (IsOverwriteSeqOnComplete IN ('Y','N'))
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:57:54 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Column (AD_Org_ID,AD_Reference_Value_ID,AD_Element_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version,AD_Client_ID,AD_Column_ID) VALUES (0,128,53321,18,217,'DefiniteSequence_ID',TO_TIMESTAMP('2007-12-29 17:57:54','YYYY-MM-DD HH24:MI:SS'),100,'D',22,'Y','N','N','N','N','N','N','N','N','N','Y','Definite Sequence',TO_TIMESTAMP('2007-12-29 17:57:54','YYYY-MM-DD HH24:MI:SS'),100,1,0,54088)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:57:54 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=54088 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:58:04 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
ALTER TABLE C_DocType ADD COLUMN DefiniteSequence_ID NUMERIC(10)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:58:27 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Column (AD_Org_ID,AD_Element_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version,AD_Client_ID,AD_Column_ID) VALUES (0,53322,20,217,'IsOverwriteDateOnComplete',TO_TIMESTAMP('2007-12-29 17:58:26','YYYY-MM-DD HH24:MI:SS'),100,'N','D',1,'Y','N','N','N','N','N','N','N','N','N','Y','Overwrite Date on Complete',0,TO_TIMESTAMP('2007-12-29 17:58:26','YYYY-MM-DD HH24:MI:SS'),100,1.00,0,54089)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:58:27 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
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=54089 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 5:58:37 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
ALTER TABLE C_DocType ADD COLUMN IsOverwriteDateOnComplete CHAR(1) DEFAULT 'N' CHECK (IsOverwriteDateOnComplete IN ('Y','N'))
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:14 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field (AD_Column_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,AD_Client_ID,UpdatedBy,AD_Field_ID) VALUES (54088,0,167,TO_TIMESTAMP('2007-12-29 18:00:13','YYYY-MM-DD HH24:MI:SS'),100,22,'D','Y','Y','Y','N','N','N','N','N','Definite Sequence',TO_TIMESTAMP('2007-12-29 18:00:13','YYYY-MM-DD HH24:MI:SS'),0,100,54230)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:14 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=54230 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:15 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field (AD_Column_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,AD_Client_ID,UpdatedBy,AD_Field_ID) VALUES (54089,0,167,TO_TIMESTAMP('2007-12-29 18:00:15','YYYY-MM-DD HH24:MI:SS'),100,1,'D','Y','Y','Y','N','N','N','N','N','Overwrite Date on Complete',TO_TIMESTAMP('2007-12-29 18:00:15','YYYY-MM-DD HH24:MI:SS'),0,100,54232)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:15 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=54232 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field (AD_Column_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,AD_Client_ID,UpdatedBy,AD_Field_ID) VALUES (54087,0,167,TO_TIMESTAMP('2007-12-29 18:00:15','YYYY-MM-DD HH24:MI:SS'),100,1,'D','Y','Y','Y','N','N','N','N','N','Overwrite Sequence on Complete',TO_TIMESTAMP('2007-12-29 18:00:15','YYYY-MM-DD HH24:MI:SS'),0,100,54233)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=54233 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:52 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=290,Updated=TO_TIMESTAMP('2007-12-29 18:00:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54233
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:00:57 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET IsSameLine='Y', SeqNo=300,Updated=TO_TIMESTAMP('2007-12-29 18:00:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54230
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:01:04 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=310,Updated=TO_TIMESTAMP('2007-12-29 18:01:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54232
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 6:01:31 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET DisplayLogic='@IsOverwriteSeqOnComplete@=''Y''',Updated=TO_TIMESTAMP('2007-12-29 18:01:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54230
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=54233
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=54230
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=54232
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=10345
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=10346
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=10481
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=10480
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=10371
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=10528
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=10340
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=6567
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:16 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=3125
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:21:57 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET DisplayLogic='@IsDocNoControlled@=''Y''',Updated=TO_TIMESTAMP('2007-12-29 20:21:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54233
|
||||
;
|
||||
|
||||
-- Dec 29, 2007 8:22:06 PM COT
|
||||
-- 1860642 - Enhance document numbering
|
||||
UPDATE AD_Field SET DisplayLogic='@IsDocNoControlled@=''Y'' & @IsOverwriteSeqOnComplete@=''Y''',Updated=TO_TIMESTAMP('2007-12-29 20:22:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=54230
|
||||
;
|
||||
|
|
@ -310,7 +310,7 @@ public class ServerBean implements SessionBean
|
|||
* @param trxName optional Transaction Name
|
||||
* @return document no or null
|
||||
*/
|
||||
public String getDocumentNo (int C_DocType_ID, String trxName)
|
||||
public String getDocumentNo (int C_DocType_ID, String trxName, boolean definite)
|
||||
{
|
||||
if (trxName != null) {
|
||||
if (Trx.get(trxName, false) == null) {
|
||||
|
@ -318,9 +318,9 @@ public class ServerBean implements SessionBean
|
|||
}
|
||||
}
|
||||
m_nextSeqCount++;
|
||||
String dn = MSequence.getDocumentNo (C_DocType_ID, trxName);
|
||||
String dn = MSequence.getDocumentNo (C_DocType_ID, trxName, definite);
|
||||
if (dn == null) // try again
|
||||
dn = MSequence.getDocumentNo (C_DocType_ID, trxName);
|
||||
dn = MSequence.getDocumentNo (C_DocType_ID, trxName, definite);
|
||||
return dn;
|
||||
} // getDocumentNo
|
||||
|
||||
|
|
Loading…
Reference in New Issue