IDEMPIERE-3120 Cannot reverse MatchInv-Doc When CLIENT_ACCOUNTING_DISABLED

This commit is contained in:
Carlos Ruiz 2016-08-10 18:03:56 +02:00
parent 6e66447ae8
commit e8cba8acc5
3 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ public class MatchInvReverse extends SvrProcess {
if (inv.get_ID() != p_M_MatchInv_ID) if (inv.get_ID() != p_M_MatchInv_ID)
throw new AdempiereException("@NotFound@ @M_MatchInv_ID@ " + p_M_MatchInv_ID); throw new AdempiereException("@NotFound@ @M_MatchInv_ID@ " + p_M_MatchInv_ID);
if (inv.isPosted()) if (inv.isProcessed())
{ {
Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date"); Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date");
if (reversalDate == null) { if (reversalDate == null) {

View File

@ -46,7 +46,7 @@ public class MatchPOReverse extends SvrProcess {
MMatchPO po = new MMatchPO (getCtx(), p_M_MatchPO_ID, get_TrxName()); MMatchPO po = new MMatchPO (getCtx(), p_M_MatchPO_ID, get_TrxName());
if (po.get_ID() != p_M_MatchPO_ID) if (po.get_ID() != p_M_MatchPO_ID)
throw new AdempiereException("@NotFound@ @M_MatchPO_ID@ " + p_M_MatchPO_ID); throw new AdempiereException("@NotFound@ @M_MatchPO_ID@ " + p_M_MatchPO_ID);
if (po.isPosted()) if (po.isProcessed())
{ {
Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date"); Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date");
if (reversalDate == null) { if (reversalDate == null) {

View File

@ -366,7 +366,7 @@ public class MMatchInv extends X_M_MatchInv
*/ */
public boolean reverse(Timestamp reversalDate) public boolean reverse(Timestamp reversalDate)
{ {
if (this.isPosted() && this.getReversal_ID() == 0) if (this.isProcessed() && this.getReversal_ID() == 0)
{ {
MMatchInv reversal = new MMatchInv (getCtx(), 0, get_TrxName()); MMatchInv reversal = new MMatchInv (getCtx(), 0, get_TrxName());
PO.copyValues(this, reversal); PO.copyValues(this, reversal);