IDEMPIERE-5790 Improve Report Refresh functionality (#2246)

This commit is contained in:
Carlos Ruiz 2024-02-17 12:17:35 +01:00
parent b9736de0eb
commit 0a779db755
2 changed files with 4 additions and 2 deletions

View File

@ -267,8 +267,10 @@ public class FinReport extends SvrProcess
FinReportPeriod frp = new FinReportPeriod (rs.getInt(1), rs.getString(2), FinReportPeriod frp = new FinReportPeriod (rs.getInt(1), rs.getString(2),
rs.getTimestamp(3), rs.getTimestamp(4), rs.getTimestamp(5)); rs.getTimestamp(3), rs.getTimestamp(4), rs.getTimestamp(5));
list.add(frp); list.add(frp);
if (p_C_Period_ID == 0 && frp.inPeriod(today)) if (p_C_Period_ID == 0 && frp.inPeriod(today)) {
p_C_Period_ID = frp.getC_Period_ID(); p_C_Period_ID = frp.getC_Period_ID();
break;
}
} }
} }
catch (Exception e) catch (Exception e)

View File

@ -1615,7 +1615,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, IRep
*/ */
private void cmd_refresh() { private void cmd_refresh() {
int AD_Process_ID = m_reportEngine.getPrintInfo() != null ? m_reportEngine.getPrintInfo().getAD_Process_ID() : 0; int AD_Process_ID = m_reportEngine.getPrintInfo() != null ? m_reportEngine.getPrintInfo().getAD_Process_ID() : 0;
if(AD_Process_ID <= 0) if(AD_Process_ID <= 0 || m_reportEngine.getPrintInfo().getRecord_ID() > 0)
this.cmd_report(); this.cmd_report();
else else
this.cmd_reRun(MProcess.SHOWHELP_RunSilently_TakeDefaults); this.cmd_reRun(MProcess.SHOWHELP_RunSilently_TakeDefaults);