Quintiq file version 2.0
|
#parent: #root
|
StaticMethod GetHasAllDefaultSmartPlanSettings (
|
Boolean isuseselectedunits,
|
Boolean isplanonestepupstream,
|
Boolean isupstream,
|
output String feedback_o,
|
String smartplandirection
|
) declarative remote as Boolean
|
{
|
Description: 'Returns a warning to the user about non-default settings that could potentially lead to unexpected smart plan results'
|
TextBody:
|
[*
|
// Returns a warning to the user about non-default settings that could potentially lead to unexpected smart plan results
|
isalldefault := true;
|
|
// Check if the smart plan direction is towards downstream
|
if( smartplandirection <> SmartPlanSetting::MiddleOut() )
|
{
|
isalldefault := false;
|
feedback_o := feedback_o +
|
String::NewLine()
|
+ Translations::MP_Designer_DialogSmartPlan_SmartPlanDirection( smartplandirection );
|
}
|
// Check if the smart plan is using selected units only
|
if( isuseselectedunits )
|
{
|
isalldefault := false;
|
feedback_o := feedback_o +
|
String::NewLine()
|
+ Translations::MP_Designer_DialogSmartPlan_OnlyUseSelectedUnits();
|
}
|
// Check if smart plan is limited to planning one step upstream only
|
if( isplanonestepupstream )
|
{
|
isalldefault := false;
|
feedback_o := feedback_o +
|
String::NewLine()
|
+ Translations::MP_Designer_DialogSmartPlan_OnlyOneStepUpstream();
|
}
|
|
// Add feedback text if the smart plan s using any non-default settings
|
if( not isalldefault )
|
{
|
feedback_o := Translations::MP_Designer_DialogSmartPlan_HasNonDefaultSettings()
|
+ feedback_o;
|
}
|
|
return isalldefault;
|
*]
|
}
|