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
26
27
28
29
30
31
32
33
34
35
36
37
| Quintiq file version 2.0
| #parent: #root
| StaticMethod CreateFillingCapacityOrder (
| MacroPlan macroPlan,
| String id,
| Real quantity,
| Date demandDate,
| Date forecastDemandDate,
| String orderType,
| String verNo
| )
| {
| TextBody:
| [*
| targetCustomOrder := select( macroPlan, SalesDemand.astype( CustomerOrder ), tempCO, tempCO.ID() = id );
| info( "id:", id, " ", not isnull( targetCustomOrder ), " 版本号:", verNo );
| if ( not isnull( targetCustomOrder ) ) {
| macroPlan.FillingCapacityOrder( relnew,
| ID := OS::GenerateGUIDAsString(),
| ProductID := targetCustomOrder.ProductID(),
| BusinessType := targetCustomOrder.BusinessType(),
| SalesSegmentName := targetCustomOrder.SalesSegmentName(),
| StockingPointID := targetCustomOrder.StockingPointID(),
| Customer := targetCustomOrder.CustomerName(),
| CustomerID := targetCustomOrder.CustomerID(),
| Quantity := quantity,
| UnitOfMeasureName := targetCustomOrder.UnitOfMeasureName(),
| ForecastDemandDate := forecastDemandDate,
| DemandDate := demandDate,
| OrderType := orderType,
| SalesAmount := [Number]quantity,
| CurrencyID := targetCustomOrder.CurrencyID(),
| VerNo := verNo
| );
| }
| *]
| }
|
|