1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method SetSubscriptionPeriodWithEndDate ( 
 |    Date endDate_i 
 |  ) 
 |  { 
 |    Description: 
 |    [* 
 |      Set a subscription period that ends at a specific date. 
 |      If not period exists yet, the startdate of the LeadingParticipation is used as startdate of the recurrence. 
 |    *] 
 |    TextBody: 
 |    [* 
 |      // If no RecurrencePeriod exists yet, use the StartDate of the LeadingParticipation as StartDate of the RecurrencePeriod. 
 |      period    := this.GetRecurrencePeriod(); 
 |      startDate := ifexpr( not isnull( period ), period.StartDate(), this.LeadingParticipation().StartDate() ); 
 |       
 |      this.SetSubscriptionPeriodWithEndDate( startDate, endDate_i ); 
 |    *] 
 |  } 
 |  
  |