From 38a5d1b42068ec0e3de6a25ed0b95f9401c561e0 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sun, 27 Feb 2011 01:04:54 -0500 Subject: [PATCH] Enable immediate accounting for Production Document Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2857289 --- .../src/org/compiere/process/M_Production_Run.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/org.adempiere.base.process/src/org/compiere/process/M_Production_Run.java b/org.adempiere.base.process/src/org/compiere/process/M_Production_Run.java index e5634be136..13bfce6679 100644 --- a/org.adempiere.base.process/src/org/compiere/process/M_Production_Run.java +++ b/org.adempiere.base.process/src/org/compiere/process/M_Production_Run.java @@ -21,6 +21,7 @@ import java.sql.Timestamp; import java.util.List; import java.util.logging.Level; +import org.compiere.model.MClient; import org.compiere.model.MLocator; import org.compiere.model.MProduct; import org.compiere.model.MStorage; @@ -191,6 +192,12 @@ public class M_Production_Run extends SvrProcess { { production.setProcessed(true); production.saveEx(); + + /* Immediate accounting */ + if (MClient.isClientAccountingImmediate()) { + String ignoreError = DocumentEngine.postImmediate(getCtx(), getAD_Client_ID(), production.get_Table_ID(), production.get_ID(), true, get_TrxName()); + } + } return "@OK@";