Fix [2896337] - Client Accounting Processor lock on repost

https://sourceforge.net/tracker/?func=detail&aid=2896337&group_id=176962&atid=879332
This commit is contained in:
Carlos Ruiz 2009-11-12 01:24:55 +00:00
parent 0c2b28f5e5
commit 2c7d243929
1 changed files with 4 additions and 1 deletions

View File

@ -885,10 +885,13 @@ public abstract class Doc
*/ */
private void unlock() private void unlock()
{ {
String trxName = null; // outside trx if on server
if (MClient.isClientAccounting())
trxName = getTrxName(); // on trx if it's in client
StringBuffer sql = new StringBuffer ("UPDATE "); StringBuffer sql = new StringBuffer ("UPDATE ");
sql.append(get_TableName()).append( " SET Processing='N' WHERE ") sql.append(get_TableName()).append( " SET Processing='N' WHERE ")
.append(get_TableName()).append("_ID=").append(p_po.get_ID()); .append(get_TableName()).append("_ID=").append(p_po.get_ID());
DB.executeUpdate(sql.toString(), null); // outside trx DB.executeUpdate(sql.toString(), trxName);
} // unlock } // unlock