| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod CreateSalesVolumeByScenario ( | 
|   MacroPlans macroPlans, | 
|   GlobalOTDSOP this, | 
|   CapacityAndSaleBudgeFilterMonths months, | 
|   CapacityAndSaleBudgeFilterYear year | 
| ) | 
| { | 
|   TextBody: | 
|   [* | 
|     traverse ( macroPlans, Elements, mp ) { | 
|       traverse ( this, CapacityAndSaleBudgeCompareItemRow, casbcir ) { | 
|         total := 0.0; | 
|         traverse ( months, Elements, m ) { | 
|           columnName  := "对外销售额-" + [String]year.YearNo() + "年-" + [String]m.MonthNo() + "月-" + mp.ScenarioName(); | 
|           columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, columnName ); | 
|           cellReal    := Forecast::GetFulfilledBalanceByMonth( casbcir.GetProductCodes(), mp, year.YearNo(), m.MonthNo() ); | 
|           cell        := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal ); | 
|           total       := total + cellReal; | 
|           cell.CapacityAndSaleBudgeCompareItemRow( relset, casbcir ); | 
|         } | 
|         columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对外销售额-" + [String]year.YearNo() + "年-total-" + mp.ScenarioName() ); | 
|         cell       := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]total ); | 
|         columnYear.TotalIdentification( year.YearNo() ); | 
|         cell.CapacityAndSaleBudgeCompareItemRow( relset, casbcir ); | 
|       } | 
|     } | 
|   *] | 
| } |