* Enhance document no not working using vpn/wan profile.

This commit is contained in:
Heng Sin Low 2008-02-27 21:23:40 +00:00
parent be7aa6cab3
commit 03cce7a010
3 changed files with 40 additions and 3 deletions

View File

@ -80,6 +80,16 @@ public interface Server
public java.lang.String getDocumentNo( int AD_Client_ID,java.lang.String TableName,java.lang.String trxName ) public java.lang.String getDocumentNo( int AD_Client_ID,java.lang.String TableName,java.lang.String trxName )
throws java.rmi.RemoteException; 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 * Get Document No based on Document Type
* @param C_DocType_ID 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 ) public java.lang.String getDocumentNo( int C_DocType_ID,java.lang.String trxName,boolean definite )
throws java.rmi.RemoteException; 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 * Process Remote
* @param ctx Context * @param ctx Context

View File

@ -71,6 +71,15 @@ public interface ServerLocal
* @return document no or null */ * @return document no or null */
public java.lang.String getDocumentNo( int AD_Client_ID,java.lang.String TableName,java.lang.String trxName ) ; 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 * Get Document No based on Document Type
* @param C_DocType_ID document type * @param C_DocType_ID document type
@ -78,6 +87,14 @@ public interface ServerLocal
* @return document no or null */ * @return document no or null */
public java.lang.String getDocumentNo( int C_DocType_ID,java.lang.String trxName,boolean definite ) ; 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 * Process Remote
* @param ctx Context * @param ctx Context

View File

@ -390,7 +390,7 @@ public class MSequence extends X_AD_Sequence
{ {
if (server != null) if (server != null)
{ // See ServerBean { // 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); s_log.finest("Server => " + dn);
if (dn != null) if (dn != null)
return dn; return dn;
@ -674,6 +674,7 @@ public class MSequence extends X_AD_Sequence
} }
//get from server //get from server
if (DB.isRemoteObjects()) if (DB.isRemoteObjects())
{ {
Server server = CConnection.get().getServer(); Server server = CConnection.get().getServer();
@ -681,7 +682,7 @@ public class MSequence extends X_AD_Sequence
{ {
if (server != null) if (server != null)
{ // See ServerBean { // 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); s_log.finest("Server => " + dn);
if (dn != null) if (dn != null)
return dn; return dn;
@ -750,7 +751,7 @@ public class MSequence extends X_AD_Sequence
} }
String selectSQL = null; String selectSQL = null;
if (DB.isOracle() == false || DB.isRemoteObjects()) if (DB.isOracle() == false)
{ {
if (isStartNewYear) if (isStartNewYear)
{ {