| Quintiq file version 2.0 | 
| #parent: #root | 
| Method GetCost ( | 
|   output Real cost_o, | 
|   output Real costwithinhorizon_o | 
| ) declarative | 
| { | 
|   Description: 'Return the total cost of account' | 
|   TextBody: | 
|   [* | 
|     // soh yee Dec-18-2013 (created) | 
|      | 
|     cost_o := 0.0; | 
|      | 
|     if( this.Child( relsize ) > 0 ) | 
|     { | 
|       traverse( this, Child, child ) | 
|       { | 
|         cost_o := cost_o + child.Cost(); | 
|         costwithinhorizon_o := costwithinhorizon_o + child.CostWithinHorizon(); | 
|       } | 
|     } | 
|     else | 
|     { | 
|       traverse( this, AccountAssignment, aa ) | 
|       { | 
|         cost_o := cost_o + aa.BaseCost(); | 
|         costwithinhorizon_o := costwithinhorizon_o + aa.BaseCostWithinKPIHorizon(); | 
|       } | 
|     } | 
|   *] | 
| } |