1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| Quintiq file version 2.0
| #parent: #root
| Method CreateRecipe (
| MacroPlan macroplan,
| String recipeName,
| Ingredients ingredients
| ) as Recipe
| {
| Description: 'Create Recipe and Recipe-Ingredient using input minimum, maximum and nominal value.'
| TextBody:
| [*
| // Create recipe
| isFromDB := false;
|
| // Workaround: FindTypeIndex not working in UTF
| existingRecipe := select( macroplan, Recipe, r, r.Name() = recipeName );
| recipe := ifexpr( isnull( existingRecipe ), Recipe::Create( macroplan, recipeName, 'Recipe for UTF', isFromDB ), existingRecipe );
|
| recipe.AssignIngredients( ingredients );
| return recipe;
| *]
| InterfaceProperties { Accessibility: 'Module' }
| }
|
|