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,16 +121,12 @@ 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);
}
// out of range - set to last day
if (DateAcct == null
|| DateAcct.before(StartDate) || DateAcct.after(EndDate))
mTab.setValue("DateAcct", EndDate);
}
}
catch (SQLException e)

View File

@ -322,7 +322,10 @@ public class MJournal extends X_GL_Journal implements DocAction
}
else if (C_Period_ID != getC_Period_ID())
{
setC_Period_ID(C_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,7 +954,10 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
}
else if (C_Period_ID != getC_Period_ID())
{
setC_Period_ID(C_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);
}
}