| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 | | Quintiq file version 2.0 |  | #parent: #root |  | Method Copy () as Recipe |  | { |  |   Description: 'Make a copy of this recipe' |  |   TextBody: |  |   [* |  |     newname := this.GetNewCopiedName(); |  |      |  |     newrecipe := Recipe::Create( this.MacroPlan(), |  |                                  newname, |  |                                  this.Description(), |  |                                  false ); |  |      |  |     // Copy recipe ingredients |  |     traverse( this, RecipeIngredient, ri ) |  |     { |  |       newri := RecipeIngredient::Create( newrecipe, ri.Ingredient(), false ); |  |       newri.Update( ri.Minimum(), ri.Maximum(), ri.Nominal(), false ); |  |     } |  |      |  |     return newrecipe; |  |   *] |  | } | 
 |