Quintiq file version 2.0
|
#parent: #root
|
Method ResetInvalidTransitionPeriodTasks (
|
CampaignType_MP fromcampaigntype,
|
CampaignType_MP tocampaigntype,
|
Duration maxduration
|
)
|
{
|
Description: 'Reset period task quantities on transitions that will be deleted.'
|
TextBody:
|
[*
|
// All transitions will be deleted in case of change of from/to campaign type
|
if( fromcampaigntype <> this.FromCampaignType()
|
or tocampaigntype <> this.ToCampaignType() )
|
{
|
traverse( this, Transition_MP, transition )
|
{
|
transition.ResetPeriodTasks();
|
}
|
}
|
|
// All transition which no longer respect the max duration constraint will be deleted
|
else if( maxduration < this.DefaultMaxDuration() )
|
{
|
traverse( this, Transition_MP, transition, transition.Duration() > maxduration )
|
{
|
transition.ResetPeriodTasks();
|
}
|
}
|
*]
|
}
|