IDEMPIERE-4721 : Financial Report : exclude all adjustment periods - … (#904)
* IDEMPIERE-4721 : Financial Report : exclude all adjustment periods - fix NPE reported by @CarlosRuiz-globalqss ; see https://idempiere.atlassian.net/browse/IDEMPIERE-4721?focusedCommentId=47539 * IDEMPIERE-4721 : Financial Report : exclude all adjustment periods - fix NPE Using Carlos's suggestion Co-Authored-By: Carlos Ruiz <carg67@gmail.com> Co-authored-by: Carlos Ruiz <carg67@gmail.com>
This commit is contained in:
parent
222837abb4
commit
631e25b599
|
@ -196,6 +196,9 @@ public class FinReport extends SvrProcess
|
||||||
m_report = new MReport (getCtx(), getRecord_ID(), null);
|
m_report = new MReport (getCtx(), getRecord_ID(), null);
|
||||||
sb.append(" - ").append(m_report);
|
sb.append(" - ").append(m_report);
|
||||||
|
|
||||||
|
setPeriods();
|
||||||
|
sb.append(" - C_Period_ID=").append(p_C_Period_ID).append(" - ").append(m_parameterWhere);
|
||||||
|
|
||||||
// Exclude adjustment period(s) ?
|
// Exclude adjustment period(s) ?
|
||||||
if (m_report.getExcludeAdjustmentPeriods().equals(MReport.EXCLUDEADJUSTMENTPERIODS_OnlyReportPeriod)) { // if the report period is standard and there is an adjustment period with the same end date (on the same year)
|
if (m_report.getExcludeAdjustmentPeriods().equals(MReport.EXCLUDEADJUSTMENTPERIODS_OnlyReportPeriod)) { // if the report period is standard and there is an adjustment period with the same end date (on the same year)
|
||||||
MPeriod per = MPeriod.get(getCtx(), p_C_Period_ID);
|
MPeriod per = MPeriod.get(getCtx(), p_C_Period_ID);
|
||||||
|
@ -214,12 +217,6 @@ public class FinReport extends SvrProcess
|
||||||
.append(m_report.getC_Calendar_ID()).append(" AND PeriodType = 'A') AND ").toString();
|
.append(m_report.getC_Calendar_ID()).append(" AND PeriodType = 'A') AND ").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
setPeriods();
|
|
||||||
sb.append(" - C_Period_ID=").append(p_C_Period_ID)
|
|
||||||
.append(" - ").append(m_parameterWhere);
|
|
||||||
//
|
|
||||||
|
|
||||||
if ( p_PA_ReportCube_ID > 0)
|
if ( p_PA_ReportCube_ID > 0)
|
||||||
m_parameterWhere.append(" AND PA_ReportCube_ID=").append(p_PA_ReportCube_ID);
|
m_parameterWhere.append(" AND PA_ReportCube_ID=").append(p_PA_ReportCube_ID);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue