diff --git a/org.adempiere.base/src/org/compiere/acct/DocManager.java b/org.adempiere.base/src/org/compiere/acct/DocManager.java index 5e5053c9c3..28b8c161cf 100644 --- a/org.adempiere.base/src/org/compiere/acct/DocManager.java +++ b/org.adempiere.base/src/org/compiere/acct/DocManager.java @@ -304,18 +304,27 @@ public class DocManager { if (error != null && error.trim().length() > 0) { if (savepoint != null) + { trx.rollback(savepoint); + savepoint = null; + } else trx.rollback(); - return error; + s_log.info("Error Posting " + doc + " to " + as + " Error: " + error); + break; } } else { if (savepoint != null) + { trx.rollback(savepoint); + savepoint = null; + } else trx.rollback(); + + s_log.info("Error Posting " + doc + " to " + as + " Error: NoDoc"); return "NoDoc"; } }