limj
2023-09-25 979fac481dc55ff7b426f368d9a968d1b87001ac
_Main/BL/Type_FilllingCapacityOrderScheme/StaticMethod_CreateFillingCapacityOrderScheme.qbl
@@ -8,7 +8,7 @@
  TextBody:
  [*
    // NBoTk Sep-14-2023 (created)
    info('test' )
    fillingCapacityOrders := selectset( owner,FillingCapacityOrder,fillingOrder,
                                        not fillingOrder.IsFilling()
                                        );
@@ -43,27 +43,35 @@
    {
      e.SchemeName(schemeName);
      e.IsFilling(true);
      filllingCapacityOrderScheme.FillingCapacityOrder(relinsert, e);
    }
    // 版本号
    verNoOrder := select( filllingCapacityOrderScheme,FillingCapacityOrder,o,
                                 o.VerNo() <> ''
                                 )
    
    // 需要将销售订单和预售订单同时保存到方案中
    traverse( owner,CustomerAndForecastOrder,order)
    {
         fillingOrder := owner.FillingCapacityOrder(relnew,BusinessType := order.BusinessType(),Customer := order.Customer(),CustomerID := order.CustomerID(),
                                                                           DemandDate := order.DemandDate(),ForecastDemandDate := order.ForecastDemandDate(),IsFilling := true,
                                                                           OrderType := '提拉',PanelBigSheetQuantity := order.PanelBigSheetQuantity(),ProductID := order.ProductID(),
                                                                           Quantity := order.Quantity(),SalesSegmentName := order.SalesSegmentName(),SalesAmount := order.SalesAmount(),
                                                                           SchemeName := schemeName,StockingPointID := order.StockingPointID(),UnitOfMeasureName := order.UnitOfMeasureName(),
                                                                           VerNo := verNoOrder.VerNo()
                                                                           );
        filllingCapacityOrderScheme.FillingCapacityOrder(relinsert, fillingOrder);
    }
    //traverse( owner,CustomerAndForecastOrder,order)
    //{
    //
    //     fillingOrder := owner.FillingCapacityOrder(relnew,BusinessType := order.BusinessType(),Customer := order.Customer(),CustomerID := order.CustomerID(),
    //                                                                       DemandDate := order.DemandDate(),ForecastDemandDate := order.ForecastDemandDate(),IsFilling := true,
    //                                                                       OrderType := '提拉',PanelBigSheetQuantity := order.PanelBigSheetQuantity(),ProductID := order.ProductID(),
    //                                                                       Quantity := order.Quantity(),SalesSegmentName := order.SalesSegmentName(),SalesAmount := order.SalesAmount(),
    //                                                                       SchemeName := schemeName,StockingPointID := order.StockingPointID(),UnitOfMeasureName := order.UnitOfMeasureName(),
    //                                                                       VerNo := order.VerNo()
    //                                                                       );
    //
    //    filllingCapacityOrderScheme.FillingCapacityOrder(relinsert, fillingOrder);
    //}
    //// 新增反签/授权订单 订单信息加入填产
    //traverse( owner,H_Forecast,hf)
    //{
    //          fillingOrder := owner.FillingCapacityOrder(relnew,BusinessType := hf.Department(),Customer := hf.CustomName(),CustomerID := hf.CustomCode(),
    //                                                                       DemandDate := Date::Today(),ForecastDemandDate := Date::Today(),IsFilling := true,
    //                                                                       OrderType := '提拉',PanelBigSheetQuantity := 0,ProductID := '',
    //                                                                       Quantity := hf.ForecastQty(),SalesSegmentName := '',SalesAmount := 0,
    //                                                                       SchemeName := schemeName,StockingPointID := '',UnitOfMeasureName := hf.Util(),
    //                                                                       VerNo := ''
    //                                                                       );
    //
    //    filllingCapacityOrderScheme.FillingCapacityOrder(relinsert, fillingOrder);
    //}
  *]
}