yanweiyuan3
2023-10-27 d1d15b61dfcf7fd0f800b32359f082cf580ed556
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
Quintiq file version 2.0
#parent: SplitterWnd1/MatrixEditorSupply
Response OnCreateValue (
  Real value,
  Operation row,
  Period_MP column
) id:Response_SplitterWnd1_MatrixEditorSupply_OnCreateValue
{
  #keys: '[110880.8.1141991702]'
  Body:
  [*
    // Create supplies for the selected cell
    
    selectedpisp := select( DataHolderProductInSPIP.Data(), Elements.ProductInStockingPoint_MP, pisp,
                            exists( pisp, ProcessOutput.AsProcessOutput, process, process = row ) );
    
    pispip := select( selectedpisp, ProductInStockingPointInPeriod, p,
                      p.Period_MP() = column );
    
    if( not isnull( pispip ) )
    {
      pispip.CreateUpdateOperationNewSupplies( row, value );
    }
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_MatrixEditor_OnCreateValue'
  Precondition:
  [*
    // The new supply or dependent demand which falls outside planning horizon is considered invalid
    
    return row.CanCreateSupply( feedback, column );
  *]
}