1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
| Quintiq file version 2.0
| #parent: #root
| Method SnapToGanttChart () id:Method_BaseFormCapacityPlanning_SnapToGanttChart
| {
| #keys: '[136682.2.891037353]'
| Body:
| [*
| //Ensure visibility of gantt chart
| if( not isnull( MacroPlan ) )
| {
| futureperiods := selectset( ApplicationMacroPlanner.DataHolderPeriods().Data(), Elements, period, true, not period.IsHistorical() );
|
| start := min( futureperiods, Elements, period, true , period.Start() );
| end := max( futureperiods, Elements, period, true, period.End() );
|
| maxloop := minvalue( futureperiods.Size(), 12 );
|
| start := ifexpr( start.IsFinite(), start, MacroPlan.StartOfPlanning() );
|
|
| periodEnd := guard( futureperiods.Element( maxloop -1 ), null( Period_MP ) );
|
| end := guard( periodEnd.End(), start );
|
| GanttChartCapacityPlanning.Show( start, end );
| GanttChartCapacityPlanning.EnsureVisible( start, "left" );
| }
| *]
| }
|
|