FR 1860642 - Enhance document numbering

- add deprecated methods for backward compatibility
This commit is contained in:
Carlos Ruiz 2008-01-21 18:15:52 +00:00
parent 2795e2e77e
commit 50d096b84e
2 changed files with 27 additions and 3 deletions

View File

@ -496,6 +496,19 @@ public class MSequence extends X_AD_Sequence
* @param C_DocType_ID document type * @param C_DocType_ID document type
* @param trxName optional Transaction Name * @param trxName optional Transaction Name
* @return document no or null * @return document no or null
* @deprecated
*/
public static String getDocumentNo(int C_DocType_ID, String trxName)
{
return getDocumentNo (C_DocType_ID, trxName, false);
} // getDocumentNo
/**
* Get Document No based on Document Type
* @param C_DocType_ID document type
* @param trxName optional Transaction Name
* @param definite asking for a definitive or temporary sequence
* @return document no or null
*/ */
public static synchronized String getDocumentNo (int C_DocType_ID, String trxName, boolean definite) public static synchronized String getDocumentNo (int C_DocType_ID, String trxName, boolean definite)
{ {

View File

@ -1391,11 +1391,23 @@ public final class DB
return MSequence.getNextID (AD_Client_ID, TableName, trxName); return MSequence.getNextID (AD_Client_ID, TableName, trxName);
} // getNextID } // getNextID
/**
* Get Document No based on Document Type (backward compatibility)
* @param C_DocType_ID document type
* @param trxName optional Transaction Name
* @return document no or null
* @deprecated
*/
public static String getDocumentNo(int C_DocType_ID, String trxName)
{
return MSequence.getDocumentNo (C_DocType_ID, trxName, false);
} // getDocumentNo
/** /**
* Get Document No based on Document Type * Get Document No based on Document Type
* @param C_DocType_ID document type * @param C_DocType_ID document type
* @param trxName optional Transaction Name * @param trxName optional Transaction Name
* @param definite * @param definite asking for a definitive or temporary sequence
* @return document no or null * @return document no or null
*/ */
public static String getDocumentNo(int C_DocType_ID, String trxName, boolean definite) public static String getDocumentNo(int C_DocType_ID, String trxName, boolean definite)
@ -1403,7 +1415,6 @@ public final class DB
return MSequence.getDocumentNo (C_DocType_ID, trxName, definite); return MSequence.getDocumentNo (C_DocType_ID, trxName, definite);
} // getDocumentNo } // getDocumentNo
/** /**
* Get Document No from table * Get Document No from table
* @param AD_Client_ID client * @param AD_Client_ID client