From d70a8c07f3be2d4afd9664e1cf24edbf6aa7305a Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Tue, 4 Jul 2017 15:21:33 +0800 Subject: [PATCH] IDEMPIERE-3350 Accounting Processor GL postings to "secondary" schema unreliable. Posted not updated after posting completed with error ( it stay as N ). --- .../src/org/compiere/acct/DocManager.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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"; } }