Quintiq file version 2.0 
 | 
#parent: #root 
 | 
MethodOverride GetActualCosts ( 
 | 
  Period_MP period 
 | 
) remote as Real 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    totalCost := 0.0; 
 | 
     
 | 
    if( this.CostDriver() = Translations::MP_AccountAssignmentCostDriverFixed() ) 
 | 
    { 
 | 
      if( period.IsPlanning() ) //planning period, derive calculation 
 | 
      { 
 | 
        totalCost := sum( this, StockingPoint_MP.StockingPointInPeriod, bup, 
 | 
                          bup.Period_MP() = period, 
 | 
                          bup.GetTotalBaseFixedCost()  ); 
 | 
      } 
 | 
      else if( period.IsBase() ) //base period, disaggregate from planning period 
 | 
      { 
 | 
        totalCost := this.GetActualCosts( period.PlanningPeriod() ) * period.PlanningSystemRatio(); 
 | 
      } 
 | 
      else  //non base non planning, sum from planning 
 | 
      { 
 | 
        traverse( this, StockingPoint_MP.StockingPointInPeriod, spip, spip.Period_MP() = period ) 
 | 
        { 
 | 
          traverse( spip.GetChildrenOfPeriodDimension(), Elements, childspip ) 
 | 
          { 
 | 
            totalCost := totalCost + this.GetActualCosts( childspip.Period_MP() ); 
 | 
          } 
 | 
        }                   
 | 
      } 
 | 
    } 
 | 
     
 | 
     
 | 
    return totalCost; 
 | 
  *] 
 | 
} 
 |