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:
parent
8390b8ed16
commit
0ab9dca20d
|
@ -1628,9 +1628,9 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
}
|
}
|
||||||
if (!po.isPosted())
|
if (!po.isPosted())
|
||||||
addDocsPostProcess(po);
|
addDocsPostProcess(po);
|
||||||
if (po.getMatchInvCreated() != null) {
|
MMatchInv matchInvCreated = po.getMatchInvCreated();
|
||||||
addDocsPostProcess(po.getMatchInvCreated());
|
if (matchInvCreated != null) {
|
||||||
po.setMatchInvCreated(null);
|
addDocsPostProcess(matchInvCreated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Update PO with ASI
|
// Update PO with ASI
|
||||||
|
|
|
@ -551,15 +551,24 @@ public class MMatchPO extends X_M_MatchPO
|
||||||
|
|
||||||
|
|
||||||
private MMatchInv m_matchInv;
|
private MMatchInv m_matchInv;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the match inv created for immediate accounting purposes
|
* Register the match inv created for immediate accounting purposes
|
||||||
* @param matchInv
|
* @param matchInv
|
||||||
*/
|
*/
|
||||||
public void setMatchInvCreated(MMatchInv matchInv) {
|
private void setMatchInvCreated(MMatchInv matchInv) {
|
||||||
m_matchInv = 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() {
|
public MMatchInv getMatchInvCreated() {
|
||||||
return m_matchInv;
|
MMatchInv tmp = m_matchInv;
|
||||||
|
m_matchInv = null;
|
||||||
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Static Logger */
|
/** Static Logger */
|
||||||
|
|
Loading…
Reference in New Issue