IDEMPIERE-1174 Found a matchinv created on matchpo was not being posted on immediate accounting / follow recommendation from Heng Sin about privacy of method

This commit is contained in:
Carlos Ruiz 2013-07-17 22:27:22 -05:00
parent 8390b8ed16
commit 0ab9dca20d
2 changed files with 14 additions and 5 deletions

View File

@ -1628,9 +1628,9 @@ public class MInOut extends X_M_InOut implements DocAction
}
if (!po.isPosted())
addDocsPostProcess(po);
if (po.getMatchInvCreated() != null) {
addDocsPostProcess(po.getMatchInvCreated());
po.setMatchInvCreated(null);
MMatchInv matchInvCreated = po.getMatchInvCreated();
if (matchInvCreated != null) {
addDocsPostProcess(matchInvCreated);
}
}
// Update PO with ASI

View File

@ -551,15 +551,24 @@ public class MMatchPO extends X_M_MatchPO
private MMatchInv m_matchInv;
/**
* Register the match inv created for immediate accounting purposes
* @param matchInv
*/
public void setMatchInvCreated(MMatchInv matchInv) {
private void setMatchInvCreated(MMatchInv matchInv) {
m_matchInv = matchInv;
}
/**
* Get the match inv created for immediate accounting purposes
* Is cleared after read, so if you read twice second time it returns null
* @param matchInv
*/
public MMatchInv getMatchInvCreated() {
return m_matchInv;
MMatchInv tmp = m_matchInv;
m_matchInv = null;
return tmp;
}
/** Static Logger */