diff --git a/base/src/org/compiere/interfaces/Server.java b/base/src/org/compiere/interfaces/Server.java index 4a11ef7921..356688be0f 100644 --- a/base/src/org/compiere/interfaces/Server.java +++ b/base/src/org/compiere/interfaces/Server.java @@ -80,6 +80,16 @@ public interface Server public java.lang.String getDocumentNo( int AD_Client_ID,java.lang.String TableName,java.lang.String trxName ) throws java.rmi.RemoteException; + /** + * Get Document No from table + * @param AD_Client_ID client + * @param TableName table name + * @param trxName optional Transaction Name + * @param po + * @return document no or null */ + public java.lang.String getDocumentNo( int AD_Client_ID,java.lang.String TableName,java.lang.String trxName,org.compiere.model.PO po ) + throws java.rmi.RemoteException; + /** * Get Document No based on Document Type * @param C_DocType_ID document type @@ -88,6 +98,15 @@ public interface Server public java.lang.String getDocumentNo( int C_DocType_ID,java.lang.String trxName,boolean definite ) throws java.rmi.RemoteException; + /** + * Get Document No based on Document Type + * @param C_DocType_ID document type + * @param trxName optional Transaction Name + * @param po + * @return document no or null */ + public java.lang.String getDocumentNo( int C_DocType_ID,java.lang.String trxName,boolean definite,org.compiere.model.PO po ) + throws java.rmi.RemoteException; + /** * Process Remote * @param ctx Context diff --git a/base/src/org/compiere/interfaces/ServerLocal.java b/base/src/org/compiere/interfaces/ServerLocal.java index 49a1f68ce1..a7a87d229a 100644 --- a/base/src/org/compiere/interfaces/ServerLocal.java +++ b/base/src/org/compiere/interfaces/ServerLocal.java @@ -71,6 +71,15 @@ public interface ServerLocal * @return document no or null */ public java.lang.String getDocumentNo( int AD_Client_ID,java.lang.String TableName,java.lang.String trxName ) ; + /** + * Get Document No from table + * @param AD_Client_ID client + * @param TableName table name + * @param trxName optional Transaction Name + * @param po + * @return document no or null */ + public java.lang.String getDocumentNo( int AD_Client_ID,java.lang.String TableName,java.lang.String trxName,org.compiere.model.PO po ) ; + /** * Get Document No based on Document Type * @param C_DocType_ID document type @@ -78,6 +87,14 @@ public interface ServerLocal * @return document no or null */ public java.lang.String getDocumentNo( int C_DocType_ID,java.lang.String trxName,boolean definite ) ; + /** + * Get Document No based on Document Type + * @param C_DocType_ID document type + * @param trxName optional Transaction Name + * @param po + * @return document no or null */ + public java.lang.String getDocumentNo( int C_DocType_ID,java.lang.String trxName,boolean definite,org.compiere.model.PO po ) ; + /** * Process Remote * @param ctx Context diff --git a/base/src/org/compiere/model/MSequence.java b/base/src/org/compiere/model/MSequence.java index 55e263bc3d..6eabc827bd 100644 --- a/base/src/org/compiere/model/MSequence.java +++ b/base/src/org/compiere/model/MSequence.java @@ -390,7 +390,7 @@ public class MSequence extends X_AD_Sequence { if (server != null) { // See ServerBean - String dn = server.getDocumentNo (AD_Client_ID, TableName, trxName); + String dn = server.getDocumentNo (AD_Client_ID, TableName, trxName, po); s_log.finest("Server => " + dn); if (dn != null) return dn; @@ -674,6 +674,7 @@ public class MSequence extends X_AD_Sequence } //get from server + if (DB.isRemoteObjects()) { Server server = CConnection.get().getServer(); @@ -681,7 +682,7 @@ public class MSequence extends X_AD_Sequence { if (server != null) { // See ServerBean - String dn = server.getDocumentNo (C_DocType_ID, trxName, definite); + String dn = server.getDocumentNo (C_DocType_ID, trxName, definite, po); s_log.finest("Server => " + dn); if (dn != null) return dn; @@ -750,7 +751,7 @@ public class MSequence extends X_AD_Sequence } String selectSQL = null; - if (DB.isOracle() == false || DB.isRemoteObjects()) + if (DB.isOracle() == false) { if (isStartNewYear) {