Quintiq file version 2.0
|
#parent: #root
|
Function CalcStartTime
|
{
|
TextBody:
|
[*
|
value := this.OptCampaignUnitSubPeriod().StartTime();
|
if( this.IsFirstElementTypeInCombi() )
|
{
|
////////////////////////////////////////////////////////////////////////////////////////////
|
//If this is the first element type in the combi then take the combi start time
|
////////////////////////////////////////////////////////////////////////////////////////////
|
value := this.OptCampaignCombi().StartTimeFirstElement();
|
}
|
else if( not isnull( this.PreviousCombiElement() )
|
and ( not this.PreviousCombiElement().IsFirstElementTypeInCombi() )
|
)
|
{
|
////////////////////////////////////////////////////////////////////////////////////////////
|
//The second element type in the combi will start at the start of the period as that would
|
//make sure we add all possible combinations in the last subperiod will be generated. Subsequent
|
//elements will start at the min end time of the previous element.
|
////////////////////////////////////////////////////////////////////////////////////////////
|
value := this.PreviousCombiElement().MinEndTime();
|
}
|
|
this.StartTime( value );
|
*]
|
}
|