IDEMPIERE-3325 GLJournal reverse accrual date is hard coded to system date
This commit is contained in:
parent
b20049e5a0
commit
67a903ef35
|
@ -834,9 +834,13 @@ public class MJournal extends X_GL_Journal implements DocAction
|
|||
// Journal
|
||||
MJournal reverse = new MJournal (this);
|
||||
reverse.setGL_JournalBatch_ID(GL_JournalBatch_ID);
|
||||
reverse.setDateDoc(new Timestamp(System.currentTimeMillis()));
|
||||
Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date");
|
||||
if (reversalDate == null) {
|
||||
reversalDate = new Timestamp(System.currentTimeMillis());
|
||||
}
|
||||
reverse.setDateDoc(reversalDate);
|
||||
reverse.set_ValueNoCheck ("C_Period_ID", null); // reset
|
||||
reverse.setDateAcct(reverse.getDateDoc());
|
||||
reverse.setDateAcct(reversalDate);
|
||||
// Reverse indicator
|
||||
StringBuilder msgd = new StringBuilder("(->").append(getDocumentNo()).append(")");
|
||||
reverse.addDescription(msgd.toString());
|
||||
|
|
|
@ -713,8 +713,12 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
|
|||
// Reverse it
|
||||
MJournalBatch reverse = new MJournalBatch (this);
|
||||
reverse.setC_Period_ID(0);
|
||||
reverse.setDateDoc(new Timestamp(System.currentTimeMillis()));
|
||||
reverse.setDateAcct(reverse.getDateDoc());
|
||||
Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date");
|
||||
if (reversalDate == null) {
|
||||
reversalDate = new Timestamp(System.currentTimeMillis());
|
||||
}
|
||||
reverse.setDateDoc(reversalDate);
|
||||
reverse.setDateAcct(reversalDate);
|
||||
// Reverse indicator
|
||||
StringBuilder msgd = new StringBuilder("(->").append(getDocumentNo()).append(")");
|
||||
reverse.addDescription(msgd.toString());
|
||||
|
|
Loading…
Reference in New Issue