IDEMPIERE-2218 Cannot reverse journal with control amount

This commit is contained in:
Carlos Ruiz 2014-09-29 17:48:50 -05:00
parent 2d71a422d1
commit d04844a375
2 changed files with 2 additions and 0 deletions

View File

@ -756,6 +756,7 @@ public class MJournal extends X_GL_Journal implements DocAction
// Reverse indicator
StringBuilder msgd = new StringBuilder("(->").append(getDocumentNo()).append(")");
reverse.addDescription(msgd.toString());
reverse.setControlAmt(getControlAmt().negate());
//FR [ 1948157 ]
reverse.setReversal_ID(getGL_Journal_ID());
if (!reverse.save())

View File

@ -630,6 +630,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
// Reverse indicator
StringBuilder msgd = new StringBuilder("(->").append(getDocumentNo()).append(")");
reverse.addDescription(msgd.toString());
reverse.setControlAmt(getControlAmt().negate());
//[ 1948157 ]
reverse.setReversal_ID(getGL_JournalBatch_ID());
reverse.saveEx();