hongji.li
2023-11-03 d6bd7a69bc31efa79b21c7be12ba9547a921c251
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Quintiq file version 2.0
#parent: #root
StaticMethod GetQuantity (
  CapacityAndSaleBudgeCompareItemRows casbcirs,
  String calculationConditions,
  String scenarioName,
  Number year,
  CapacityAndSaleBudgeFilterMonths months
) as Real
{
  TextBody:
  [*
    total := 0.0;
    
    total := sum( casbcirs, Elements.CapacityAndSaleBudgeCompareItemCell, tempCASBCIC,
                  tempCASBCIC.CapacityAndSaleBudgeCompareItemColumn().ColumnType() = calculationConditions and
                  tempCASBCIC.CapacityAndSaleBudgeCompareItemColumn().ScenarioName() = scenarioName        and
                  tempCASBCIC.CapacityAndSaleBudgeCompareItemColumn().Year() = year                        and
                  exists( months, Elements, tempM, tempM.MonthNo() = tempCASBCIC.CapacityAndSaleBudgeCompareItemColumn().Month() ),
                  [Real]tempCASBCIC.CellContent()
                 );
    
    return total;
  *]
}