admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Quintiq file version 2.0
#parent: #root
Method LibMon_ColIectInfo (
  String objectname
) const declarative remote as Number
{
  Description: 'Retrieve object specific information.'
  TextBody:
  [*
    val := 0;
    
    if( objectname = typeof( Period_MP ).ShortName() )
    {
      val := this.Period_MP( relsize );
    }
    else if( objectname = typeof( Product_MP ).ShortName() )
    {
      val := this.Product_MP( relsize );
    }
    else if( objectname = typeof( StockingPoint_MP ).ShortName() )
    {
      val := this.StockingPoint_MP( relsize );
    }
    else if( objectname = typeof( ProductInStockingPoint_MP ).ShortName() )
    {
      val := counter( this, Product_MP.ProductInStockingPoint_MP, pisp, true );
    }
    else if( objectname = typeof( Unit ).ShortName() )
    {
      val := this.Unit( relsize );
    }
    else if( objectname = typeof( Routing ).ShortName() )
    {
      val := this.Routing( relsize );
    }
    else if( objectname = typeof( RoutingStep ).ShortName() )
    {
      val := counter( this, Routing.RoutingStep, rs, true );
    }
    else if( objectname = typeof( Lane ).ShortName() )
    {
      val := counter( this, Unit.Lane, lane, true );
    }
    else if( objectname = typeof( LaneLeg ).ShortName() )
    {
      val := counter( this, Unit.Lane.LaneLeg, ll, true );
    }
    else if( objectname = typeof( PeriodTask_MP ).ShortName() )
    {
      periods := selectset( this, Period_MP, p, not p.IsHistorical() ); // Count only non historical period task operation
      val := counter( periods, Elements.UnitPeriod.PeriodTaskOperation, pt, true );
    }
    else if( objectname = typeof( Trip ).ShortName() )
    {
      periods := selectset( this, Period_MP, p, not p.IsHistorical() ); // Count only non historical trip
      val := counter( periods, Elements.UnitPeriod.astype( UnitPeriodTransportBase ).AsDepartureUnitPeriod, trip, true );
    }
    else if( objectname = typeof( CampaignType_MP ).ShortName() )
    {
      val := counter( this, Unit.CampaignType_MP, c, true );
    }
    else if( objectname = typeof( Recipe ).ShortName() )
    {
      val := this.Recipe( relsize );
    }
    else if( objectname = typeof( Forecast ).ShortName() )
    {
      val := this.SalesDemand( relsize );
    }
    
    return val;
  *]
}