| Quintiq file version 2.0 | 
| #parent: Toolbar650/btnOk | 
| Response OnClick () id:Response_Toolbar650_btnOk_OnClick | 
| { | 
|   #keys: '[11660.0.763174232]' | 
|   Body: | 
|   [* | 
|     // Apply changes | 
|     Dialog.ApplyChanges(); | 
|     Dialog.EndModal(1); | 
|   *] | 
|   CanBindMultiple: false | 
|   DefinitionID: 'Responsedef_GUIButtonBase_OnClick' | 
|   Precondition: | 
|   [* | 
|     feedback :=""; | 
|     sanitycheckfeedback :=""; | 
|      | 
|     hassafetystockdays := CheckBoxHasUserTarget.Checked() and [Boolean]RadioButtonGroupTarget.BoundValue(); | 
|      | 
|     return   SafetyStock::ValidateInput( feedback, sanitycheckfeedback,  | 
|                                          SelectionProduct.Data(), | 
|                                          SelectionStockingPoint.Data(),  | 
|                                          GUIStartDateTimeSelector.DateTime().Date(),  | 
|                                          hassafetystockdays, | 
|                                          ifexpr( hassafetystockdays, ApplicationLibMacroPlanner.FormatStringToReal( EditorTargetInDays.Text(),0.0 ), 0.0 ), | 
|                                          ifexpr( not hassafetystockdays, ApplicationLibMacroPlanner.FormatStringToReal( EditorTargetInQuantity.Text(), 0.0 ), 0.0 ), | 
|                                          Dialog.Data().WrappedInstance(), | 
|                                          true ); | 
|   *] | 
|   UserRequiresReadWrite: true | 
| } |