| Quintiq file version 2.0 | 
| #parent: #root | 
| Method CreateShadowAcountAssignmentInPeriodForStockingPointAccount ( | 
|   structured[StockingPointAccount] sas, | 
|   structured[Period_MP] activeperiods | 
| ) id:Method_FormCostsForScenarioComparison_CreateShadowAcountAssignmentInPeriodForStockingPointAccount | 
| { | 
|   #keys: '[127710.1.755579576]' | 
|   Body: | 
|   [* | 
|     // Generate AAiP for SP accounts | 
|      | 
|     traverse( sas, Elements, sa ) | 
|     { | 
|       traverse( sa, StockingPoint_MP.StockingPointInPeriod, spip, spip.Period_MP().IsInPeriods( activeperiods ) ) | 
|       { | 
|         costinperiod := spip.GetStockingPointCost( sa ); | 
|         basecost := sa.GetBaseCost( costinperiod, spip ); | 
|      | 
|         FormCostsForScenarioComparison.CreateAccountAssignmentInPeriod( spip.Period_MP(), sa, guard( costinperiod.Cost(), 0.0 ), basecost ); | 
|       } | 
|     } | 
|   *] | 
| } |