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
|
// Journal
|
||||||
MJournal reverse = new MJournal (this);
|
MJournal reverse = new MJournal (this);
|
||||||
reverse.setGL_JournalBatch_ID(GL_JournalBatch_ID);
|
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.set_ValueNoCheck ("C_Period_ID", null); // reset
|
||||||
reverse.setDateAcct(reverse.getDateDoc());
|
reverse.setDateAcct(reversalDate);
|
||||||
// Reverse indicator
|
// Reverse indicator
|
||||||
StringBuilder msgd = new StringBuilder("(->").append(getDocumentNo()).append(")");
|
StringBuilder msgd = new StringBuilder("(->").append(getDocumentNo()).append(")");
|
||||||
reverse.addDescription(msgd.toString());
|
reverse.addDescription(msgd.toString());
|
||||||
|
|
|
@ -713,8 +713,12 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
|
||||||
// Reverse it
|
// Reverse it
|
||||||
MJournalBatch reverse = new MJournalBatch (this);
|
MJournalBatch reverse = new MJournalBatch (this);
|
||||||
reverse.setC_Period_ID(0);
|
reverse.setC_Period_ID(0);
|
||||||
reverse.setDateDoc(new Timestamp(System.currentTimeMillis()));
|
Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date");
|
||||||
reverse.setDateAcct(reverse.getDateDoc());
|
if (reversalDate == null) {
|
||||||
|
reversalDate = new Timestamp(System.currentTimeMillis());
|
||||||
|
}
|
||||||
|
reverse.setDateDoc(reversalDate);
|
||||||
|
reverse.setDateAcct(reversalDate);
|
||||||
// Reverse indicator
|
// Reverse indicator
|
||||||
StringBuilder msgd = new StringBuilder("(->").append(getDocumentNo()).append(")");
|
StringBuilder msgd = new StringBuilder("(->").append(getDocumentNo()).append(")");
|
||||||
reverse.addDescription(msgd.toString());
|
reverse.addDescription(msgd.toString());
|
||||||
|
|
Loading…
Reference in New Issue