hongjli
2023-10-11 ab469f9de1c0e446965e0d926ee0769e51a90cdc
_Main/BL/Type_CapacityAllocationResultsRuleConfiguration/StaticMethod_AutomaticallyGenerateCapacityRules.qbl
@@ -9,8 +9,15 @@
  [*
    targetProduct_MP := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = "Chassis - SUV 1" );
    
    period_MPS := null( Period_MPs );
    traverse ( macroPlan, PeriodSpecification_MP, psmp, psmp.ID() = "Planning periods" ) {
      period_MPS := selectsortedset( psmp, PeriodSpecificationPeriod.Period_MP, pmp, not pmp.IsHistorical(), pmp.StartDate() );
    }
    traverse ( targetProduct_MP, ProductInStockingPoint_MP, pisp ) {
      CapacityAllocationResultsRuleConfiguration::RecursiveGeneration( macroPlan, pisp );
      traverse ( period_MPS, Elements, pmp ) {
        CapacityAllocationResultsRuleConfiguration::RecursiveGeneration( macroPlan, pisp, pisp, pmp.StartDate() );
      }
    }
  *]
}