IDEMPIERE-3874 Process Recalculate Cube not loading GL journal facts due to c_calendar_id

This commit is contained in:
Carlos Ruiz 2019-04-18 15:31:12 +02:00
parent 0a9d7335de
commit eb82017e1e
3 changed files with 12 additions and 10 deletions

View File

@ -121,18 +121,14 @@ public class CalloutGLJournal extends CalloutEngine
rs = pstmt.executeQuery();
if (rs.next())
{
String PeriodType = rs.getString(1);
Timestamp StartDate = rs.getTimestamp(2);
Timestamp EndDate = rs.getTimestamp(3);
if (PeriodType.equals("S")) // Standard Periods
{
// out of range - set to last day
if (DateAcct == null
|| DateAcct.before(StartDate) || DateAcct.after(EndDate))
mTab.setValue("DateAcct", EndDate);
}
}
}
catch (SQLException e)
{
log.log(Level.SEVERE, sql, e);

View File

@ -322,6 +322,9 @@ public class MJournal extends X_GL_Journal implements DocAction
}
else if (C_Period_ID != getC_Period_ID())
{
/* special case when assigning an adjustment period */
MPeriod currentPeriod = MPeriod.get(getCtx(), getC_Period_ID());
if (currentPeriod.isStandardPeriod())
setC_Period_ID(C_Period_ID);
}
}

View File

@ -954,6 +954,9 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
}
else if (C_Period_ID != getC_Period_ID())
{
/* special case when assigning an adjustment period */
MPeriod currentPeriod = MPeriod.get(getCtx(), getC_Period_ID());
if (currentPeriod.isStandardPeriod())
setC_Period_ID(C_Period_ID);
}
}