Enable immediate accounting for Production Document

Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2857289
This commit is contained in:
Carlos Ruiz 2011-02-27 01:04:54 -05:00
parent 3eb5515dd7
commit 38a5d1b420
1 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import java.sql.Timestamp;
import java.util.List; import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import org.compiere.model.MClient;
import org.compiere.model.MLocator; import org.compiere.model.MLocator;
import org.compiere.model.MProduct; import org.compiere.model.MProduct;
import org.compiere.model.MStorage; import org.compiere.model.MStorage;
@ -191,6 +192,12 @@ public class M_Production_Run extends SvrProcess {
{ {
production.setProcessed(true); production.setProcessed(true);
production.saveEx(); 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@"; return "@OK@";