IDEMPIERE-239 - smart way ; using IsActive() instead of SQL

This commit is contained in:
Nicolas Micoud 2012-04-18 16:36:35 +02:00
parent a53fd5c08f
commit 644207b999
1 changed files with 2 additions and 2 deletions

View File

@ -455,10 +455,10 @@ public abstract class Doc
{
log.log(Level.SEVERE, "Resubmit - Cannot lock " + get_TableName() + "_ID="
+ get_ID() + ", Force=" + force + ",RePost=" + repost);
if (!p_po.isActive())
return "Cannot post inactive document";
if (force)
return "Cannot Lock - ReSubmit";
if (DB.getSQLValueStringEx(trxName, "SELECT IsActive FROM " + get_TableName() + " WHERE " + get_TableName() + "_ID=" + get_ID()).equals("N"))
return "Impossible to post deactivated document";
return "Cannot Lock - ReSubmit or RePost with Force";
}