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
Quintiq file version 2.0
#parent: #root
Method CanLinkToStockingPoint (
  StockingPoint_MP stockingpoint,
  Boolean isInput
) declarative remote as Boolean
{
  Description:
  [*
    Checks if there is a link between the given unit and stocking point.
    The direction of the link is specified by isInput.
    If isInput is true, then the existence of the link from the stocking point to the unit is checked.
    If isInput is false, then the existence of the link from the unit to the stocking point is checked.
  *]
  TextBody:
  [*
    // DWE2 Apr-8-2016 (created)
    value := exists( this, StockingPointUnit, spu,
                     spu.IsInput() = isInput,
                     spu.StockingPoint_MP() = stockingpoint );
    
    return not value;
  *]
}