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
| Quintiq file version 2.0
| #parent: #root
| Method MappingActualPISPIPData (
| Strings businessTypes,
| Boolean nuclear
| )
| {
| TextBody:
| [*
| // renhao Aug-14-2023 (created)
| date := Date :: Today();
| //listtodeal := selectset( this,MappingActualPISPIP,actual, not isnull( Product_MP::FindById( this, actual.ProductID() ) ) );
|
| traverse( this,MappingActualPISPIP,actual){
| product := select( this,MappingProduct,product,product.ID() = actual.ProductID() and product.KeyProduct() = nuclear,true);
| if( not isnull( product)){
| if( not isnull(businessTypes)){
|
| for( i :=0 ;i < businessTypes.Size();i++ ){
| businessType := businessTypes.Element( i);
| if( product.BusinessType() = businessType and not product.IsCommon()){
| ActualProductInStockingPointInPeriod::Create( this,actual.ProductID(),actual.StockingPointID(),actual.Description(),actual.ActualInventoryLevelEnd(),
| date,actual.ManufacturedDate(),true);
| }
| }
|
| }else{
| ActualProductInStockingPointInPeriod::Create( this,actual.ProductID(),actual.StockingPointID(),actual.Description(),actual.ActualInventoryLevelEnd(),
| date,actual.ManufacturedDate(),true);
| }
|
| }
| }
| *]
| }
|
|