admin
2024-09-05 20470cd32eaebc49c5b8eea0e1908743846ade67
_Main/BL/Type_Archive/StaticMethod_GenerateForecast.qbl
@@ -12,7 +12,11 @@
    }
    
    traverse ( archiveExecutionStatus, TemporaryDemandData, tdd ,tdd.Origin() = "" or tdd.StartDate() >= macroPlan.StartOfPlanning().Date()) {
      targetProduct_MP       := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = tdd.ProductID() );
      targetProduct_MP       := select( macroPlan, Product_MP, tempPMP, tempPMP.Notes() = tdd.ProductID() );
      if( isnull( targetProduct_MP )){
        targetProduct_MP       := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = tdd.ProductID() );
      }
      // targetProduct_MP       := select( macroPlan, Product_MP, tempPMP, tempPMP.Notes() = tdd.ProductID() );
      targetStockingPoint_MP := select( macroPlan, StockingPoint_MP, tempSPMP, tempSPMP.ID() = tdd.StockingPointID() );
      // info( tdd.SalesSegmentName() );
      if ( not isnull( targetProduct_MP ) and not isnull( targetStockingPoint_MP ) ) {
@@ -32,6 +36,9 @@
                          false );
        forcest.Origin( tdd.Origin() );
      }
      if( isnull( targetProduct_MP )){
        info( tdd.ProductID() + " -> 未找到" );
      }
    }
  *]
}