Quintiq file version 2.0
#parent: MatrixEditorProductPlanning_679
Response OnCheckEditability (
  structured[ProductInStockingPointInPeriodPlanning] cell,
  Real value
) id:Response_MatrixEditorProductPlanning_679_OnCheckEditability
{
  #keys: '[412960.0.220270404]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMatrixEditor_OnCheckEditability'
  QuillAction
  {
    Body:
    [*
      //Precondition
      attributes := construct( Strings );
      attributes.Add(focusedattribute);
      isSupply_o := false;
      feedback :="";
      
      cond := MacroPlan.CanPlan( feedback )
              and ProductInStockingPointInPeriod::CanEnterSupplyQuantity( feedback,
                                                                          cell,
                                                                          attributes,
                                                                          isSupply_o );
      if( cond )
      {
        if( isSupply_o )
        {
          periods := selectset( cell, Elements.Period_MP, period, true );
          cond := ScenarioManager::CanStartSmartPlan( ScenarioManager,
                                                      DataHolderActiveScenario.Data(),
                                                      true,
                                                      periods,
                                                      feedback );
        }                                            
      }
      editinfo.CanEdit( cond );
      editinfo.UserHint( feedback );
    *]
    GroupServerCalls: false
  }
}
