Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method Update ( 
 | 
  Boolean hasuom, 
 | 
  String unitofmeasurename, 
 | 
  Boolean isnegativeinventoryallowed, 
 | 
  Boolean isexcluded, 
 | 
  Boolean isexcludedfrombalancing, 
 | 
  Boolean issafetystockkept, 
 | 
  Real inputlotsize, 
 | 
  Boolean isexcludeshelflife, 
 | 
  Boolean isfromdb 
 | 
) 
 | 
{ 
 | 
  Description: 'Update instance of PISP specification.' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // TYG2 Jul-21-2016 (created) 
 | 
     
 | 
    this.HasUnitOfMeasure( hasuom ); 
 | 
    this.UnitOfMeasureName( unitofmeasurename ); 
 | 
    this.IsExcluded( isexcluded ); 
 | 
    this.IsExcludedFromBalancing( isexcludedfrombalancing );  
 | 
    this.IsSafetyStockKept( issafetystockkept ); 
 | 
    this.InputLotSize( inputlotsize ); 
 | 
     
 | 
    isNegativeInventoryAllowedChanged := isnegativeinventoryallowed <> this.IsNegativeInventoryAllowed() 
 | 
    this.IsNegativeInventoryAllowed( isnegativeinventoryallowed ); 
 | 
    // if the is allowed is updated 
 | 
    if( isNegativeInventoryAllowedChanged 
 | 
        and not isnull( this.ProductInStockingPoint_MP() ) ) 
 | 
    { 
 | 
      // This relation will be null when this is called in MPSync::ImportProducts, 
 | 
      // because PISP is generated by lanes, routings or sales demands, those are 
 | 
      // imported after products. 
 | 
      this.ProductInStockingPoint_MP().OnSettingIsNegativeAllowed(); 
 | 
    } 
 | 
     
 | 
    this.IsExcludeShelfLifeAndMaturation( isexcludeshelflife ); 
 | 
    this.IsManuallyConfigured( not isfromdb ) 
 | 
  *] 
 | 
} 
 |