yypsybs
2023-09-09 3cb5a54def670d97301f07170fcaad213bfc54f2
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
38
39
40
41
42
43
44
45
46
47
48
49
50
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() ) ) );
    //totalcount := listtodeal.Size();
    //info( "ActualPISPIP has " + totalcount.AsQUILL() + " rows in total" );
    //
    //count := 0;
    //traverse( listtodeal,Elements,actual){
    //  count := count + 1;
    //  if( count - [Number](count/100) * 100 = 0 or count = totalcount ){
    //    info( "Now is dealing with the " + count.AsQUILL() + "ActualPISPIP " + "( " + count.AsQUILL() + "/" + totalcount.AsQUILL() + " ) " + (count/totalcount*100).Round( 1 ).AsQUILL() + "%" );
    //    }
    //  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::CreateOrUpdate( this,
    //                                                              actual.ProductID(),
    //                                                              actual.StockingPointID(),
    //                                                              actual.Description(),
    //                                                              actual.ActualInventoryLevelEnd(),
    //                                                              actual.ManufacturedDate());
    //      }
    //    }
    //    
    //  }else{
    //    ActualProductInStockingPointInPeriod::CreateOrUpdate( this,
    //                                                          actual.ProductID(),
    //                                                          actual.StockingPointID(),
    //                                                          actual.Description(),
    //                                                          actual.ActualInventoryLevelEnd(),
    //                                                          actual.ManufacturedDate());
    //  }
    //    
    //  }
    //}
  *]
}