diff --git a/base/src/org/compiere/model/MSequence.java b/base/src/org/compiere/model/MSequence.java index 2f71715b89..dce31d5584 100644 --- a/base/src/org/compiere/model/MSequence.java +++ b/base/src/org/compiere/model/MSequence.java @@ -491,10 +491,23 @@ public class MSequence extends X_AD_Sequence return documentNo; } // getDocumentNo + /** + * Get Document No based on Document Type + * @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 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) diff --git a/base/src/org/compiere/util/DB.java b/base/src/org/compiere/util/DB.java index 1dcd8b833c..287308afc4 100644 --- a/base/src/org/compiere/util/DB.java +++ b/base/src/org/compiere/util/DB.java @@ -1390,12 +1390,24 @@ public final class DB { return MSequence.getNextID (AD_Client_ID, TableName, trxName); } // 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 * @param C_DocType_ID document type * @param trxName optional Transaction Name - * @param definite + * @param definite asking for a definitive or temporary sequence * @return document no or null */ 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); } // getDocumentNo - /** * Get Document No from table * @param AD_Client_ID client