diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index 2b3b38c527..e9eb47a446 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -1628,6 +1628,10 @@ public class MInOut extends X_M_InOut implements DocAction } if (!po.isPosted()) addDocsPostProcess(po); + if (po.getMatchInvCreated() != null) { + addDocsPostProcess(po.getMatchInvCreated()); + po.setMatchInvCreated(null); + } } // Update PO with ASI if ( oLine != null && oLine.getM_AttributeSetInstance_ID() == 0 diff --git a/org.adempiere.base/src/org/compiere/model/MMatchPO.java b/org.adempiere.base/src/org/compiere/model/MMatchPO.java index 41904ec972..99bf94df30 100644 --- a/org.adempiere.base/src/org/compiere/model/MMatchPO.java +++ b/org.adempiere.base/src/org/compiere/model/MMatchPO.java @@ -59,8 +59,7 @@ public class MMatchPO extends X_M_MatchPO /** * */ - private static final long serialVersionUID = 7189366329684552916L; - + private static final long serialVersionUID = -3669451656879485463L; /** * Get PO Match with order/invoice @@ -446,6 +445,7 @@ public class MMatchPO extends X_M_MatchPO s_log.fine(msg); continue; } + mpo.setMatchInvCreated(matchInv); if (savepoint != null) { try { @@ -549,7 +549,19 @@ public class MMatchPO extends X_M_MatchPO return retValue; } // create - + + private MMatchInv m_matchInv; + /** + * Register the match inv created for immediate accounting purposes + * @param matchInv + */ + public void setMatchInvCreated(MMatchInv matchInv) { + m_matchInv = matchInv; + } + public MMatchInv getMatchInvCreated() { + return m_matchInv; + } + /** Static Logger */ private static CLogger s_log = CLogger.getCLogger (MMatchPO.class);