Wed, 05 Jun 2019 20:04:26 +0200
Merged with default branch
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | /***************************************************************************** |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
2 | * Copyright (C) 2018-2019 |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | * |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | * Michiel Broek <mbroek at mbse dot eu> |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | * |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | * This file is part of BMS |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | * |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | * This is free software; you can redistribute it and/or modify it |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | * under the terms of the GNU General Public License as published by the |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | * Free Software Foundation; either version 2, or (at your option) any |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | * later version. |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | * |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | * BrewCloud is distributed in the hope that it will be useful, but |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | * General Public License for more details. |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | * |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | * along with ThermFerm; see the file COPYING. If not, write to the Free |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | *****************************************************************************/ |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | |
112
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
24 | function createDelElements() { |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
25 | |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
26 | $('#eventWindow').jqxWindow({ |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
27 | theme: theme, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
28 | position: { x: 490, y: 210 }, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
29 | width: 300, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
30 | height: 175, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
31 | resizable: false, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
32 | isModal: true, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
33 | modalOpacity: 0.4, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
34 | okButton: $('#delOk'), |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
35 | cancelButton: $('#delCancel'), |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
36 | initContent: function () { |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
37 | $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
38 | $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
39 | $('#delCancel').focus(); |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
40 | } |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
41 | }); |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
42 | $('#eventWindow').jqxWindow('hide'); |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
43 | } |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
44 | |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
45 | |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
46 | |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
47 | $(document).ready(function () { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
48 | |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
49 | var to_100 = false; // Fermentables adjust to 100% |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
50 | var preboil_sg = 0; |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
51 | var aboil_sg = 0; |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
52 | var est_mash_sg = 0; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
53 | var psugar = 0; // Percentage real sugars |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
54 | var pcara = 0; // Percentage cara/crystal malts |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
55 | var svg = 77; // Default attenuation |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
56 | var mashkg = 0; // Malt in mash weight |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
57 | var pitchrate = 0.75; // Yeast pitch rate default |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
58 | var initcells = 0; // Initial yeast cell count |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
59 | |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
60 | var ok_fermentables = 1; // Fermentables are in stock |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
61 | var ok_hops = 1; // Hops are in stock |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
62 | var ok_miscs = 1; // Miscs are in stock |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
63 | var ok_yeasts = 1; // Yeasts are in stock |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
64 | var ok_waters = 1; // Waters are in stock |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
65 | |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
66 | var hop_flavour = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
67 | var hop_aroma = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
68 | var mash_infuse = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
69 | var last_base = ''; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
70 | var last_acid = ''; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
71 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
72 | var MMCa = 40.048; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
73 | var MMMg = 24.305; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
74 | var MMNa = 22.98976928; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
75 | var MMCl = 35.453; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
76 | var MMSO4 = 96.0626; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
77 | var MMCO3 = 60.01684; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
78 | var MMHCO3 = 61.01684; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
79 | var MMCaSO4 = 172.171; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
80 | var MMCaCl2 = 147.015; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
81 | var MMCaCO3 = 100.087; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
82 | var MMMgSO4 = 246.475; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
83 | var MMNaHCO3 = 84.007; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
84 | var MMNa2CO3 = 105.996; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
85 | var MMNaCl = 58.443; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
86 | var MMCaOH2 = 74.06268; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
87 | |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
88 | var fermentableRow = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
89 | var fermentableData = {}; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
90 | var hopRow = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
91 | var hopData = {}; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
92 | var miscRow = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
93 | var miscData = {}; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
94 | var yeastRow = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
95 | var yeastData = {}; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
96 | var mashRow = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
97 | var mashData = {}; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
98 | |
283
879b81864e4e
The product and recipe editors disable the top menu so the user is forced to exit using the buttons on the first tab.
Michiel Broek <mbroek@mbse.eu>
parents:
282
diff
changeset
|
99 | /* |
879b81864e4e
The product and recipe editors disable the top menu so the user is forced to exit using the buttons on the first tab.
Michiel Broek <mbroek@mbse.eu>
parents:
282
diff
changeset
|
100 | * Remove the top menu so that we MUST use the buttons to leave the editor. |
879b81864e4e
The product and recipe editors disable the top menu so the user is forced to exit using the buttons on the first tab.
Michiel Broek <mbroek@mbse.eu>
parents:
282
diff
changeset
|
101 | */ |
879b81864e4e
The product and recipe editors disable the top menu so the user is forced to exit using the buttons on the first tab.
Michiel Broek <mbroek@mbse.eu>
parents:
282
diff
changeset
|
102 | $('#jqxMenu').jqxMenu('destroy'); |
879b81864e4e
The product and recipe editors disable the top menu so the user is forced to exit using the buttons on the first tab.
Michiel Broek <mbroek@mbse.eu>
parents:
282
diff
changeset
|
103 | |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
104 | console.log("record:" + my_record + " return:" + my_return + " theme:" + theme); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
105 | $("#jqxLoader").jqxLoader({ |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
106 | width: 250, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
107 | height: 150, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
108 | isModal: true, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
109 | text: "Laden product ...", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
110 | theme: theme |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
111 | }); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
112 | |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
113 | function calcSupplies() { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
114 | |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
115 | if (dataRecord.inventory_reduced > 6) { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
116 | $("#ok_pmpt").hide(); |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
117 | return; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
118 | } |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
119 | if (ok_fermentables && ok_hops && ok_miscs && ok_yeasts && ok_waters) |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
120 | $("#ok_supplies").html("<img src='images/dialog-ok-apply.png'>"); |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
121 | else |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
122 | $("#ok_supplies").html("<img src='images/dialog-error.png'>"); |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
123 | } |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
124 | |
372
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
125 | |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
126 | /* |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
127 | * All calculations that depend on changes in the fermentables, |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
128 | * volumes and equipments. |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
129 | */ |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
130 | function calcFermentables() { |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
131 | |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
132 | var sugarsf = 0; // fermentable sugars mash + boil |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
133 | var sugarsm = 0; // fermentable sugars in mash |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
134 | psugar = 0; |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
135 | pcara = 0; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
136 | mashkg = 0; |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
137 | ok_fermentables = 1; // All is in stock. |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
138 | ok_yeasts = 1; |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
139 | var vol = 0; // Volume sugars after boil |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
140 | var addedS = 0; // Added sugars after boil |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
141 | var addedmass = 0; // Added mass after boil |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
142 | var mvol = 0; // mash volume |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
143 | var colort = 0; // Colors srm * vol totals |
372
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
144 | var colorh = 0; // Colors ebc * vol * kt |
373
ee16d9b844d8
Added some info yo the about screen. Added calculating beer color using the method documented by Dirk Naudt. This looks like originated from a European Brewing Convention in 1948.
Michiel Broek <mbroek@mbse.eu>
parents:
372
diff
changeset
|
145 | var colorn = 0; // Colors ebc * pt * pct |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
146 | var my_100 = false; |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
147 | var mashtime = 0; // Total mash time |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
148 | var mashtemp = 0; // Average mash temperature |
372
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
149 | var bv = 0.925; // Bierverlies rendement |
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
150 | var sr = 0.95; // Mash en spoel rendement |
376
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
375
diff
changeset
|
151 | var lintner = 0; // Total recipe lintner |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
152 | |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
153 | if ((rows = $('#mashGrid').jqxGrid('getrows'))) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
154 | for (var i = 0; i < rows.length; i++) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
155 | var row = rows[i]; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
156 | if (row.step_type == 0) // Infusion |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
157 | mvol += parseFloat(row.step_infuse_amount); |
259
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
158 | if (row.step_temp <= 75) { // Ignore mashout |
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
159 | mashtime += row.step_time; |
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
160 | mashtemp += row.step_time * row.step_temp; |
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
161 | } |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
162 | } |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
163 | mashtemp = mashtemp / mashtime; |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
164 | } |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
165 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
166 | if (!(rows = $('#fermentableGrid').jqxGrid('getrows'))) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
167 | return; // grid not yet loaded. |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
168 | } |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
169 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
170 | var s = 0; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
171 | for (var i = 0; i < rows.length; i++) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
172 | var row = rows[i]; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
173 | if (row.f_adjust_to_total_100) |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
174 | my_100 = true; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
175 | if (row.f_type == 1) // Sugar |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
176 | psugar += row.f_percentage; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
177 | if (row.f_graintype == 2) // Crystal |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
178 | pcara += row.f_percentage; |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
179 | var d = row.f_amount * (row.f_yield / 100) * (1 - row.f_moisture / 100); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
180 | if (row.f_added == 0) { // Mash |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
181 | if (mvol > 0) { // Only if mash already known. |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
182 | mvol += row.f_amount * row.f_moisture / 100; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
183 | s += d; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
184 | } |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
185 | d = parseFloat(dataRecord.efficiency) / 100 * d; |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
186 | sugarsm += d; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
187 | mashkg += row.f_amount; |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
188 | } |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
189 | if (row.f_added == 0 || row.f_added == 1) // Mash or Boil |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
190 | sugarsf += d; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
191 | if (row.f_added == 2 || row.f_added == 3) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
192 | var x = (row.f_yield / 100) * (1 - row.f_moisture / 100); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
193 | addedS += row.f_amount * x; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
194 | addedmass += row.f_amount; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
195 | vol += (x * sugardensity + (1 - x) * 1) * row.f_amount; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
196 | } |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
197 | colort += row.f_amount * ebc_to_srm(row.f_color); |
372
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
198 | colorh += row.f_amount * row.f_color * get_kt(row.f_color); |
373
ee16d9b844d8
Added some info yo the about screen. Added calculating beer color using the method documented by Dirk Naudt. This looks like originated from a European Brewing Convention in 1948.
Michiel Broek <mbroek@mbse.eu>
parents:
372
diff
changeset
|
199 | colorn += (row.f_percentage / 100) * row.f_color; // For 8.6 Pt wort. |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
200 | // Check supplies. |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
201 | if ((((dataRecord.inventory_reduced <= 2) && (row.f_added <= 1)) || // Mash or boil |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
202 | ((dataRecord.inventory_reduced <= 3) && (row.f_added == 2)) || // Primary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
203 | ((dataRecord.inventory_reduced <= 5) && (row.f_added == 3)) || // Secondary or Tertiary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
204 | ((dataRecord.inventory_reduced <= 6) && (row.f_added == 4))) && row.f_inventory < row.f_amount) { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
205 | ok_fermentables = 0; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
206 | } |
376
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
375
diff
changeset
|
207 | if (row.f_added == 0 && (row.f_type == 0 || row.f_type == 4) && row.f_color < 50) { // Mash and Grain/Adjunct and Color < 50 |
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
375
diff
changeset
|
208 | lintner += row.f_diastatic_power * row.f_amount; |
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
375
diff
changeset
|
209 | // console.log("add "+row.f_name+" diastatic_power:"+row.f_diastatic_power*row.f_amount+" now:"+lintner); |
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
375
diff
changeset
|
210 | // } else { |
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
375
diff
changeset
|
211 | // console.log("ign "+row.f_name+" diastatic_power:"+row.f_diastatic_power*row.f_amount+" now:"+lintner); |
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
375
diff
changeset
|
212 | } |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
213 | } |
376
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
375
diff
changeset
|
214 | $("#ferm_lintner").val(Math.round(parseFloat(lintner / mashkg))); |
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
375
diff
changeset
|
215 | // console.log("lintner:"+lintner+" kg:"+mashkg); |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
216 | $("#mash_kg").val(mashkg); |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
217 | console.log("calcFermentables() supplies:"+ok_fermentables); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
218 | to_100 = my_100; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
219 | if (to_100) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
220 | $("#wf_amount").jqxNumberInput({ width: 90, readOnly: true, spinButtons: false }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
221 | } else { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
222 | $("#wf_amount").jqxNumberInput({ width: 110, readOnly: false, spinButtons: true }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
223 | } |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
224 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
225 | if (mvol > 0) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
226 | var v = s / sugardensity + mvol; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
227 | s = 1000 * s / (v * 10); //deg. Plato |
260
042fc9b3717b
Disable some debug console log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
259
diff
changeset
|
228 | est_mash_sg = Math.round(plato_to_sg(s) * 10000) / 10000; |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
229 | $('#est_mash_sg').val(est_mash_sg); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
230 | } |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
231 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
232 | // Estimate total recipe OG. |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
233 | dataRecord.est_og = estimate_sg(sugarsf + addedS, parseFloat(dataRecord.batch_size)); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
234 | $('#est_og').val(dataRecord.est_og); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
235 | $('#est_og2').val(dataRecord.est_og); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
236 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
237 | // Estimate SG in kettle after boil |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
238 | aboil_sg = estimate_sg(sugarsf, parseFloat(dataRecord.batch_size)); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
239 | $('#est_og3').val(aboil_sg); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
240 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
241 | // Estimate SG in kettle before boil |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
242 | preboil_sg = estimate_sg(sugarsm, parseFloat(dataRecord.boil_size)); |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
243 | $('#est_pre_sg').val(preboil_sg); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
244 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
245 | // Recalculate volumes. |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
246 | var aboil_volume = parseFloat(dataRecord.batch_size); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
247 | if (dataRecord.brew_aboil_volume > 0) |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
248 | aboil_volume = dataRecord.brew_aboil_volume / 1.04; // volume @ 20 degrees |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
249 | if (dataRecord.brew_fermenter_tcloss == 0) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
250 | dataRecord.brew_fermenter_tcloss = dataRecord.eq_trub_chiller_loss; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
251 | $("#brew_fermenter_tcloss").val(dataRecord.brew_fermenter_tcloss); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
252 | } |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
253 | dataRecord.brew_fermenter_volume = aboil_volume - dataRecord.brew_fermenter_tcloss + dataRecord.brew_fermenter_extrawater; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
254 | $("#brew_fermenter_volume").val(dataRecord.brew_fermenter_volume); |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
255 | // Estimated needed sparge water corrected for the temperature. |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
256 | var spoelw = (dataRecord.boil_size - mash_infuse + (mashkg * my_grain_absorbtion) + dataRecord.eq_lauter_deadspace) * 1.03; |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
257 | $("#brew_sparge_est").val(spoelw); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
258 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
259 | // Calculate SG in fermenter |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
260 | var ogx = dataRecord.brew_aboil_sg; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
261 | if (ogx < 1.002) |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
262 | ogx = aboil_sg; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
263 | var top = dataRecord.brew_fermenter_extrawater; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
264 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
265 | if (dataRecord.brew_fermenter_volume > 0) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
266 | var sug = sg_to_plato(ogx) * dataRecord.brew_fermenter_volume * ogx / 100; //kg of sugar in |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
267 | sug += addedS; //kg |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
268 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
269 | if ((dataRecord.brew_fermenter_volume * ogx + addedmass) > 0) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
270 | var pt = 100 * sug / (dataRecord.brew_fermenter_volume * ogx + addedmass + top); |
260
042fc9b3717b
Disable some debug console log messages.
Michiel Broek <mbroek@mbse.eu>
parents:
259
diff
changeset
|
271 | dataRecord.brew_fermenter_sg = Math.round(plato_to_sg(pt) * 10000) / 10000; |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
272 | $("#brew_fermenter_sg").val(dataRecord.brew_fermenter_sg); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
273 | // color |
373
ee16d9b844d8
Added some info yo the about screen. Added calculating beer color using the method documented by Dirk Naudt. This looks like originated from a European Brewing Convention in 1948.
Michiel Broek <mbroek@mbse.eu>
parents:
372
diff
changeset
|
274 | if (dataRecord.color_method == 4) { |
ee16d9b844d8
Added some info yo the about screen. Added calculating beer color using the method documented by Dirk Naudt. This looks like originated from a European Brewing Convention in 1948.
Michiel Broek <mbroek@mbse.eu>
parents:
372
diff
changeset
|
275 | dataRecord.brew_fermenter_color = Math.round(((pt / 8.6) * colorn) + (dataRecord.boil_time / 60)); |
ee16d9b844d8
Added some info yo the about screen. Added calculating beer color using the method documented by Dirk Naudt. This looks like originated from a European Brewing Convention in 1948.
Michiel Broek <mbroek@mbse.eu>
parents:
372
diff
changeset
|
276 | } else if (dataRecord.color_method == 3) { |
372
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
277 | dataRecord.brew_fermenter_color = Math.round((4.46 * bv * sr) / (aboil_volume + top) * colorh); |
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
278 | } else { |
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
279 | var cw = colort / (aboil_volume + top) * 8.34436; |
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
280 | dataRecord.brew_fermenter_color = kw_to_ebc(dataRecord.color_method, cw); |
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
281 | } |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
282 | $("#brew_fermenter_color").val(dataRecord.brew_fermenter_color); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
283 | var scolor = ebc_to_color(dataRecord.brew_fermenter_color); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
284 | $("#bcolorf").show(); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
285 | document.getElementById("bcolorf").style.background= scolor; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
286 | } |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
287 | } else { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
288 | // Negative volume |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
289 | dataRecord.brew_fermenter_sg = dataRecord.brew_fermenter_color = 0; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
290 | $("#brew_fermenter_sg").val(0); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
291 | $("#brew_fermenter_color").val(0); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
292 | $("#bcolorf").hide(); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
293 | } |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
294 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
295 | // Color of the wort |
373
ee16d9b844d8
Added some info yo the about screen. Added calculating beer color using the method documented by Dirk Naudt. This looks like originated from a European Brewing Convention in 1948.
Michiel Broek <mbroek@mbse.eu>
parents:
372
diff
changeset
|
296 | if (dataRecord.color_method == 4) { |
ee16d9b844d8
Added some info yo the about screen. Added calculating beer color using the method documented by Dirk Naudt. This looks like originated from a European Brewing Convention in 1948.
Michiel Broek <mbroek@mbse.eu>
parents:
372
diff
changeset
|
297 | var color = Math.round(((sg_to_plato(dataRecord.est_og) / 8.6) * colorn) + (dataRecord.boil_time / 60)); |
ee16d9b844d8
Added some info yo the about screen. Added calculating beer color using the method documented by Dirk Naudt. This looks like originated from a European Brewing Convention in 1948.
Michiel Broek <mbroek@mbse.eu>
parents:
372
diff
changeset
|
298 | } else if (dataRecord.color_method == 3) { // Hans Halberstadt |
372
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
299 | var color = Math.round((4.46 * bv * sr) / parseFloat(dataRecord.batch_size) * colorh); |
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
300 | } else { |
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
301 | var cw = colort / parseFloat(dataRecord.batch_size) * 8.34436; |
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
302 | var color = kw_to_ebc(dataRecord.color_method, cw); |
1365b5e47130
Added color method written by Hans Halberstadt.
Michiel Broek <mbroek@mbse.eu>
parents:
358
diff
changeset
|
303 | } |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
304 | dataRecord.est_color = color; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
305 | $('#est_color').val(color); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
306 | $('#est_color2').val(color); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
307 | var scolor = ebc_to_color(color); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
308 | document.getElementById("bcolor").style.background= scolor; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
309 | document.getElementById("bcolor2").style.background= scolor; |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
310 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
311 | // Progress bars |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
312 | pmalts = mashkg / dataRecord.eq_mash_max * 100; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
313 | $("#perc_malts").jqxProgressBar('val', pmalts); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
314 | $("#perc_sugars").jqxProgressBar('val', psugar); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
315 | $("#perc_cara").jqxProgressBar('val', pcara); |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
316 | calcStage(); |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
317 | |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
318 | // Calculate estimated svg. |
259
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
319 | svg = 0; // default. |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
320 | initcells = 0; |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
321 | var rows = $('#yeastGrid').jqxGrid('getrows'); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
322 | for (var i = 0; i < rows.length; i++) { |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
323 | var row = rows[i]; |
259
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
324 | if (row.y_use == 0) { // Primary |
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
325 | if (parseFloat(row.y_attenuation) > svg) |
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
326 | svg = parseFloat(row.y_attenuation); // Take the highest if multiple yeasts. |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
327 | if (row.y_form == 0) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
328 | initcells += (parseFloat(row.y_cells) / 1000000000) * parseFloat(row.y_amount); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
329 | else |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
330 | initcells += (parseFloat(row.y_cells) / 1000000) * parseFloat(row.y_amount); |
259
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
331 | } |
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
332 | // TODO: brett in secondary ?? |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
333 | if ((((dataRecord.inventory_reduced <= 3) && (row.y_use == 0)) || // Primary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
334 | ((dataRecord.inventory_reduced <= 4) && (row.y_use == 1)) || // Secondary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
335 | ((dataRecord.inventory_reduced <= 5) && (row.y_use == 2)) || // Tertiary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
336 | ((dataRecord.inventory_reduced <= 6) && (row.y_use == 3))) && // Bottle |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
337 | (row.y_inventory < row.y_amount)) { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
338 | ok_yeasts = 0; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
339 | } |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
340 | } |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
341 | calcSupplies(); |
259
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
342 | if (svg == 0) |
ffab9ba3f532
Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.
Michiel Broek <mbroek@mbse.eu>
parents:
258
diff
changeset
|
343 | svg = 77; |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
344 | |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
345 | if ((mashkg > 0) && (mash_infuse > 0) && (mashtime > 0) && (mashtemp > 0)) { |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
346 | dataRecord.est_fg = estimate_fg(psugar, pcara, mash_infuse / mashkg, mashtime, mashtemp, svg, dataRecord.est_og); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
347 | } else { |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
348 | dataRecord.est_fg = estimate_fg(psugar, pcara, 0, 0, 0, svg, dataRecord.est_og); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
349 | } |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
350 | $('#est_fg').val(dataRecord.est_fg); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
351 | $('#est_fg2').val(dataRecord.est_fg); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
352 | $('#est_fg3').val(dataRecord.est_fg); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
353 | |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
354 | dataRecord.est_abv = abvol(dataRecord.est_og, dataRecord.est_fg); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
355 | $("#est_abv").val(dataRecord.est_abv); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
356 | $("#est_abv2").val(dataRecord.est_abv); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
357 | |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
358 | // Calculate the final svg if available use the real value. |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
359 | if ((dataRecord.stage >= 6) && (dataRecord.fg > 0.990) && (dataRecord.fg < dataRecord.brew_fermenter_sg)) { |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
360 | svg = 100 * (dataRecord.brew_fermenter_sg - dataRecord.fg) / (dataRecord.brew_fermenter_sg - 1); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
361 | } |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
362 | |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
363 | $("#yeast_cells").val(initcells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
364 | $("#need_cells").val(getNeededYeastCells()); |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
365 | }; |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
366 | |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
367 | function calcMash() { |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
368 | |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
369 | if (!(rows = $('#mashGrid').jqxGrid('getrows'))) |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
370 | return; |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
371 | if (mashkg == 0) |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
372 | return; |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
373 | |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
374 | var infused = 0; |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
375 | for (var i = 0; i < rows.length; i++) { |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
376 | var row = $("#mashGrid").jqxGrid('getrowdata', i); |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
377 | if (row.step_type == 0) // Infusion |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
378 | infused += row.step_infuse_amount; |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
379 | $("#mashGrid").jqxGrid('setcellvalue', i, "step_thickness", infused / mashkg); |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
380 | } |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
381 | } |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
382 | |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
383 | /* |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
384 | * Change OG of recipe but keep the water volumes. |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
385 | */ |
133
22d28dd9c041
Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents:
123
diff
changeset
|
386 | function calcFermentablesFromOG(OG) { |
22d28dd9c041
Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents:
123
diff
changeset
|
387 | |
22d28dd9c041
Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents:
123
diff
changeset
|
388 | console.log("calcFermentablesFromOG("+OG+")"); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
389 | var efficiency = parseFloat($("#efficiency").jqxNumberInput('decimal')); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
390 | var sug = sg_to_plato(OG) * parseFloat($("#batch_size").jqxNumberInput('decimal')) * OG / 100; //total amount of sugars in kg |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
391 | var tot = 0; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
392 | var rowscount = $("#fermentableGrid").jqxGrid('getdatainformation').rowscount; |
133
22d28dd9c041
Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents:
123
diff
changeset
|
393 | |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
394 | for (var i = 0; i < rowscount; i++) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
395 | var row = $("#fermentableGrid").jqxGrid('getrowdata', i); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
396 | var d = row.f_percentage / 100 * (row.f_yield / 100) * (1 - row.f_moisture / 100); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
397 | if (row.f_added == 0) // Mash |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
398 | d = efficiency / 100 * d; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
399 | tot += d; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
400 | } |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
401 | var totmass = 0; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
402 | if (tot) |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
403 | totmass = sug / tot; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
404 | |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
405 | if (totmass) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
406 | for (i = 0; i < rowscount; i++) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
407 | var row = $("#fermentableGrid").jqxGrid('getrowdata', i); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
408 | var amount = row.f_percentage / 100 * totmass; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
409 | $("#fermentableGrid").jqxGrid('setcellvalue', i, "f_amount", amount); |
133
22d28dd9c041
Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents:
123
diff
changeset
|
410 | } |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
411 | } |
133
22d28dd9c041
Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents:
123
diff
changeset
|
412 | }; |
22d28dd9c041
Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents:
123
diff
changeset
|
413 | |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
414 | function getNeededYeastCells() { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
415 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
416 | var sg = dataRecord.brew_fermenter_sg; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
417 | if (sg <= 1.0001 && dataRecord.fg > 1.000) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
418 | sg = dataRecord.fg; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
419 | else if (sg <= 1.0001) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
420 | sg = dataRecord.est_og; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
421 | var plato = sg_to_plato(sg); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
422 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
423 | var volume = dataRecord.brew_fermenter_volume; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
424 | if (volume <= 0) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
425 | volume = dataRecord.batch_size - dataRecord.eq_trub_chiller_loss; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
426 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
427 | var result = pitchrate * volume * plato; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
428 | return result; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
429 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
430 | |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
431 | function hopFlavourContribution(bt, vol, use, amount) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
432 | var result; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
433 | |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
434 | if (use == 1) { // First wort |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
435 | result = 0.15; // assume 15% flavourcontribution for fwh |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
436 | } else if (bt > 50) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
437 | result = 0.10; // assume 10% flavourcontribution as a minimum |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
438 | } else { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
439 | result = 15.25 / (6 * Math.sqrt(2 * Math.PI)) * Math.exp(-0.5 * Math.pow((bt - 21) /6, 2)); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
440 | if (result < 0.10) |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
441 | result = 0.10; // assume 10% flavourcontribution as a minimum |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
442 | } |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
443 | return (result * amount * 1000) / vol; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
444 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
445 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
446 | function hopAromaContribution(bt, vol, use, amount) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
447 | var result = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
448 | |
342
3ac81572bb28
Fixed hop aroma calculation for dryhop additions
Michiel Broek <mbroek@mbse.eu>
parents:
341
diff
changeset
|
449 | if (use == 5) { // Dry hop |
3ac81572bb28
Fixed hop aroma calculation for dryhop additions
Michiel Broek <mbroek@mbse.eu>
parents:
341
diff
changeset
|
450 | result = 1.33; |
3ac81572bb28
Fixed hop aroma calculation for dryhop additions
Michiel Broek <mbroek@mbse.eu>
parents:
341
diff
changeset
|
451 | } else if (bt > 20) { |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
452 | result = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
453 | } else if (bt > 7.5) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
454 | result = 10.03 / (4 * Math.sqrt(2 * Math.PI)) * Math.exp(-0.5 * Math.pow((bt - 7.5) /4, 2)); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
455 | } else if (use == 2) { // Boil |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
456 | result = 1; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
457 | } else if (use == 3) { // Aroma |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
458 | result = 1.2; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
459 | } else if (use == 4) { // Whirlpool |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
460 | result = 1.2; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
461 | } |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
462 | return (result * amount * 1000) / vol; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
463 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
464 | |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
465 | function calcIBUs() { |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
466 | var total_ibus = 0; |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
467 | var ferm_ibus = 0; |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
468 | var rows = {}; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
469 | hop_aroma = hop_flavour = 0; |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
470 | if (!(rows = $('#hopGrid').jqxGrid('getrows'))) { |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
471 | return; |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
472 | } |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
473 | ok_hops = 1; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
474 | for (var i = 0; i < rows.length; i++) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
475 | var row = rows[i]; |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
476 | total_ibus += toIBU(row.h_useat, row.h_form, preboil_sg, parseFloat(dataRecord.batch_size), |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
477 | parseFloat(row.h_amount), parseFloat(row.h_time), parseFloat(row.h_alpha), dataRecord.ibu_method); |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
478 | ferm_ibus += toIBU(row.h_useat, row.h_form, preboil_sg, |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
479 | parseFloat(dataRecord.brew_fermenter_volume) + parseFloat(dataRecord.brew_fermenter_tcloss), |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
480 | parseFloat(row.h_amount), parseFloat(row.h_time), parseFloat(row.h_alpha), dataRecord.ibu_method); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
481 | hop_flavour += hopFlavourContribution(parseFloat(row.h_time), parseFloat(dataRecord.batch_size), |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
482 | row.h_useat, parseFloat(row.h_amount)); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
483 | hop_aroma += hopAromaContribution(parseFloat(row.h_time), parseFloat(dataRecord.batch_size), |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
484 | row.h_useat, parseFloat(row.h_amount)); |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
485 | if ((((dataRecord.inventory_reduced <= 2) && (row.h_useat <= 4)) || // Mash, FW, Boil, Aroma, Whirlpool |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
486 | ((dataRecord.inventory_reduced <= 6) && (row.h_useat == 5))) && // Dry-hop |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
487 | (row.h_inventory < row.h_amount)) |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
488 | ok_hops = 0; |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
489 | } |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
490 | total_ibus = Math.round(total_ibus * 10) / 10; |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
491 | ferm_ibus = Math.round(ferm_ibus * 10) / 10; |
382
547c23b50d00
Adjusted the hop progress bars.
Michiel Broek <mbroek@mbse.eu>
parents:
381
diff
changeset
|
492 | hop_flavour = Math.round(hop_flavour * 1000 / 5) / 10; |
547c23b50d00
Adjusted the hop progress bars.
Michiel Broek <mbroek@mbse.eu>
parents:
381
diff
changeset
|
493 | hop_aroma = Math.round(hop_aroma * 1000 / 6) / 10; |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
494 | if (hop_flavour > 100) |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
495 | hop_flavour = 100; |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
496 | if (hop_aroma > 100) |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
497 | hop_aroma = 100; |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
498 | console.log("calcIBUs(): " + total_ibus + " flavour: " + hop_flavour + " aroma: " + hop_aroma+" fermenter:"+ferm_ibus+" supplies:"+ok_hops); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
499 | dataRecord.est_ibu = total_ibus; |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
500 | $('#est_ibu').val(total_ibus); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
501 | $('#est_ibu2').val(total_ibus); |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
502 | $("#hop_flavour").jqxProgressBar('val', hop_flavour); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
503 | $("#hop_aroma").jqxProgressBar('val', hop_aroma); |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
504 | $("#brew_fermenter_ibu").val(ferm_ibus); |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
505 | calcStage(); |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
506 | calcSupplies(); |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
507 | }; |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
508 | |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
509 | /* |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
510 | * http://braukaiser.com/blog/blog/2012/11/03/estimating-yeast-growth/ |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
511 | * |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
512 | * stype: 0=stirred, 1=shaken, 2=simple |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
513 | * totcells: initial cells |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
514 | * egrams: gram extract |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
515 | */ |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
516 | function getGrowthRate(stype, totcells, egrams){ |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
517 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
518 | /* Cells per grams extract (B/g) */ |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
519 | var cpe = totcells / egrams; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
520 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
521 | if (cpe > 3.5) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
522 | return 0; // no growth |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
523 | if (stype == 2) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
524 | return 0.4; // simple starter |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
525 | if (stype == 1) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
526 | return 0.62; // shaken starter |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
527 | if (cpe <= 1.4) // stirred starter |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
528 | return 1.4; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
529 | return 2.33 - (.67 * cpe ); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
530 | }; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
531 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
532 | function calcStep(svol, stype, start) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
533 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
534 | var gperpoint = 2.72715; //number of grams of extract per point of starter gravity per liter |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
535 | var prate = start/svol * 1000; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
536 | var irate = Math.round(prate * 10) / 10; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
537 | var egrams = (dataRecord.starter_sg - 1) * svol * gperpoint; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
538 | var grate = getGrowthRate(stype, start, egrams); |
389
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
539 | var ncells = Math.round(egrams * grate * 10) / 10; |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
540 | var totcells = parseFloat(ncells) + start; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
541 | console.log("svol:"+svol+" start:"+start+" irate:"+irate+" egrams:"+egrams+" grate:"+grate+" ncells:"+ncells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
542 | return { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
543 | svol: svol, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
544 | irate: irate, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
545 | prate: Math.round(prate * 10)/10, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
546 | ncells: ncells, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
547 | totcells: totcells, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
548 | growf: Math.round(ncells/start*100)/100 |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
549 | }; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
550 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
551 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
552 | /* |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
553 | * Calculate all starter steps. |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
554 | * stype: final starter type: 0 = stirred, 1 = shaked, 2 = simple. |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
555 | * start: initial cells in billions |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
556 | * needed: needed cells in billions |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
557 | * |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
558 | * result: all values updated. |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
559 | */ |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
560 | function calcSteps(stype, start, needed) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
561 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
562 | var uvols = [ 20, 40, 60, 80, 100, 150, 200, 250, 375, 500, 625, 750, 875, 1000, 1250, 1500, 2000, 2500, 3000, 4000, 5000 ]; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
563 | var mvols = uvols.length; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
564 | var svol = 0; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
565 | var lasti = 0; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
566 | var result = {}; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
567 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
568 | /* |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
569 | * If no values are set, auto calculate the starter. |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
570 | */ |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
571 | if ((parseFloat($("#prop1_volume").jqxNumberInput('decimal')) + parseFloat($("#prop2_volume").jqxNumberInput('decimal')) + |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
572 | parseFloat($("#prop3_volume").jqxNumberInput('decimal')) + parseFloat($("#prop4_volume").jqxNumberInput('decimal'))) == 0) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
573 | // clear by default |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
574 | for (var i = 1; i < 5; i++) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
575 | $("#prop"+i+"_type").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
576 | $("#r"+i+"_pmpt").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
577 | $("#prop"+i+"_type").val(stype); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
578 | $("#prop"+i+"_volume").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
579 | $("#prop"+i+"_volume").val(0); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
580 | $("#prop"+i+"_irate").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
581 | $("#prop"+i+"_ncells").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
582 | $("#prop"+i+"_tcells").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
583 | $("#prop"+i+"_growf").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
584 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
585 | if (start > needed) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
586 | return; // no starter needed |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
587 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
588 | $("#prop1_type").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
589 | $("#r1_pmpt").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
590 | $("#prop1_volume").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
591 | $("#prop1_irate").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
592 | $("#prop1_ncells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
593 | $("#prop1_tcells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
594 | $("#prop1_growf").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
595 | for (var i = lasti; i <= mvols; i++) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
596 | lasti = i; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
597 | svol = uvols[lasti]; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
598 | result = calcStep(svol, stype, start); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
599 | if (result.irate < 25) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
600 | // inocculation rate too low, backup one step and break out. |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
601 | lasti = i - 1; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
602 | svol = uvols[lasti]; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
603 | result = calcStep(svol, stype, start); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
604 | break; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
605 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
606 | if (result.totcells > needed || i == mvols) { // hit the target or loops done |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
607 | break; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
608 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
609 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
610 | $("#prop1_volume").val(result.svol / 1000); // to liters |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
611 | $("#prop1_irate").val(result.prate); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
612 | $("#prop1_ncells").val(result.ncells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
613 | $("#prop1_tcells").val(result.totcells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
614 | $("#prop1_growf").val(result.growf); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
615 | if (result.totcells > needed) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
616 | return; // hit the target |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
617 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
618 | // second stage |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
619 | $("#r2_pmpt").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
620 | $("#prop2_type").val(stype); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
621 | $("#prop2_type").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
622 | $("#prop2_volume").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
623 | $("#prop2_irate").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
624 | $("#prop2_ncells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
625 | $("#prop2_tcells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
626 | $("#prop2_growf").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
627 | for (var i = lasti; i <= mvols; i++) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
628 | lasti = i; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
629 | svol = uvols[lasti]; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
630 | result = calcStep(svol, stype, $("#prop1_tcells").val()); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
631 | if (result.irate < 25) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
632 | lasti = i - 1; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
633 | svol = uvols[lasti]; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
634 | result = calcStep(svol, stype, $("#prop1_tcells").val()); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
635 | break; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
636 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
637 | if (result.totcells > needed || i == mvols) { // hit the target or loops done |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
638 | break; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
639 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
640 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
641 | $("#prop2_volume").val(result.svol / 1000); // to liters |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
642 | $("#prop2_irate").val(result.prate); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
643 | $("#prop2_ncells").val(result.ncells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
644 | $("#prop2_tcells").val(result.totcells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
645 | $("#prop2_growf").val(result.growf); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
646 | if (result.totcells > needed) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
647 | return; // hit the target |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
648 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
649 | // third stage |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
650 | $("#r3_pmpt").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
651 | $("#prop3_type").val(stype); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
652 | $("#prop3_type").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
653 | $("#prop3_volume").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
654 | $("#prop3_irate").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
655 | $("#prop3_ncells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
656 | $("#prop3_tcells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
657 | $("#prop3_growf").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
658 | for (var i = lasti; i <= mvols; i++) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
659 | lasti = i; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
660 | svol = uvols[lasti]; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
661 | result = calcStep(svol, stype, $("#prop2_tcells").val()); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
662 | if (result.irate < 25) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
663 | lasti = i - 1; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
664 | svol = uvols[lasti]; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
665 | result = calcStep(svol, stype, $("#prop2_tcells").val()); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
666 | break; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
667 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
668 | if (result.totcells > needed || i == mvols) { // hit the target or loops done |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
669 | break; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
670 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
671 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
672 | $("#prop3_volume").val(result.svol / 1000); // to liters |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
673 | $("#prop3_irate").val(result.prate); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
674 | $("#prop3_ncells").val(result.ncells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
675 | $("#prop3_tcells").val(result.totcells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
676 | $("#prop3_growf").val(result.growf); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
677 | if (result.totcells > needed) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
678 | return; // hit the target |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
679 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
680 | // fourth stage |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
681 | $("#r4_pmpt").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
682 | $("#prop4_type").val(stype); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
683 | $("#prop4_type").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
684 | $("#prop4_volume").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
685 | $("#prop4_irate").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
686 | $("#prop4_ncells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
687 | $("#prop4_tcells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
688 | $("#prop4_growf").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
689 | for (var i = lasti; i <= mvols; i++) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
690 | lasti = i; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
691 | svol = uvols[lasti]; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
692 | result = calcStep(svol, stype, $("#prop3_tcells").val()); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
693 | if (result.totcells > needed || i == mvols) { // hit the target or loops done |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
694 | $("#prop4_volume").val(result.svol / 1000); // to liters |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
695 | $("#prop4_irate").val(result.prate); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
696 | $("#prop4_ncells").val(result.ncells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
697 | $("#prop4_tcells").val(result.totcells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
698 | $("#prop4_growf").val(result.growf); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
699 | return; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
700 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
701 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
702 | } else { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
703 | // recalculate |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
704 | if (dataRecord.prop1_volume > 0) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
705 | $("#r1_pmpt").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
706 | $("#prop1_type").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
707 | $("#prop1_volume").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
708 | $("#prop1_irate").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
709 | $("#prop1_ncells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
710 | $("#prop1_tcells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
711 | $("#prop1_growf").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
712 | result = calcStep($("#prop1_volume").val() * 1000, dataRecord.prop1_type, start); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
713 | $("#prop1_irate").val(result.prate); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
714 | $("#prop1_ncells").val(result.ncells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
715 | $("#prop1_tcells").val(result.totcells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
716 | $("#prop1_growf").val(result.growf); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
717 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
718 | if (dataRecord.prop2_volume > 0) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
719 | $("#r2_pmpt").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
720 | $("#prop2_type").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
721 | $("#prop2_volume").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
722 | $("#prop2_irate").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
723 | $("#prop2_ncells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
724 | $("#prop2_tcells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
725 | $("#prop2_growf").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
726 | result = calcStep($("#prop2_volume").val() * 1000, dataRecord.prop2_type, $("#prop1_tcells").val()); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
727 | $("#prop2_irate").val(result.prate); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
728 | $("#prop2_ncells").val(result.ncells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
729 | $("#prop2_tcells").val(result.totcells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
730 | $("#prop2_growf").val(result.growf); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
731 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
732 | if (dataRecord.prop3_volume > 0) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
733 | $("#r3_pmpt").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
734 | $("#prop3_type").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
735 | $("#prop3_volume").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
736 | $("#prop3_irate").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
737 | $("#prop3_ncells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
738 | $("#prop3_tcells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
739 | $("#prop3_growf").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
740 | result = calcStep($("#prop3_volume").val() * 1000, dataRecord.prop3_type, $("#prop2_tcells").val()); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
741 | $("#prop3_irate").val(result.prate); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
742 | $("#prop3_ncells").val(result.ncells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
743 | $("#prop3_tcells").val(result.totcells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
744 | $("#prop3_growf").val(result.growf); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
745 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
746 | if (dataRecord.prop4_volume > 0) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
747 | $("#r4_pmpt").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
748 | $("#prop4_type").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
749 | $("#prop4_volume").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
750 | $("#prop4_irate").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
751 | $("#prop4_ncells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
752 | $("#prop4_tcells").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
753 | $("#prop4_growf").show(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
754 | result = calcStep($("#prop4_volume").val() * 1000, dataRecord.prop4_type, $("#prop3_tcells").val()); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
755 | $("#prop4_irate").val(result.prate); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
756 | $("#prop4_ncells").val(result.ncells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
757 | $("#prop4_tcells").val(result.totcells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
758 | $("#prop4_growf").val(result.growf); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
759 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
760 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
761 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
762 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
763 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
764 | function calcYeast() { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
765 | |
375
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
766 | // Calculate needed cells. |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
767 | var sg = dataRecord.brew_fermenter_sg; |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
768 | if (sg <= 1.0001 && dataRecord.fg > 1.000) |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
769 | sg = dataRecord.fg; |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
770 | else if (sg <= 1.0001) |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
771 | sg = dataRecord.est_og; |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
772 | var plato = sg_to_plato(sg); |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
773 | |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
774 | var volume = dataRecord.brew_fermenter_volume; |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
775 | if (volume > 0) { |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
776 | if (dataRecord.brew_fermenter_extrawater > 0) |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
777 | volume += dataRecord.brew_fermenter_extrawater; |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
778 | } else { |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
779 | volume = dataRecord.batch_size - dataRecord.eq_trub_chiller_loss; |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
780 | } |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
781 | |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
782 | // Also in calcFermentables() |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
783 | $("#yeast_cells").val(initcells); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
784 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
785 | if (!(rows = $('#yeastGrid').jqxGrid('getrows'))) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
786 | return; // grid not yet loaded. |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
787 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
788 | var rowscount = $("#yeastGrid").jqxGrid('getdatainformation').rowscount; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
789 | if (rowscount == 0) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
790 | return; // no yeast in recipe |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
791 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
792 | for (var i = 0; i < rowscount; i++) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
793 | var row = $("#yeastGrid").jqxGrid('getrowdata', i); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
794 | if (row.y_use == 0) { // primary |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
795 | // pitchrate see https://www.brewersfriend.com/yeast-pitch-rate-and-starter-calculator/ |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
796 | // and http://braukaiser.com/blog/blog/2012/11/03/estimating-yeast-growth/ |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
797 | pitchrate = 0.75; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
798 | if (dataRecord.est_og > 1.060) |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
799 | pitchrate = 1.0; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
800 | if (row.y_type == 0) // lager yeast |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
801 | pitchrate *= 2; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
802 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
803 | if (row.y_form == 1) { // dry yeast |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
804 | } else { // possible starter needed |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
805 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
806 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
807 | } |
375
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
808 | var needed = pitchrate * volume * plato; |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
809 | console.log("calcYeast() pitchrate:"+pitchrate+" start:"+initcells+" needed:"+needed+" volume:"+volume); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
810 | $("#need_cells").val(needed); |
375
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
811 | var use_cells = initcells; |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
812 | |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
813 | if (dataRecord.starter_enable) { |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
814 | calcSteps(dataRecord.starter_type, initcells, needed); |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
815 | |
389
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
816 | for (var i = 1; i < 5; i++) { |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
817 | $("#r"+i+"_irate").html(""); |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
818 | $("#r"+i+"_growf").html(""); |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
819 | $("#r"+i+"_tcells").html(""); |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
820 | if (parseFloat($("#prop"+i+"_volume").val()) > 0) { |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
821 | if ((parseFloat($("#prop"+i+"_irate").val()) < 25) || (parseFloat($("#prop"+i+"_irate").val()) > 100)) { |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
822 | $("#r"+i+"_irate").html("<img src='images/dialog-error.png'>"); |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
823 | } else { |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
824 | $("#r"+i+"_irate").html("<img src='images/dialog-ok-apply.png'>"); |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
825 | } |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
826 | if (parseFloat($("#prop"+i+"_growf").val()) < 1) |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
827 | $("#r"+i+"_growf").html("<img src='images/dialog-error.png'>"); |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
828 | if (($("#prop"+i+"_type").val() > 0) && (parseFloat($("#prop"+i+"_growf").val()) > 3)) |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
829 | $("#r"+i+"_growf").html("<img src='images/dialog-error.png'>"); |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
830 | if (parseFloat($("#prop"+i+"_tcells").val()) > needed) |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
831 | $("#r"+i+"_tcells").html("<img src='images/dialog-ok-apply.png'>"); |
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
832 | use_cells = parseFloat($("#prop"+i+"_tcells").val()); |
375
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
833 | } else { |
389
eb8ce63eb489
Use extra decimal in yeast starter calculation. Show correct Cellen/ml °P even when the starter does not provide enough cells. Starter display results are written in a for loop.
Michiel Broek <mbroek@mbse.eu>
parents:
382
diff
changeset
|
834 | $("#r"+i+"_irate").html(""); |
375
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
835 | } |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
836 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
837 | } |
375
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
838 | $("#plato_cells").val(parseFloat(use_cells / (volume * plato) )); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
839 | }; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
840 | |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
841 | function adjustHops(factor) { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
842 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
843 | console.log("adjustHops("+factor+")"); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
844 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
845 | var rowscount = $("#hopGrid").jqxGrid('getdatainformation').rowscount; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
846 | if (rowscount == 0) |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
847 | return; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
848 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
849 | for (var i = 0; i < rowscount; i++) { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
850 | var row = $("#hopGrid").jqxGrid('getrowdata', i); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
851 | var amount = row.h_amount * factor; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
852 | $("#hopGrid").jqxGrid('setcellvalue', i, "h_amount", amount); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
853 | } |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
854 | }; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
855 | |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
856 | function calcMiscs() { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
857 | |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
858 | ok_miscs = 1; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
859 | var rowscount = $("#miscGrid").jqxGrid('getdatainformation').rowscount; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
860 | |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
861 | if (rowscount == 0) |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
862 | return; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
863 | |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
864 | for (var i = 0; i < rowscount; i++) { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
865 | var row = $("#miscGrid").jqxGrid('getrowdata', i); |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
866 | if ((((dataRecord.inventory_reduced <= 2) && (row.m_use_use <= 2)) || // Starter, Mash, Boil |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
867 | ((dataRecord.inventory_reduced <= 3) && (row.m_use_use == 3)) || // Primary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
868 | ((dataRecord.inventory_reduced <= 5) && (row.m_use_use == 4)) || // Secondary, Teriary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
869 | ((dataRecord.inventory_reduced <= 6) && (row.m_use_use == 5))) && // Bottle |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
870 | (row.m_inventory < row.m_amount)) { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
871 | ok_miscs = 0; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
872 | } |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
873 | } |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
874 | calcSupplies(); |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
875 | }; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
876 | |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
877 | function adjustMiscs(factor) { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
878 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
879 | console.log("adjustMiscs("+factor+")"); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
880 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
881 | var rowscount = $("#miscGrid").jqxGrid('getdatainformation').rowscount; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
882 | if (rowscount == 0) |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
883 | return; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
884 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
885 | for (var i = 0; i < rowscount; i++) { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
886 | var row = $("#miscGrid").jqxGrid('getrowdata', i); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
887 | var amount = row.m_amount * factor; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
888 | $("#miscGrid").jqxGrid('setcellvalue', i, "m_amount", amount); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
889 | switch (row.m_name) { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
890 | case 'CaCl2': $("#wa_cacl2").val(row.m_amount * 1000); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
891 | break; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
892 | case 'CaSO4': $("#wa_caso4").val(row.m_amount * 1000); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
893 | break; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
894 | case 'MgSO4': $("#wa_mgso4").val(row.m_amount * 1000); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
895 | break; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
896 | case 'NaCl': $("#wa_nacl").val(row.m_amount * 1000); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
897 | break; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
898 | case 'Melkzuur': |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
899 | case 'Zoutzuur': |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
900 | case 'Fosforzuur': |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
901 | case 'Zwavelzuur': $("#wa_acid").val(row.m_amount * 1000); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
902 | break; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
903 | case 'NaHCO3': |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
904 | case 'Na2CO3': |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
905 | case 'CaCO3': |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
906 | case 'Ca(OH)2': $("#wa_base").val(row.m_amount * 1000); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
907 | break; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
908 | } |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
909 | } |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
910 | }; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
911 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
912 | function adjustYeasts(factor) { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
913 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
914 | console.log("adjustYeasts("+factor+")"); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
915 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
916 | var rowscount = $("#yeastGrid").jqxGrid('getdatainformation').rowscount; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
917 | if (rowscount == 0) |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
918 | return; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
919 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
920 | for (var i = 0; i < rowscount; i++) { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
921 | var row = $("#yeastGrid").jqxGrid('getrowdata', i); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
922 | if (row.y_form == 1) { // Only adjust dry yeast |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
923 | var amount = row.y_amount * factor; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
924 | $("#yeastGrid").jqxGrid('setcellvalue', i, "y_amount", amount); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
925 | } |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
926 | } |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
927 | |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
928 | calcYeast(); |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
929 | }; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
930 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
931 | function adjustWaters(factor) { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
932 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
933 | console.log("adjustWaters("+factor+")"); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
934 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
935 | var rowscount = $("#mashGrid").jqxGrid('getdatainformation').rowscount; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
936 | if (rowscount == 0) |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
937 | return; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
938 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
939 | mash_infuse = 0; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
940 | for (var i = 0; i < rowscount; i++) { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
941 | var row = $("#mashGrid").jqxGrid('getrowdata', i); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
942 | if (row.step_type == 0) { // Infusion |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
943 | var amount = Math.round(row.step_infuse_amount * factor * 10) / 10; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
944 | $("#mashGrid").jqxGrid('setcellvalue', i, "step_infuse_amount", amount); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
945 | mash_infuse += amount; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
946 | } |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
947 | } |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
948 | if (dataRecord.w2_amount == 0) { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
949 | dataRecord.w1_amount = mash_infuse; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
950 | $("#w1_amount").val(mash_infuse); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
951 | } else { |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
952 | dataRecord.w1_amount = (dataRecord.w1_amount / (dataRecord.w1_amount + dataRecord.w2_amount)) * mash_infuse; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
953 | dataRecord.w2_amount = (dataRecord.w2_amount / (dataRecord.w1_amount + dataRecord.w2_amount)) * mash_infuse; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
954 | $("#w1_amount").val(dataRecord.w1_amount); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
955 | $("#w2_amount").val(dataRecord.w2_amount); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
956 | } |
264
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
957 | $('#wg_amount').val(mash_infuse); |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
958 | }; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
959 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
960 | |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
961 | |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
962 | function calcMashEfficiency() { |
318
882d4da1f236
Can switch between Wait and Brewday states. Only display valid mash efficiency results.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
963 | if (parseFloat($("#brew_mash_sg").jqxNumberInput('decimal')) < 1.002) |
882d4da1f236
Can switch between Wait and Brewday states. Only display valid mash efficiency results.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
964 | return; |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
965 | var c = sg_to_plato(est_mash_sg); |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
966 | var m = sg_to_plato(parseFloat($("#brew_mash_sg").jqxNumberInput('decimal'))); |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
967 | if (c > 0.5) |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
968 | $("#brew_mash_efficiency").val(100 * m / c); |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
969 | else |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
970 | $("#brew_mash_efficiency").val(0); |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
971 | }; |
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
972 | |
246
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
973 | function calcEfficiencyBeforeBoil() { |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
974 | var m = 0; |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
975 | var rows = {}; |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
976 | if (!(rows = $('#fermentableGrid').jqxGrid('getrows'))) { |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
977 | return; // grid not yet loaded. |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
978 | } |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
979 | for (var i = 0; i < rows.length; i++) { |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
980 | var row = rows[i]; |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
981 | if (row.f_added == 0) { // Mash |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
982 | m += row.f_amount * (row.f_yield / 100) * (1 - row.f_moisture / 100); |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
983 | } |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
984 | } |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
985 | var tot = sg_to_plato(dataRecord.brew_preboil_sg) * (dataRecord.brew_preboil_volume / 1.04) * dataRecord.brew_preboil_sg * 10 / 1000; |
318
882d4da1f236
Can switch between Wait and Brewday states. Only display valid mash efficiency results.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
986 | var result = 0; |
246
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
987 | if (m > 0) |
318
882d4da1f236
Can switch between Wait and Brewday states. Only display valid mash efficiency results.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
988 | result = Math.round((tot / m * 100) * 10) / 10; |
246
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
989 | if (result < 0) |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
990 | result = 0; |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
991 | $("#brew_preboil_efficiency").val(result); |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
992 | } |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
993 | |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
994 | function calcEfficiencyAfterBoil() { |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
995 | var m = 0; // Sugars added at mash |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
996 | var b = 0; // Sugars added at boil |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
997 | var rows = {}; |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
998 | if (!(rows = $('#fermentableGrid').jqxGrid('getrows'))) { |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
999 | return; // grid not yet loaded. |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1000 | } |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1001 | for (var i = 0; i < rows.length; i++) { |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1002 | var row = rows[i]; |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1003 | if (row.f_added == 0) { // Mash |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1004 | m += row.f_amount * (row.f_yield / 100) * (1 - row.f_moisture / 100); |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1005 | } else if (row.f_added == 1) { // Boil |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1006 | b += row.f_amount * (row.f_yield / 100) * (1 - row.f_moisture / 100); |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1007 | } |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1008 | } |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1009 | var tot = sg_to_plato(dataRecord.brew_aboil_sg) * (dataRecord.brew_aboil_volume / 1.04) * dataRecord.brew_aboil_sg * 10 / 1000; |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1010 | tot -= b; // total sugars in wort minus added sugars. |
318
882d4da1f236
Can switch between Wait and Brewday states. Only display valid mash efficiency results.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
1011 | var result = 0; |
246
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1012 | if (m > 0) |
318
882d4da1f236
Can switch between Wait and Brewday states. Only display valid mash efficiency results.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
1013 | result = Math.round((tot / m * 100) * 10) / 10; |
246
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1014 | if (result < 0) |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1015 | result = 0; |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1016 | dataRecord.brew_aboil_efficiency = result; |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1017 | $("#brew_aboil_efficiency").val(result); |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1018 | |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1019 | } |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
1020 | |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1021 | function GetBUGU() { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1022 | var gu = (dataRecord.est_og - 1) * 1000; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1023 | if (gu > 0) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1024 | return dataRecord.est_ibu / gu; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1025 | else |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1026 | return 0.5; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1027 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1028 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1029 | function GetOptClSO4ratio() { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1030 | var BUGU = GetBUGU(); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1031 | return (-1.2 * BUGU + 1.4); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1032 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1033 | |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1034 | function setWaterAgent(name, amount) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1035 | var rows = $('#miscGrid').jqxGrid('getrows'); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1036 | if (amount == 0) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1037 | for (var i = 0; i < rows.length; i++) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1038 | var row = rows[i]; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1039 | if (row.m_name == name) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1040 | var id = $("#miscGrid").jqxGrid('getrowid', i); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1041 | var commit = $("#miscGrid").jqxGrid('deleterow', id); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1042 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1043 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1044 | } else { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1045 | var found = false; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1046 | for (var i = 0; i < rows.length; i++) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1047 | var row = rows[i]; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1048 | if (row.m_name == name) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1049 | found = true; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1050 | $("#miscGrid").jqxGrid('setcellvalue', i, 'm_amount', amount / 1000); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1051 | break; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1052 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1053 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1054 | if (! found) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1055 | var miscs = new $.jqx.dataAdapter(miscInvSource, { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1056 | loadComplete: function () { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1057 | var records = miscs.records; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1058 | for (var i = 0; i < records.length; i++) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1059 | var record = records[i]; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1060 | if (record.name == name) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1061 | var row = {}; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1062 | row["m_name"] = record.name; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1063 | row["m_amount"] = amount / 1000; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1064 | row["m_cost"] = record.cost; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1065 | row["m_type"] = record.type; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1066 | row["m_use_use"] = record.use_use; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1067 | row["m_time"] = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1068 | row["m_amount_is_weight"] = record.amount_is_weight; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1069 | row["m_inventory"] = record.inventory; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1070 | row["m_avail"] = 1; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1071 | var commit = $("#miscGrid").jqxGrid('addrow', null, row); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1072 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1073 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1074 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1075 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1076 | miscs.dataBind(); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1077 | return; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1078 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1079 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1080 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1081 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1082 | function setRangeIndicator(ion, rangeCode) { |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1083 | if ((rangeCode == "laag") || (rangeCode == "hoog")) |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1084 | $("#wr_"+ion).html("<img src='images/dialog-error.png'><span style='vertical-align: top; font-size: 10px; font-style: italic;'>"+rangeCode + "</span>"); |
262 | 1085 | else |
1086 | $("#wr_"+ion).html("<img src='images/dialog-ok-apply.png'>"); | |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1087 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1088 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1089 | function mix(v1, v2, c1, c2) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1090 | if ((v1 + v2) > 0) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1091 | return ((v1 * c1) + (v2 * c2)) / (v1 + v2); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1092 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1093 | return 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1094 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1095 | |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1096 | // mg/l as CaCO3 |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1097 | function ResidualAlkalinity(total_alkalinity, calcium, magnesium) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1098 | return total_alkalinity - (calcium / 1.4 + magnesium / 1.7); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1099 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1100 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1101 | var Ka1 = 0.0000004445; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1102 | var Ka2 = 0.0000000000468; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1103 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1104 | function PartCO3(pH) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1105 | var H = Math.pow(10, -pH); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1106 | return 100 * Ka1 * Ka2 / (H*H + H * Ka1 + Ka1 * Ka2); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1107 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1108 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1109 | function PartHCO3(pH) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1110 | var H = Math.pow(10, -pH); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1111 | return 100 * Ka1 * H / (H*H + H * Ka1 + Ka1 * Ka2); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1112 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1113 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1114 | function Charge(pH) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1115 | return (-2 * PartCO3(pH) - PartHCO3(pH)); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1116 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1117 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1118 | //Z alkalinity is the amount of acid (in mEq/l) needed to bring water to the target pH (Z pH) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1119 | function ZAlkalinity(pHZ) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1120 | var C43 = Charge(4.3); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1121 | var Cw = Charge(parseFloat($("#wg_ph").jqxNumberInput('decimal'))); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1122 | var Cz = Charge(pHZ); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1123 | var DeltaCNaught = -C43+Cw; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1124 | var CT = parseFloat($("#wg_total_alkalinity").jqxNumberInput('decimal')) / 50 / DeltaCNaught; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1125 | var DeltaCZ = -Cz+Cw; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1126 | return CT * DeltaCZ; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1127 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1128 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1129 | //Z Residual alkalinity is the amount of acid (in mEq/l) needed to bring the water in the mash to the target pH (Z pH) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1130 | function ZRA(pHZ) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1131 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1132 | var Calc = parseFloat($("#wg_calcium").jqxNumberInput('decimal')) / (MMCa / 2); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1133 | var Magn = parseFloat($("#wg_magnesium").jqxNumberInput('decimal')) / (MMMg / 2); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1134 | var Z = ZAlkalinity(pHZ); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1135 | return Z - (Calc / 3.5 + Magn / 7); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1136 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1137 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1138 | function ProtonDeficit(pHZ) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1139 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1140 | var Result = ZRA(pHZ) * parseFloat($("#wg_amount").jqxNumberInput('decimal')); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1141 | // proton deficit for the grist |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1142 | var rows = $('#fermentableGrid').jqxGrid('getrows'); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1143 | for (var i = 0; i < rows.length; i++) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1144 | var row = rows[i]; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1145 | if (row.f_added == 0 && row.f_graintype != 6) { // Added == Mash && graintype != No Malt |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1146 | // Check if acid is required |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1147 | var C1 = 0; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1148 | if ((row.f_di_ph != 5.7) && ((row.f_acid_to_ph_57 < - 0.1) || (row.f_acid_to_ph_57 > 0.1))) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1149 | C1 = row.f_acid_to_ph_57 / (row.f_di_ph - 5.7); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1150 | } else { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1151 | // If the acid_to_ph_5.7 is unknown from the maltster, guess the required acid. |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1152 | var ebc = row.f_color; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1153 | switch (row.f_graintype) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1154 | case 0: // Base, Special, Kilned |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1155 | case 3: |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1156 | case 5: C1 = 0.014 * ebc - 34.192; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1157 | break; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1158 | case 2: C1 = -0.0597 * ebc - 32.457; // Crystal |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1159 | break; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1160 | case 1: C1 = 0.0107 * ebc - 54.768; // Roast |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1161 | break; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1162 | case 4: C1 = -149; // Sour malt |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1163 | break; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1164 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1165 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1166 | x = C1 * (pHZ - row.f_di_ph); // AcidRequired(ZpH) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1167 | Result += x * row.f_amount; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1168 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1169 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1170 | return Result; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1171 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1172 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1173 | function MashpH() { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1174 | var n = 0; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1175 | var pH = 5.4; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1176 | var deltapH = 0.001; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1177 | var deltapd = 0.1; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1178 | var pd = ProtonDeficit(pH); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1179 | while (((pd < -deltapd) || (pd > deltapd)) && (n < 2000)) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1180 | n++; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1181 | if (pd < -deltapd) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1182 | pH -= deltapH; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1183 | else if (pd > deltapd) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1184 | pH += deltapH; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1185 | pd = ProtonDeficit(pH); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1186 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1187 | console.log("MashpH() n: "+n+" pH: "+pH); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1188 | return pH; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1189 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1190 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1191 | function GetAcidSpecs(AT) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1192 | switch(AT) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1193 | case 0: return { // Melkzuur |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1194 | pK1: 3.86, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1195 | pK2: 20, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1196 | pK3: 20, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1197 | MolWt: 90.08, |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1198 | AcidSG: 1214, // 1214 1209 |
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1199 | AcidPrc: 0.88 // 0.88 0.80 |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1200 | }; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1201 | case 1: return { // Zoutzuur |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1202 | pK1: -7, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1203 | pK2: 20, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1204 | pK3: 20, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1205 | MolWt: 36.46, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1206 | AcidSG: 1142, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1207 | AcidPrc: 0.28 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1208 | }; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1209 | case 2: return { // Fosforzuur |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1210 | pK1: 2.12, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1211 | pK2: 7.20, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1212 | pK3: 12.44, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1213 | MolWt: 98.00, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1214 | AcidSG: 1170, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1215 | AcidPrc: 0.25 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1216 | }; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1217 | case 3: return { // Zwavelzuur |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1218 | pK1: -1, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1219 | pK2: 1.92, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1220 | pK3: 20, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1221 | MolWt: 98.07, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1222 | AcidSG: 1700, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1223 | AcidPrc: 0.93 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1224 | }; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1225 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1226 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1227 | |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1228 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1229 | function calcWater() { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1230 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1231 | console.log("calcWater()"); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1232 | var liters = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1233 | var calcium = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1234 | var magnesium = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1235 | var sodium = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1236 | var total_alkalinity = 0; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1237 | var bicarbonate = 0; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1238 | var chloride = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1239 | var sulfate = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1240 | var ph = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1241 | var RA = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1242 | var frac = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1243 | var TpH = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1244 | var protonDeficit = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1245 | |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1246 | if (dataRecord.w1_name == "") { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1247 | return; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1248 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1249 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1250 | // If there is a dillute water source, mix the waters. |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1251 | if (dataRecord.w2_name != "") { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1252 | liters = dataRecord.w1_amount + dataRecord.w2_amount; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1253 | calcium = mix(dataRecord.w1_amount, dataRecord.w2_amount, dataRecord.w1_calcium, dataRecord.w2_calcium); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1254 | magnesium = mix(dataRecord.w1_amount, dataRecord.w2_amount, dataRecord.w1_magnesium, dataRecord.w2_magnesium); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1255 | sodium = mix(dataRecord.w1_amount, dataRecord.w2_amount, dataRecord.w1_sodium, dataRecord.w2_sodium); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1256 | chloride = mix(dataRecord.w1_amount, dataRecord.w2_amount, dataRecord.w1_chloride, dataRecord.w2_chloride); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1257 | sulfate = mix(dataRecord.w1_amount, dataRecord.w2_amount, dataRecord.w1_sulfate, dataRecord.w2_sulfate); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1258 | total_alkalinity = mix(dataRecord.w1_amount, dataRecord.w2_amount, dataRecord.w1_total_alkalinity, dataRecord.w2_total_alkalinity); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1259 | ph = -Math.log10(((Math.pow(10, -dataRecord.w1_ph) * dataRecord.w1_amount) + (Math.pow(10, -dataRecord.w2_ph) * dataRecord.w2_amount)) / liters); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1260 | } else { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1261 | liters = dataRecord.w1_amount; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1262 | calcium = dataRecord.w1_calcium; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1263 | magnesium = dataRecord.w1_magnesium; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1264 | sodium = dataRecord.w1_sodium; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1265 | chloride = dataRecord.w1_chloride; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1266 | sulfate = dataRecord.w1_sulfate; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1267 | total_alkalinity = dataRecord.w1_total_alkalinity; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1268 | ph = dataRecord.w1_ph; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1269 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1270 | $('#wg_amount').val(liters); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1271 | var wg_calcium = calcium; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1272 | $('#wg_calcium').val(Math.round(calcium * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1273 | var wg_magnesium = magnesium; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1274 | $('#wg_magnesium').val(Math.round(magnesium * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1275 | var wg_sodium = sodium; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1276 | $('#wg_sodium').val(Math.round(sodium * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1277 | var wg_total_alkalinity = total_alkalinity; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1278 | $('#wg_total_alkalinity').val(Math.round(total_alkalinity * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1279 | var wg_chloride = chloride; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1280 | $('#wg_chloride').val(Math.round(chloride * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1281 | var wg_sulfate = sulfate; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1282 | $('#wg_sulfate').val(Math.round(sulfate * 10) / 10); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1283 | // Note: brouwhulp has the malts included here in the result. |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1284 | var wg_ph = ph; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1285 | $('#wg_ph').val(Math.round(ph * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1286 | $('#wb_ph').val(Math.round(MashpH() * 10) / 10); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
1287 | $('#est_mash_ph').val(Math.round(MashpH() * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1288 | bicarbonate = total_alkalinity * 1.22; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1289 | var wg_bicarbonate = bicarbonate; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1290 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1291 | // Noot: de volgende berekeningen geven bijna gelijke resultaten in Brun'water. |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1292 | // Calculate Ca |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1293 | RA = parseFloat($("#wa_cacl2").jqxNumberInput('decimal')) * MMCa / MMCaCl2 + |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1294 | parseFloat($("#wa_caso4").jqxNumberInput('decimal')) * MMCa / MMCaSO4; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1295 | calcium += 1000 * RA / liters; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1296 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1297 | // Calculate Mg |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1298 | RA = parseFloat($("#wa_mgso4").jqxNumberInput('decimal')) * MMMg / MMMgSO4; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1299 | magnesium += 1000 * RA / liters; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1300 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1301 | // Calculate Na |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1302 | RA = parseFloat($("#wa_nacl").jqxNumberInput('decimal')) * MMNa / MMNaCl + |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1303 | parseFloat($("#wa_base").jqxNumberInput('decimal')) * MMNa / MMNaHCO3; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1304 | sodium += 1000 * RA / liters; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1305 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1306 | // Calculate SO4 |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1307 | RA = parseFloat($("#wa_caso4").jqxNumberInput('decimal')) * MMSO4 / MMCaSO4 + |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1308 | parseFloat($("#wa_mgso4").jqxNumberInput('decimal')) * MMSO4 / MMMgSO4; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1309 | sulfate += 1000 * RA / liters; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1310 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1311 | // Calculate Cl |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1312 | RA = 2 * parseFloat($("#wa_cacl2").jqxNumberInput('decimal')) * MMCl / MMCaCl2 + |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1313 | parseFloat($("#wa_nacl").jqxNumberInput('decimal')) * MMCl / MMNaCl; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1314 | chloride += 1000 * RA / liters; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1315 | // Einde noot. |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1316 | |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1317 | if ($("#wa_acid_name").val() < 0 || $("#wa_acid_name").val() > 3) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1318 | $("#wa_acid_name").val(0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1319 | dataRecord.wa_acid_name = 0; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1320 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1321 | if (last_acid == '') |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1322 | last_acid = AcidTypeData[$("#wa_acid_name").val()].nl; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1323 | |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1324 | if ($("#wa_base_name").val() < 0 || $("#wa_base_name").val() > 3) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1325 | $("#wa_base_name").val(0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1326 | dataRecord.wa_base_name = 0; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1327 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1328 | if (last_base == '') |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1329 | last_base = BaseTypeData[$("#wa_base_name").val()].nl; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1330 | |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1331 | var AT = dataRecord.wa_acid_name; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1332 | var BT = dataRecord.wa_base_name; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1333 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1334 | var result = GetAcidSpecs(AT); |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1335 | var pK1 = result.pK1; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1336 | var pK2 = result.pK2; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1337 | var pK3 = result.pK3; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1338 | var MolWt = result.MolWt; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1339 | var AcidSG = result.AcidSG; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1340 | var AcidPrc = result.AcidPrc; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1341 | |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1342 | if (dataRecord.calc_acid) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1343 | TpH = parseFloat(dataRecord.mash_ph); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1344 | protonDeficit = ProtonDeficit(TpH); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1345 | console.log("calc_acid tgt: "+TpH+" protonDeficit: "+protonDeficit); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1346 | if (protonDeficit > 0) { // Add acid |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1347 | $("#wa_base").val(0); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1348 | setWaterAgent(last_base, 0); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1349 | frac = CalcFrac(TpH, pK1, pK2, pK3); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1350 | Acid = protonDeficit / frac; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1351 | Acid *= MolWt; // mg |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1352 | Acidmg = Acid; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1353 | Acid = Acid / AcidSG; // ml |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1354 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1355 | if (parseFloat($("#wa_acid_perc").jqxNumberInput('decimal')) == 0) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1356 | $("#wa_acid_perc").val(AcidPrc); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1357 | Acid = Acid * AcidPrc / (parseFloat($("#wa_acid_perc").jqxNumberInput('decimal')) / 100); // ml |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1358 | console.log("Final ml: "+Acid); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1359 | $("#wa_acid").val(Math.round(Acid * 100) / 100); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1360 | setWaterAgent(AcidTypeData[AT].nl, Math.round(Acid * 100) / 100); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1361 | |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1362 | bicarbonate = bicarbonate - protonDeficit * frac / liters; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1363 | total_alkalinity = bicarbonate * 50 / 61; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1364 | } else if (protonDeficit < 0) { //Add base |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1365 | $("#wa_acid").val(0); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1366 | setWaterAgent(last_acid, 0); |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1367 | var r1d = Math.pow(10, (TpH - 6.38)); |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1368 | var r2d = Math.pow(10, (TpH - 10.38)); |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1369 | var f1d = 1 / (1 + r1d + r1d * r2d); |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1370 | var f2d = f1d * r1d; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1371 | var f3d = f2d * r2d; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1372 | switch (BT) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1373 | case 0: RA = -protonDeficit / (f1d - f3d); // Sodiumbicarbonate, mmol totaal |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1374 | RA = RA * MMNaHCO3/1000; //gram |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1375 | $("#wa_base").val(Math.round(RA * 100) / 100); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1376 | setWaterAgent('NaHCO3', Math.round(RA * 100) / 100); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1377 | if (liters > 0) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1378 | // Na |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1379 | RA = parseFloat($("#wa_nacl").jqxNumberInput('decimal')) * MMNa / MMNaCl + |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1380 | parseFloat($("#wa_base").jqxNumberInput('decimal')) * MMNa / MMNaHCO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1381 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1382 | sodium = wg_sodium + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1383 | // HCO3 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1384 | RA = parseFloat($("#wa_base").jqxNumberInput('decimal')) * MMHCO3 / MMNaHCO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1385 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1386 | bicarbonate = wg_bicarbonate + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1387 | total_alkalinity = bicarbonate * 50 / 61; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1388 | RA = ResidualAlkalinity(wb_total_alkalinity, wb_calcium, wb_magnesium); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1389 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1390 | break; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1391 | case 1: RA = -protonDeficit / (2 * f1d + f2d); // Sodiumcarbonate, mmol totaal |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1392 | RA = RA * MMNa2CO3/1000; //gram |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1393 | $("#wa_base").val(Math.round(RA * 100) / 100); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1394 | setWaterAgent('Na2CO3', Math.round(RA * 100) / 100); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1395 | if (liters > 0) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1396 | RA = parseFloat($("#wa_nacl").jqxNumberInput('decimal')) * MMNa / MMNaCl + |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1397 | parseFloat($("#wa_base").jqxNumberInput('decimal')) * 2 * MMNa / MMNa2CO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1398 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1399 | sodium = wg_sodium + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1400 | // HCO3 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1401 | RA = parseFloat($("#wa_base").jqxNumberInput('decimal')) * MMHCO3 / MMNa2CO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1402 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1403 | bicarbonate = wg_bicarbonate + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1404 | total_alkalinity = bicarbonate * 50 / 61; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1405 | RA = ResidualAlkalinity(wb_total_alkalinity, wb_calcium, wb_magnesium); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1406 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1407 | break; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1408 | case 2: RA = -protonDeficit * (f1d - f3d); // Calciumcarbonate, mmol totaal |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1409 | RA = RA * MMCaCO3/1000; //gram |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1410 | //but only 1/3 is effective, so add 3 times as much |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1411 | RA = 3 * RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1412 | $("#wa_base").val(Math.round(RA * 100) / 100); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1413 | setWaterAgent('CaCO3', Math.round(RA * 100) / 100); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1414 | if (liters > 0) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1415 | //Bicarbonate |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1416 | RA = parseFloat($("#wa_base").jqxNumberInput('decimal')) / 3 * MMHCO3 / MMCaCO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1417 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1418 | bicarbonate = wg_bicarbonate + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1419 | total_alkalinity = bicarbonate * 50 / 61; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1420 | //Ca precipitates out as Ca10(PO4)6(OH)2 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1421 | RA = parseFloat($("#wa_cacl2").jqxNumberInput('decimal')) * MMCa / MMCaCl2 + |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1422 | parseFloat($("#wa_caso4").jqxNumberInput('decimal')) * MMCa / MMCaSO4 + |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1423 | parseFloat($("#wa_base").jqxNumberInput('decimal')) * MMCa / MMCaCO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1424 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1425 | calcium = wg_calcium + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1426 | RA = ResidualAlkalinity(wb_total_alkalinity, wb_calcium, wb_magnesium); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1427 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1428 | break; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1429 | case 3: RA = -protonDeficit / 19.3; // Calciumhydroxide |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1430 | $("#wa_base").val(Math.round(RA * 100) / 100); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1431 | setWaterAgent('Ca(OH)2', Math.round(RA * 100) / 100); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1432 | if (liters > 0) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1433 | // Bicarbonate |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1434 | RA = -protonDeficit / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1435 | total_alkalinity = wg_total_alkalinity + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1436 | bicarbonate = total_alkalinity * 61 / 50; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1437 | // Calcium |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1438 | RA = parseFloat($("#wa_cacl2").jqxNumberInput('decimal')) * MMCa / MMCaCl2 + |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1439 | parseFloat($("#wa_caso4").jqxNumberInput('decimal')) * MMCa / MMCaSO4 + |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1440 | parseFloat($("#wa_base").jqxNumberInput('decimal')) * MMCa / MMCaOH2; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1441 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1442 | calcium = wg_calcium + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1443 | RA = ResidualAlkalinity(wb_total_alkalinity, wb_calcium, wb_magnesium); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1444 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1445 | break; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1446 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1447 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1448 | ph = TpH; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1449 | $('#wb_ph').val(Math.round(ph * 10) / 10); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
1450 | $('#est_mash_ph').val(Math.round(ph * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1451 | } else { // Manual |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1452 | console.log("calc_acid no"); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1453 | // First add base salts |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1454 | if (parseFloat($("#wa_base").jqxNumberInput('decimal')) > 0) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1455 | if (liters > 0) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1456 | switch (BT) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1457 | case 0: // Sodiumbicarbonate, Na |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1458 | RA = parseFloat($("#wa_nacl").jqxNumberInput('decimal')) * MMNa / MMNaCl + |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1459 | parseFloat($("#wa_base").jqxNumberInput('decimal')) * MMNa / MMNaHCO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1460 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1461 | sodium = wg_sodium + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1462 | // HCO3 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1463 | RA = parseFloat($("#wa_base").jqxNumberInput('decimal')) * MMHCO3 / MMNaHCO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1464 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1465 | bicarbonate = wg_bicarbonate + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1466 | total_alkalinity = bicarbonate * 50 / 61; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1467 | RA = ResidualAlkalinity(wb_total_alkalinity, wb_calcium, wb_magnesium); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1468 | break; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1469 | case 1: // Sodiumcarbonate |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1470 | RA = parseFloat($("#wa_nacl").jqxNumberInput('decimal')) * MMNa / MMNaCl + |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1471 | parseFloat($("#wa_base").jqxNumberInput('decimal')) * 2 * MMNa / MMNa2CO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1472 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1473 | sodium = wg_sodium + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1474 | // HCO3 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1475 | RA = parseFloat($("#wa_base").jqxNumberInput('decimal')) * MMHCO3 / MMNa2CO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1476 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1477 | bicarbonate = wg_bicarbonate + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1478 | total_alkalinity = bicarbonate * 50 / 61; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1479 | RA = ResidualAlkalinity(wb_total_alkalinity, wb_calcium, wb_magnesium); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1480 | break; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1481 | case 2: // Calciumcarbonate: Bicarbonate |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1482 | RA = parseFloat($("#wa_base").jqxNumberInput('decimal')) / 3 * MMHCO3 / MMCaCO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1483 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1484 | bicarbonate = wg_bicarbonate + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1485 | total_alkalinity = bicarbonate * 50 / 61; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1486 | RA = ResidualAlkalinity(wb_total_alkalinity, wb_calcium, wb_magnesium); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1487 | // Ca |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1488 | RA = parseFloat($("#wa_cacl2").jqxNumberInput('decimal')) * MMCa / MMCaCl2 + |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1489 | parseFloat($("#wa_caso4").jqxNumberInput('decimal')) * MMCa / MMCaSO4 + |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1490 | parseFloat($("#wa_base").jqxNumberInput('decimal')) * MMCa / MMCaCO3; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1491 | RA = 1000 * RA / liters; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1492 | calcium = wg_calcium + RA; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1493 | break; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1494 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1495 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1496 | } |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1497 | |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1498 | TpH = parseFloat(dataRecord.mash_ph); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1499 | pHa = MashpH(); // This one is in demi water, should be in adjusted water??? |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1500 | // Then calculate the new pH with added acids |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1501 | if (parseFloat($("#wa_acid").jqxNumberInput('decimal')) > 0) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1502 | console.log("TpH: "+TpH+" water: "+pHa); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1503 | Acid = parseFloat($("#wa_acid").jqxNumberInput('decimal')); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1504 | if (parseFloat($("#wa_acid_perc").jqxNumberInput('decimal')) == 0) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1505 | $("#wa_acid_perc").val(AcidPrc); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1506 | Acid = Acid / AcidPrc * (parseFloat($("#wa_acid_perc").jqxNumberInput('decimal')) / 100); // ml |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1507 | Acid *= AcidSG; // ml |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1508 | Acid /= MolWt; // mg |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1509 | Acidmg = Acid; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1510 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1511 | //find the pH where the protondeficit = protondeficit by the acid |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1512 | frac = CalcFrac(pHa, pK1, pK2, pK3); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1513 | protonDeficit = Acid * frac; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1514 | |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1515 | var deltapH = 0.001; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1516 | var deltapd = 0.1; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1517 | var pd = ProtonDeficit(pHa); |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1518 | var n = 0; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1519 | while (((pd < (protonDeficit - deltapd)) || (pd > (protonDeficit + deltapd))) && (n < 2000)) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1520 | n++; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1521 | if (pd < (protonDeficit-deltapd)) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1522 | pHa -= deltapH; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1523 | else if (pd > (protonDeficit+deltapd)) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1524 | pHa += deltapH; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1525 | frac = CalcFrac(pHa, pK1, pK2, pK3); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1526 | protonDeficit = Acid * frac; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1527 | pd = ProtonDeficit(pHa); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1528 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1529 | console.log("n: "+n+" pd: "+pd+" protonDeficit: "+protonDeficit+" frac: "+frac+" pHa: "+pHa); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1530 | RA = wg_bicarbonate - protonDeficit * frac / liters; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1531 | bicarbonate = RA; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1532 | total_alkalinity = RA * 50 / 61; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1533 | ph = pHa; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1534 | $('#wb_ph').val(Math.round(ph * 10) / 10); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
1535 | $('#est_mash_ph').val(Math.round(ph * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1536 | } |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1537 | } |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1538 | |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1539 | if ((AT == 3) && (liters > 0)) { // Sulfuctic / Zwavelzuur |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1540 | RA = parseFloat($("#wa_caso4").jqxNumberInput('decimal')) * MMSO4 / MMCaSO4 + |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1541 | parseFloat($("#wa_mgso4").jqxNumberInput('decimal')) * MMSO4 / MMMgSO4 + |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1542 | Acidmg / 1000 * MMSO4 / (MMSO4 + 2); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1543 | RA = 1000 * RA / liters; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1544 | sulfate = wg_sulfate + RA; // Not add to sulfate?? |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1545 | } else if ((AT == 1) && (liters > 0)) { // Hydrochloric, Zoutzuur |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1546 | RA = parseFloat($("#wa_cacl2").jqxNumberInput('decimal')) * MMCl / MMCaCl2 + |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1547 | parseFloat($("#wa_nacl").jqxNumberInput('decimal')) * MMCl / MMNaCl + |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1548 | Acidmg / 1000 * MMCl / (MMCl + 1); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1549 | RA = 1000 * RA / liters; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1550 | chloride = wg_chloride + RA; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1551 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1552 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1553 | // 2:1 Sulfate to Chroride IPA's, Pale Ales. |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1554 | // 1:1 Sulfate to Chloride Balanced |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1555 | // 1:2 Sulfate to Chloride Malty |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1556 | // Note, values below are the other way, cl to so4! |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1557 | // So: 0.5 is IPA's, Pale Ales. |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1558 | // 1 Balanced |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1559 | // 2 Malty. |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1560 | $('#tgt_bu').val(Math.round(GetBUGU() * 100) / 100); |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1561 | // From brouwhulp. |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1562 | if (GetBUGU() < 0.32) |
348 | 1563 | $('#wr_bu').html("<span style='vertical-align: top; font-size: 14px; font-style: italic;'>Zeer moutig en zoet</span>"); |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1564 | else if (GetBUGU() < 0.43) |
348 | 1565 | $('#wr_bu').html("<span style='vertical-align: top; font-size: 14px; font-style: italic;'>Moutig, zoet</span>"); |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1566 | else if (GetBUGU() < 0.52) |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1567 | $('#wr_bu').html("<span style='vertical-align: top; font-size: 14px; font-style: italic;'>Evenwichtig</span>"); |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1568 | else if (GetBUGU() < 0.63) |
348 | 1569 | $('#wr_bu').html("<span style='vertical-align: top; font-size: 14px; font-style: italic;'>Licht hoppig, bitter</span>"); |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1570 | else |
348 | 1571 | $('#wr_bu').html("<span style='vertical-align: top; font-size: 14px; font-style: italic;'>Extra hoppig, zeer bitter</span>"); |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1572 | $('#tgt_cl_so4').val(Math.round(GetOptClSO4ratio() * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1573 | if (sulfate > 0) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1574 | RA = chloride / sulfate; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1575 | else |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1576 | RA = 10; |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1577 | $('#got_cl_so4').val(Math.round(RA * 10) / 10); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1578 | var piCLSO4_low = 0.8 * GetOptClSO4ratio(); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1579 | var piCLSO4_high = 1.2 * GetOptClSO4ratio(); |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1580 | var Res = 'normaal'; |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1581 | if (RA < piCLSO4_low) |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1582 | Res = 'laag'; |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1583 | else if (RA > piCLSO4_high) |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1584 | Res = 'hoog'; |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1585 | setRangeIndicator('cl_so4', Res); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1586 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1587 | $('#wb_calcium').val(Math.round(calcium * 10) / 10); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1588 | $('#wb_magnesium').val(Math.round(magnesium * 10) / 10); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1589 | $('#wb_sodium').val(Math.round(sodium * 10) / 10); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1590 | $('#wb_sulfate').val(Math.round(sulfate * 10) / 10); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1591 | $('#wb_chloride').val(Math.round(chloride * 10) / 10); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1592 | $('#wb_total_alkalinity').val(Math.round(total_alkalinity * 10) / 10); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1593 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1594 | if (calcium < 40) { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1595 | setRangeIndicator("calcium", "laag"); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1596 | } else if (calcium > 150) { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1597 | setRangeIndicator("calcium", "hoog"); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1598 | } else { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1599 | setRangeIndicator("calcium", "normaal"); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1600 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1601 | if (magnesium >= 0 && magnesium <= 30) { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1602 | setRangeIndicator("magnesium", "normaal"); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1603 | } else { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1604 | setRangeIndicator("magnesium", "hoog"); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1605 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1606 | if (sodium <= 150) { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1607 | setRangeIndicator("sodium", "normaal"); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1608 | } else { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1609 | setRangeIndicator("sodium", "hoog"); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1610 | } |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1611 | // Both chloride and sulfate should be above 50 according to |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1612 | // John Palmer. So the Cl/SO4 ratio calculation will work. |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1613 | if (chloride <= 50) { |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1614 | setRangeIndicator("chloride", "laag"); |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1615 | } else if (chloride <= 100) { |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1616 | setRangeIndicator("chloride", "normaal"); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1617 | } else { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1618 | setRangeIndicator("chloride", "hoog"); |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1619 | } |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1620 | if (sulfate <= 50) { |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1621 | setRangeIndicator("sulfate", "laag"); |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1622 | } else if (sulfate <= 350) { |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1623 | setRangeIndicator("sulfate", "normaal"); |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1624 | } else { |
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1625 | setRangeIndicator("sulfate", "hoog"); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1626 | } |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1627 | if (ph < 5.2) { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1628 | setRangeIndicator("ph", "laag"); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1629 | } else if (ph > 5.6) { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1630 | setRangeIndicator("ph", "hoog"); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1631 | } else { |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
1632 | setRangeIndicator("ph", "normaal"); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1633 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1634 | calcSparge(); |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
1635 | calcMiscs(); |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
1636 | calcSupplies(); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1637 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1638 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1639 | function calcSparge() { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1640 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1641 | // Code from BrewBuddy/Brouwhulp, who got it from http://www.brewery.org/brewery/library/Acidi0,00fWaterAJD0497.html |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1642 | var TargetpH = dataRecord.sparge_ph; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1643 | var Source_pH = dataRecord.w1_ph; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1644 | var Source_alkalinity = dataRecord.w1_total_alkalinity; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1645 | // Select watersource or fallback to the first source. |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1646 | if (dataRecord.sparge_source == 1) { // Source 2 |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1647 | if (dataRecord.w2_ph > 0.0) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1648 | Source_pH = dataRecord.w2_ph; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1649 | Source_alkalinity = dataRecord.w2_total_alkalinity; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1650 | } else { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1651 | dataRecord.sparge_source = 0; // Source 1 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1652 | $("#sparge_source").val(0); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1653 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1654 | } else if (dataRecord.sparge_source == 2) { // Mixed |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1655 | if (dataRecord.w2_ph > 0.0) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1656 | Source_pH = parseFloat($("#wg_ph").jqxNumberInput('decimal')); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1657 | Source_alkalinity = parseFloat($("#wg_total_alkalinity").jqxNumberInput('decimal')); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1658 | } else { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1659 | dataRecord.sparge_source = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1660 | $("#sparge_source").val(0); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1661 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1662 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1663 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1664 | // Step 1: Compute the mole fractions of carbonic (f1o), bicarbonate (f2o) and carbonate(f3o) at the water pH |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1665 | var r1 = Math.pow(10, Source_pH - 6.38); |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1666 | var r2 = Math.pow(10, Source_pH - 10.373); |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1667 | var d = 1 + r1 + r1*r2; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1668 | var f1 = 1/d; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1669 | var f2 = r1/d; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1670 | var f3 = r1 * r2 / d; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1671 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1672 | //Step 2. Compute the mole fractions at pH = 4.3 (the pH which defines alkalinity) |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1673 | var r143 = Math.pow(10, 4.3 - 6.38); |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1674 | var r243 = Math.pow(10, 4.3 - 10.373); |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1675 | var d43 = 1 + r143 + r143*r243; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1676 | var f143 = 1/d43; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1677 | var f243 = r143 / d43; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1678 | var f343 = r143 * r243 / d43; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1679 | |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1680 | //Step 3. Convert the water alkalinity to milliequivalents/L |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1681 | var alkalinity = Source_alkalinity / 50; |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1682 | |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1683 | //Step 4. Solve |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1684 | var Ct = (alkalinity - 1000 * (Math.pow(10, -4.3) - Math.pow(10, -Source_pH))) / ((f143-f1)+(f3-f343)); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1685 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1686 | //Step 5. Compute mole fractions at desired pH |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1687 | var r1g = Math.pow(10, TargetpH - 6.38); |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1688 | var r2g = Math.pow(10, TargetpH - 10.373); |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1689 | var dg = 1 + r1g + r1g*r2g; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1690 | var f1g = 1/dg; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1691 | var f2g = r1g / dg; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1692 | var f3g = r1g * r2g / dg; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1693 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1694 | //Step 6. Use these to compute the milliequivalents acid required per liter (mEq/L) |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1695 | var Acid = Ct * ((f1g-f1)+(f3-f3g)) + Math.pow(10, -TargetpH) - Math.pow(10, -Source_pH); //mEq/l |
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1696 | Acid += 0.01; // Add acid that would be required for distilled water. |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1697 | if (dataRecord.sparge_acid_type < 0 || dataRecord.sparge_acid_type > 3) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1698 | dataRecord.sparge_acid_type = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1699 | $("#sparge_acid_type").val(0); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1700 | } |
349
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1701 | |
0e44535f7435
Updated sparge water acid calculation using the latest revision of A.J. deLange pdf document. Tis gives a slightly higher result for the amount of acid to add. The source table data for Lactic is updated, so mash pH is a bit higher too which is better.
Michiel Broek <mbroek@mbse.eu>
parents:
348
diff
changeset
|
1702 | //Step 8. Get the acid data. |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1703 | var AT = dataRecord.sparge_acid_type; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1704 | var result = GetAcidSpecs(AT); |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1705 | var pK1 = result.pK1; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1706 | var pK2 = result.pK2; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1707 | var pK3 = result.pK3; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1708 | var MolWt = result.MolWt; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1709 | var AcidSG = result.AcidSG; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1710 | var AcidPrc = result.AcidPrc; |
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1711 | var fract = CalcFrac(TargetpH, pK1, pK2, pK3); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1712 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1713 | //Step 9. Now divide the mEq required by the "fraction". This is the required number of moles of acid. |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1714 | Acid /= fract; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1715 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1716 | //Step 10. Multiply by molecular weight of the acid |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1717 | Acid *= MolWt; //mg |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1718 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1719 | Acid = Acid / AcidSG; //ml ; 88% lactic solution |
169
9a685ee91537
Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
1720 | var f1 = dataRecord.sparge_acid_perc; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1721 | if (f1 <= 0.1) |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1722 | f1 = AcidPrc; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1723 | Acid = Acid * AcidPrc / (f1 / 100); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1724 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1725 | Acid *= dataRecord.sparge_volume; //ml lactic acid total |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1726 | Acid = Math.round(Acid * 100) / 100; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1727 | dataRecord.sparge_acid_amount = Acid / 1000; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
1728 | $("#sparge_acid_amount").val(Acid); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1729 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
1730 | |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1731 | function calcFermentation() { |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1732 | if (dataRecord.brew_fermenter_sg < 1.020) |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1733 | return; |
282
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1734 | var obrix = sg_to_brix(dataRecord.brew_fermenter_sg); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1735 | console.log("calcFermentation() og:"+dataRecord.brew_fermenter_sg+" brix:"+obrix); |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1736 | if ((dataRecord.primary_end_sg > 0.990) && (dataRecord.primary_end_sg < dataRecord.brew_fermenter_sg)) { |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1737 | var primary_svg = 100 * (dataRecord.brew_fermenter_sg - dataRecord.primary_end_sg) / (dataRecord.brew_fermenter_sg - 1); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
1738 | //console.log("primary svg: "+primary_svg); |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1739 | $("#primary_svg").val(primary_svg); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1740 | if ((dataRecord.fg > 0.990) && (dataRecord.fg < dataRecord.brew_fermenter_sg)) { |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1741 | var final_svg = 100 * (dataRecord.brew_fermenter_sg - dataRecord.fg) / (dataRecord.brew_fermenter_sg - 1); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1742 | $("#final_svg").val(final_svg); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1743 | var ABV = abvol(dataRecord.brew_fermenter_sg, dataRecord.fg); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1744 | $("#final_abv").val(ABV); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1745 | } |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1746 | } |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1747 | } |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
1748 | |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1749 | function CarbCO2toS(CO2, T, SFactor) { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1750 | // Calcuation of disolved CO2 in the beer. |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1751 | // Brewersfriend uses: 3.0378 - (0.050062 * temp) + (0.00026555 * temp^2) |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1752 | // Brouwhulp uses: 0.000849151 * T * T - 0.0587512 * T + 1.71137) |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1753 | var sugar = SFactor * (CO2 - (0.000849151 * T * T - 0.0587512 * T + 1.71137)) / 0.286; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1754 | if (sugar < 0) |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1755 | sugar = 0; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1756 | return sugar; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1757 | } |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1758 | |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1759 | function CarbCO2ToPressure(CO2, T) { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1760 | return (CO2 - (-0.000005594056 * Math.pow(T, 4) + 0.000144357886 * Math.pow(T, 3) + |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1761 | 0.000362999168 * T * T - 0.064872987645 * T + 1.641145175049)) / |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1762 | (0.00000498031 * Math.pow(T, 4) - 0.00024358267 * Math.pow(T, 3) + |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1763 | 0.00385867329 * T * T - 0.05671206825 * T + 1.53801423376); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1764 | } |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1765 | |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1766 | function calcCarbonation() { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1767 | |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1768 | var TSec = dataRecord.secondary_temp; // End fermentation temperature. |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1769 | if (TSec < 1) |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1770 | TSec = dataRecord.primary_end_temp; // Fallback |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1771 | if (TSec < 1) |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1772 | TSec = 18; // Fallback to room temperature. |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1773 | |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1774 | if (dataRecord.fg == 1.000) |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1775 | var ABV = abvol(dataRecord.brew_fermenter_sg, parseFloat($("#est_fg").jqxNumberInput('decimal'))); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1776 | else |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1777 | var ABV = abvol(dataRecord.brew_fermenter_sg, dataRecord.fg); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1778 | |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1779 | // Bottles |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1780 | var SFactor = PrimingSugarData[dataRecord.bottle_priming_sugar].factor; |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1781 | var Amount = CarbCO2toS(dataRecord.bottle_carbonation, TSec, SFactor); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1782 | dataRecord.bottle_priming_amount = Amount; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1783 | $("#bottle_priming_amount").val(Math.round(dataRecord.bottle_priming_amount * 10) / 10); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1784 | $("#bottle_priming_total").val(Math.round(dataRecord.bottle_amount * dataRecord.bottle_priming_amount * 10) / 10); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1785 | $("#bottle_abv").val(Math.round((ABV + Amount * 0.47 / 7.907) * 10) / 10); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1786 | |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1787 | // Kegs |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
1788 | SFactor = PrimingSugarData[dataRecord.keg_priming_sugar].factor; |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1789 | Amount = CarbCO2toS(dataRecord.keg_carbonation, TSec, SFactor); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1790 | var Pressure = CarbCO2ToPressure(dataRecord.keg_carbonation, dataRecord.keg_carbonation_temp); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1791 | if (Pressure < 0) |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1792 | Pressure = 0; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1793 | dataRecord.keg_pressure = Pressure; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1794 | $("#keg_pressure").val(Math.round(Pressure * 10) / 10); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1795 | |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1796 | if (dataRecord.keg_forced_carb) { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1797 | Amount = 0; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1798 | dataRecord.keg_priming_amount = 0; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1799 | $("#keg_priming_amount").val(0); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1800 | $("#keg_priming_total").val(0); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1801 | } else { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1802 | dataRecord.keg_priming_amount = Amount; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1803 | $("#keg_priming_amount").val(Math.round(dataRecord.keg_priming_amount * 10) / 10); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1804 | $("#keg_priming_total").val(Math.round(dataRecord.keg_amount * dataRecord.keg_priming_amount * 10) / 10); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1805 | } |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1806 | |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1807 | $("#keg_abv").val(Math.round((ABV + Amount * 0.47 / 7.907) * 10) / 10); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1808 | } |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
1809 | |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1810 | function calcStage() { |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1811 | |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1812 | var newstage = dataRecord.stage; |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1813 | /* parseFloat$("#brew_date_start").val()) returns the year if it is a valid mysql style date. */ |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1814 | if (newstage == 0 && dataRecord.est_og > 1.005 && dataRecord.est_color > 3 && dataRecord.est_ibu > 3) |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
1815 | newstage = 1; |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1816 | if (newstage == 1 && parseFloat($("#brew_date_start").val()) > 2000) |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1817 | newstage = 2; // Brewday |
318
882d4da1f236
Can switch between Wait and Brewday states. Only display valid mash efficiency results.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
1818 | if (newstage == 2 && ($("#brew_date_start").val() == '')) |
882d4da1f236
Can switch between Wait and Brewday states. Only display valid mash efficiency results.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
1819 | newstage = 1; // No brewday |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1820 | if (newstage == 2 && parseFloat($("#brew_date_end").val()) > 2000) |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1821 | newstage = 3; // Primary |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1822 | if (newstage == 3 && parseFloat($("#primary_end_date").val()) > 2000) |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1823 | newstage = 4; // Secondary |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1824 | if (newstage == 4 && parseFloat($("#secondary_end_date").val()) > 2000) |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1825 | newstage = 5; // Tertiary |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1826 | if (newstage == 5 && parseFloat($("#package_date").val()) > 2000) |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1827 | newstage = 6; // Package |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1828 | if (newstage >= 6 && newstage < 9) { |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1829 | var d = new Date(); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1830 | var date2 = $("#package_date").val(); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1831 | date2 = date2.split('-'); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1832 | // Now we convert the array to a Date object |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1833 | date1 = new Date(d.getFullYear(), d.getMonth(), d.getDate()); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1834 | date2 = new Date(date2[0], date2[1]-1, date2[2]); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1835 | // We use the getTime() method and get the unixtime |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1836 | date1_unixtime = parseInt(date1.getTime() / 1000); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1837 | date2_unixtime = parseInt(date2.getTime() / 1000); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1838 | // This is the calculated difference in seconds |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1839 | var timeDifference = date1_unixtime - date2_unixtime; |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1840 | var timeDifferenceInDays = timeDifference / 60 / 60 / 24; |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1841 | if (timeDifferenceInDays > 0) { // At least one day |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1842 | if (timeDifferenceInDays >= 42) // 6 weeks |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1843 | newstage = 9; // Ready to taste |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1844 | else if (timeDifferenceInDays >= 14) // 14 days |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1845 | newstage = 8; // Mature |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1846 | else |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1847 | newstage = 7; // Carbonation |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1848 | } |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1849 | } |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1850 | if (newstage == 9 && parseFloat($("#taste_date").val()) > 2000) |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1851 | newstage = 10; // Ready |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1852 | |
318
882d4da1f236
Can switch between Wait and Brewday states. Only display valid mash efficiency results.
Michiel Broek <mbroek@mbse.eu>
parents:
317
diff
changeset
|
1853 | if (newstage != dataRecord.stage) { |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
1854 | console.log("calcStage() old: "+dataRecord.stage+" new: "+newstage); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
1855 | dataRecord.stage = newstage; |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
1856 | } |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1857 | |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1858 | /* |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1859 | * Set stage and enable or disable parts of the screens. |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1860 | */ |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1861 | $("#stage").val(StageData[dataRecord.stage].nl); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1862 | if (dataRecord.stage >= 10) { |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1863 | $("#locked").jqxCheckBox({ disabled:false }); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1864 | } |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1865 | |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1866 | /* |
302
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
301
diff
changeset
|
1867 | * When the brew is in progress or done, block equipment select and delete. |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1868 | */ |
302
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
301
diff
changeset
|
1869 | if (dataRecord.stage > 1) { |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1870 | $("#equipmentSelect").jqxDropDownList({ disabled: true }); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1871 | $("#Delete").jqxButton({ disabled: true }); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1872 | } |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
1873 | |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
1874 | if (dataRecord.stage < 1) // Planning, no ingredients |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
1875 | $('#jqxTabs').jqxTabs('disableAt', 8); // Brewday tab |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
1876 | else |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
1877 | $('#jqxTabs').jqxTabs('enableAt', 8); |
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
1878 | |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1879 | if (dataRecord.stage < 3) { // Primary |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1880 | $('#jqxTabs').jqxTabs('disableAt', 9); // Fermentation tab |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1881 | } else { |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1882 | $('#jqxTabs').jqxTabs('enableAt', 9); |
306
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1883 | $("#name").jqxInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1884 | $("#code").jqxInput({ disabled: true }); |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1885 | $("#batch_size").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1886 | $("#boil_size").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1887 | $("#boil_time").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1888 | $("#efficiency").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1889 | $("#est_og").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1890 | $("#type").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1891 | $("#styleSelect").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1892 | $("#color_method").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1893 | $("#ibu_method").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1894 | $("#mash_select").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1895 | $("#w1_name").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1896 | $("#w2_name").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1897 | $("#w2_amount").jqxNumberInput({ readOnly: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1898 | $("#pr_name").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1899 | $("#wa_cacl2").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1900 | $("#wa_caso4").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1901 | $("#wa_mgso4").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1902 | $("#wa_nacl").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1903 | $("#mash_ph").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1904 | $("#calc_acid").jqxCheckBox({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1905 | $("#wa_base_name").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1906 | $("#wa_base").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1907 | $("#wa_acid_name").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1908 | $("#wa_acid").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1909 | $("#wa_acid_perc").jqxNumberInput({ spinButtons: false, readOnly: true, width: 70 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1910 | $("#sparge_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1911 | $("#sparge_volume").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1912 | $("#sparge_ph").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1913 | $("#sparge_source").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1914 | $("#sparge_acid_type").jqxDropDownList({ disabled: true }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
1915 | $("#sparge_acid_perc").jqxNumberInput({ spinButtons: false, readOnly: true, width: false }); |
375
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
1916 | $("#starter_enable").jqxCheckBox({ disabled: true }); |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
1917 | $("#starter_type").jqxDropDownList({ disabled: true }); |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
1918 | $("#starter_try").jqxButton({ disabled: true }); |
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
1919 | $("#starter_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1920 | } |
282
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1921 | if (dataRecord.stage > 3) { // Primary fermentation done |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1922 | $("#brew_date_start").jqxDateTimeInput({ disabled: true }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1923 | $("#brew_date_end").jqxDateTimeInput({ disabled: true }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1924 | $("#brew_mash_ph").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1925 | $("#brew_preboil_ph").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1926 | $("#brew_aboil_ph").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1927 | $("#brew_mash_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1928 | $("#brew_preboil_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1929 | $("#brew_aboil_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1930 | $("#brew_preboil_volume").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1931 | $("#brew_aboil_volume").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1932 | $("#brew_sparge_temperature").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1933 | $("#brew_whirlpool9").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1934 | $("#brew_cooling_to").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1935 | $("#brew_sparge_volume").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1936 | $("#brew_whirlpool7").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1937 | $("#brew_cooling_method").jqxDropDownList({ disabled: true }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1938 | $("#brew_whirlpool6").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1939 | $("#brew_cooling_time").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1940 | $("#brew_sparge_ph").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1941 | $("#brew_whirlpool2").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1942 | $("#brew_aeration_type").jqxDropDownList({ disabled: true }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1943 | $("#brew_fermenter_tcloss").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1944 | $("#brew_aeration_time").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1945 | $("#brew_fermenter_extrawater").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1946 | $("#brew_aeration_speed").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
1947 | } |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
1948 | if (dataRecord.stage < 5) { // At least secondary |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1949 | $('#jqxTabs').jqxTabs('disableAt', 10); // Packaging tab |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1950 | } else { |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1951 | $('#jqxTabs').jqxTabs('enableAt', 10); |
306
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1952 | $("#primary_start_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1953 | $("#primary_max_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1954 | $("#primary_end_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1955 | $("#primary_end_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1956 | $("#primary_end_brix").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1957 | $("#primary_end_date").jqxDateTimeInput({ disabled: true }); |
322
167f3144210d
The fermentation input values were too soon disabled.
Michiel Broek <mbroek@mbse.eu>
parents:
318
diff
changeset
|
1958 | } |
356
36c72e368948
Reduce inventory is now done in a cron job at moments when there are ingredients used. So the inventory should be uptodate at all times.
Michiel Broek <mbroek@mbse.eu>
parents:
352
diff
changeset
|
1959 | if (dataRecord.stage >= 6) { // Packaged |
306
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1960 | $("#secondary_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1961 | $("#secondary_end_date").jqxDateTimeInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1962 | $("#tertiary_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1963 | $("#fg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1964 | $("#final_brix").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1965 | $("#package_date").jqxDateTimeInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1966 | $("#bottle_amount").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1967 | $("#keg_amount").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1968 | $("#bottle_carbonation").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1969 | $("#keg_carbonation").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1970 | $("#bottle_priming_sugar").jqxDropDownList({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1971 | $("#keg_priming_sugar").jqxDropDownList({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1972 | $("#keg_forced_carb").jqxCheckBox({ disabled : true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1973 | $("#bottle_carbonation_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1974 | $("#keg_carbonation_temp").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1975 | } |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1976 | if (dataRecord.stage < 8) { // Taste when at least Mature. |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1977 | $('#jqxTabs').jqxTabs('disableAt', 11); // Tasting tab |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1978 | } else { |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1979 | $('#jqxTabs').jqxTabs('enableAt', 11); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1980 | } |
306
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1981 | |
315
0df8d2db55fb
Disable taste entries only after the product is locked.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
1982 | if (dataRecord.stage == 11) { // Locked |
306
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1983 | $("#taste_date").jqxDateTimeInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1984 | $("#taste_rate").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1985 | $("#taste_color").jqxInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1986 | $("#taste_transparency").jqxInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1987 | $("#taste_head").jqxInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1988 | $("#taste_aroma").jqxInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1989 | $("#taste_taste").jqxInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1990 | $("#taste_aftertaste").jqxInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1991 | $("#taste_mouthfeel").jqxInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1992 | $("#taste_notes").jqxInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1993 | $("#notes").jqxInput({ disabled: true }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1994 | } else { |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1995 | $("#notes").jqxInput({ disabled: false }); |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
1996 | } |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1997 | } |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
1998 | |
280
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
1999 | function showStarter() { |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2000 | |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2001 | if (dataRecord.starter_enable) { |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2002 | $("#propagator").show(); |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2003 | $("#starter_type").jqxDropDownList( {disabled: false }); |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2004 | $("#starter_try").jqxButton({ disabled: false }); |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2005 | $("#starter_sg").jqxNumberInput({ spinButtons: true, readOnly: false, width: 110 }); |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2006 | } else { |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2007 | $("#propagator").hide(); |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2008 | $("#starter_type").jqxDropDownList( {disabled: true }); |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2009 | $("#starter_try").jqxButton({ disabled: true }); |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2010 | $("#starter_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2011 | } |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2012 | } |
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2013 | |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2014 | function calcInit () { |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2015 | console.log("calcInit()"); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2016 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2017 | calcMashEfficiency(); |
246
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
2018 | calcEfficiencyBeforeBoil(); |
8580a08cbaa7
Tab brouwdag automatische berekening rendement voor en na het koken. Bij import worden de kook volumes omgerekend naar 100 graden.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
2019 | calcEfficiencyAfterBoil(); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2020 | |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2021 | $("#starter_enable").on('checked', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2022 | dataRecord.starter_enable = 1; |
280
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2023 | showStarter(); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2024 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2025 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2026 | $("#starter_enable").on('unchecked', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2027 | dataRecord.starter_enable = 0; |
280
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
2028 | showStarter(); |
375
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
2029 | calcYeast(); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2030 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2031 | $("#starter_try").click(function () { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2032 | $("#prop1_volume").val(0); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2033 | $("#prop2_volume").val(0); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2034 | $("#prop3_volume").val(0); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2035 | $("#prop4_volume").val(0); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2036 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2037 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2038 | $('#starter_type').on('change', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2039 | if (event.args) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2040 | var index = event.args.index; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2041 | dataRecord.starter_type = index; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2042 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2043 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2044 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2045 | $('#starter_sg').on('change', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2046 | if (event.args) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2047 | dataRecord.starter_sg = event.args.value; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2048 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2049 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2050 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2051 | $('#prop1_type').on('change', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2052 | if (event.args) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2053 | var index = event.args.index; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2054 | dataRecord.prop1_type = index; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2055 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2056 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2057 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2058 | $('#prop1_volume').on('change', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2059 | if (event.args) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2060 | dataRecord.prop1_volume = event.args.value; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2061 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2062 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2063 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2064 | $('#prop2_type').on('change', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2065 | if (event.args) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2066 | var index = event.args.index; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2067 | dataRecord.prop2_type = index; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2068 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2069 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2070 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2071 | $('#prop2_volume').on('change', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2072 | if (event.args) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2073 | dataRecord.prop2_volume = event.args.value; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2074 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2075 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2076 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2077 | $('#prop3_type').on('change', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2078 | if (event.args) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2079 | var index = event.args.index; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2080 | dataRecord.prop3_type = index; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2081 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2082 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2083 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2084 | $('#prop3_volume').on('change', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2085 | if (event.args) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2086 | dataRecord.prop3_volume = event.args.value; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2087 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2088 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2089 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2090 | $('#prop4_type').on('change', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2091 | if (event.args) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2092 | var index = event.args.index; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2093 | dataRecord.prop4_type = index; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2094 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2095 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2096 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2097 | $('#prop4_volume').on('change', function (event) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2098 | if (event.args) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2099 | dataRecord.prop4_volume = event.args.value; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2100 | calcYeast(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2101 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2102 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2103 | |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2104 | $("#calc_acid").on('checked', function (event) { |
252
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
246
diff
changeset
|
2105 | dataRecord.calc_acid = 1; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2106 | calcWater(); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2107 | }); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2108 | $("#calc_acid").on('unchecked', function (event) { |
252
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
246
diff
changeset
|
2109 | dataRecord.calc_acid = 0; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2110 | calcWater(); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2111 | }); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2112 | $("#w1_name").jqxDropDownList('selectItem', dataRecord.w1_name); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2113 | $("#w2_name").jqxDropDownList('selectItem', dataRecord.w2_name); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2114 | // Fix tap water if zero using mash infuse amount. |
335
4a8704b63376
Fix clearing water 2 volume during product load.
Michiel Broek <mbroek@mbse.eu>
parents:
333
diff
changeset
|
2115 | if (parseFloat($("#w1_amount").jqxNumberInput('decimal')) == 0 && mash_infuse > 0) { |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2116 | $("#w1_amount").val(mash_infuse); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2117 | dataRecord.w1_amount = mash_infuse; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2118 | $("#wg_amount").val(mash_infuse); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2119 | $("#w2_amount").val(0); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2120 | dataRecord.w2_amount = 0; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2121 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2122 | calcWater(); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2123 | $("#w2_amount").on('change', function (event) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2124 | var newval = parseFloat(event.args.value); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2125 | |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2126 | if (newval > mash_infuse) { |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2127 | $("#w2_amount").val(dataRecord.w2_amount); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2128 | return; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2129 | } |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2130 | dataRecord.w1_amount = parseFloat($("#wg_amount").jqxNumberInput('decimal')) - newval; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2131 | $("#w1_amount").val(dataRecord.w1_amount); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2132 | dataRecord.w2_amount = newval; |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2133 | console.log("new: "+event.args.value+" w1: "+dataRecord.w1_amount+" w2: "+dataRecord.w2_amount); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2134 | calcWater(); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2135 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2136 | $('#wa_cacl2').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2137 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2138 | setWaterAgent('CaCl2', 0); // This can prevent double entries. |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2139 | setWaterAgent('CaCl2', event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2140 | calcWater(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2141 | } |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2142 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2143 | $('#wa_caso4').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2144 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2145 | setWaterAgent('CaSO4', 0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2146 | setWaterAgent('CaSO4', event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2147 | calcWater(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2148 | } |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2149 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2150 | $('#wa_mgso4').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2151 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2152 | setWaterAgent('MgSO4', 0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2153 | setWaterAgent('MgSO4', event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2154 | calcWater(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2155 | } |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2156 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2157 | $('#wa_nacl').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2158 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2159 | setWaterAgent('NaCl', 0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2160 | setWaterAgent('NaCl', event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2161 | calcWater(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2162 | } |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2163 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2164 | $('#wa_base_name').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2165 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2166 | var index = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2167 | console.log("wa_base_name "+index); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2168 | setWaterAgent(last_base, 0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2169 | last_base = BaseTypeData[index].nl; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2170 | setWaterAgent(last_base, parseFloat($("#wa_base").jqxNumberInput('decimal'))); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2171 | dataRecord.wa_base_name = index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2172 | calcWater(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2173 | } |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2174 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2175 | $('#wa_base').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2176 | var name = BaseTypeData[$("#wa_base_name").val()].nl; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2177 | setWaterAgent(name, parseFloat(event.args.value)); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2178 | calcWater(); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2179 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2180 | $('#wa_acid_name').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2181 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2182 | var index = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2183 | console.log("wa_acid_name "+index); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2184 | setWaterAgent(last_acid, 0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2185 | last_acid = AcidTypeData[index].nl; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2186 | setWaterAgent(last_acid, parseFloat($("#wa_acid").jqxNumberInput('decimal'))); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2187 | dataRecord.wa_acid_name = index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2188 | calcWater(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2189 | } |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2190 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2191 | $('#wa_acid').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2192 | var name = AcidTypeData[$("#wa_acid_name").val()].nl; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2193 | setWaterAgent(name, parseFloat(event.args.value)); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2194 | calcWater(); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2195 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2196 | $('#wa_acid_perc').on('change', function (event) { calcWater(); }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2197 | |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2198 | $('#color_method').on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2199 | dataRecord.color_method = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2200 | calcFermentables(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2201 | }); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2202 | $('#ibu_method').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2203 | dataRecord.ibu_method = event.args.index; |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2204 | calcFermentables(); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2205 | calcIBUs(); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2206 | }); |
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2207 | |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2208 | $('#batch_size').on('change', function (event) { |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2209 | console.log("batch_size change:"+event.args.value+" old:"+dataRecord.batch_size); |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
2210 | $("#est_a_vol").val(event.args.value * 1.04); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2211 | var new_boil = parseFloat(event.args.value) + dataRecord.boil_size - dataRecord.batch_size; |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2212 | var factor = parseFloat(event.args.value) / dataRecord.batch_size; |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2213 | dataRecord.boil_size = new_boil; |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2214 | $("#boil_size").val(Math.round(new_boil * 100) / 100); |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
2215 | $("#est_pre_vol").val(Math.round(new_boil * 1.04 * 100) / 100); |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2216 | dataRecord.sparge_volume *= factor; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2217 | $("#sparge_volume").val(dataRecord.sparge_volume); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2218 | dataRecord.batch_size = parseFloat(event.args.value); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2219 | calcFermentablesFromOG(parseFloat($("#est_og").jqxNumberInput('decimal'))); // Keep the OG |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2220 | adjustWaters(factor); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2221 | calcFermentables(); |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2222 | adjustHops(factor); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2223 | adjustMiscs(factor); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2224 | adjustYeasts(factor); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2225 | calcIBUs(); |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2226 | calcWater(); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2227 | calcSparge(); |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
2228 | calcMash(); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2229 | }); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2230 | $('#boil_time').on('change', function (event) { |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2231 | console.log("boil_time change:"+parseFloat(event.args.value)+" old:"+dataRecord.boil_time); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2232 | var old_evap = parseFloat(dataRecord.boil_size) - parseFloat(dataRecord.batch_size); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2233 | var new_evap = old_evap * (parseFloat(event.args.value) / dataRecord.boil_time); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2234 | var new_boil = parseFloat(dataRecord.batch_size) + new_evap; |
317
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2235 | //var factor = new_boil / dataRecord.boil_size; |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2236 | dataRecord.boil_time = parseFloat(event.args.value); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2237 | dataRecord.boil_size = new_boil; |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
2238 | $("#est_pre_vol").val(Math.round(new_boil * 1.04 * 100) / 100); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2239 | $("#boil_size").val(Math.round(new_boil * 100) / 100); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2240 | calcFermentables(); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2241 | calcIBUs(); |
317
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2242 | calcYeast(); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2243 | }); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2244 | $('#efficiency').on('change', function (event) { |
317
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2245 | var estog = parseFloat($("#est_og").jqxNumberInput('decimal')); |
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2246 | dataRecord.efficiency = parseFloat(event.args.value); |
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2247 | console.log("efficiency change:"+dataRecord.efficiency+" est_og:"+estog); |
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2248 | calcFermentablesFromOG(estog); // Keep the OG |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2249 | calcFermentables(); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2250 | calcIBUs(); |
317
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2251 | calcYeast(); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2252 | }); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2253 | $('#est_og').on('change', function (event) { |
317
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2254 | dataRecord.est_og = parseFloat(event.args.value); |
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2255 | console.log("est_og change:"+dataRecord.est_og); |
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2256 | $('#est_og2').val(dataRecord.est_og); |
454851b335ad
Better handling of efficience and est_og changes.
Michiel Broek <mbroek@mbse.eu>
parents:
316
diff
changeset
|
2257 | calcFermentablesFromOG(dataRecord.est_og); // Adjust fermentables amounts |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2258 | calcFermentables(); // Update the recipe details |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2259 | calcIBUs(); // and the IBU's. |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
2260 | calcMash(); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2261 | calcYeast(); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2262 | }); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2263 | $('#mash_ph').on('change', function (event) { |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2264 | dataRecord.mash_ph = parseFloat(event.args.value); |
153
15fe253ffa83
Estimate OG recalculation now uses the equipment profile. Added basic water calculations.
Michiel Broek <mbroek@mbse.eu>
parents:
152
diff
changeset
|
2265 | calcWater(); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2266 | }); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2267 | |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2268 | $('#sparge_ph').on('change', function (event) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2269 | dataRecord.sparge_ph = parseFloat(event.args.value); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2270 | calcSparge(); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2271 | }); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2272 | $('#sparge_volume').on('change', function (event) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2273 | dataRecord.sparge_volume = parseFloat(event.args.value); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2274 | calcSparge(); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2275 | }); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2276 | $('#sparge_source').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2277 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2278 | var index = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2279 | dataRecord.sparge_source= index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2280 | calcSparge(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2281 | } |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2282 | }); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2283 | $('#sparge_acid_type').on('change', function (event) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2284 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2285 | var index = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2286 | dataRecord.sparge_acid_type = index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2287 | console.log("new sparge_acid_type: "+dataRecord.sparge_acid_type); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2288 | calcSparge(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2289 | } |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2290 | }); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2291 | $('#sparge_acid_perc').on('change', function (event) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2292 | dataRecord.sparge_acid_perc = parseFloat(event.args.value); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2293 | calcSparge(); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
2294 | }); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2295 | |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
2296 | calcFermentation(); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2297 | calcCarbonation(); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2298 | $('#bottle_amount').on('change', function (event) { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2299 | dataRecord.bottle_amount = parseFloat(event.args.value); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2300 | calcCarbonation(); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2301 | }); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2302 | $('#keg_amount').on('change', function (event) { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2303 | dataRecord.keg_amount = parseFloat(event.args.value); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2304 | calcCarbonation(); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2305 | }); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2306 | $('#bottle_carbonation').on('change', function (event) { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2307 | dataRecord.bottle_carbonation = parseFloat(event.args.value); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2308 | calcCarbonation(); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2309 | }); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2310 | $('#keg_carbonation').on('change', function (event) { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2311 | dataRecord.keg_carbonation = parseFloat(event.args.value); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2312 | calcCarbonation(); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2313 | }); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2314 | $('#bottle_priming_sugar').on('change', function (event) { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2315 | dataRecord.bottle_priming_sugar = event.args.item.value; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2316 | calcCarbonation(); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2317 | }); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2318 | $('#keg_priming_sugar').on('change', function (event) { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2319 | dataRecord.keg_priming_sugar = event.args.item.value; |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2320 | calcCarbonation(); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2321 | }); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2322 | $("#keg_forced_carb").on('checked', function (event) { |
252
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
246
diff
changeset
|
2323 | dataRecord.keg_forced_carb = 1; |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2324 | calcCarbonation(); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2325 | }); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2326 | $("#keg_forced_carb").on('unchecked', function (event) { |
252
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
246
diff
changeset
|
2327 | dataRecord.keg_forced_carb = 0; |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2328 | calcCarbonation(); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2329 | }); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2330 | $('#keg_carbonation_temp').on('change', function (event) { |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2331 | dataRecord.keg_carbonation_temp = parseFloat(event.args.value); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2332 | calcCarbonation(); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2333 | }); |
171
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
2334 | |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2335 | $("#brew_fermenter_extrawater").on('change', function (event) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2336 | dataRecord.brew_fermenter_extrawater = parseFloat(event.args.value); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2337 | calcFermentables(); |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
2338 | calcIBUs(); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2339 | calcYeast(); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2340 | }); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2341 | $("#brew_fermenter_tcloss").on('change', function (event) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2342 | dataRecord.brew_fermenter_tcloss = parseFloat(event.args.value); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2343 | calcFermentables(); |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
2344 | calcIBUs(); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2345 | calcYeast(); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2346 | }); |
281
fef03c7ae353
Update primary svg when entering the end primary sg.
Michiel Broek <mbroek@mbse.eu>
parents:
280
diff
changeset
|
2347 | $("#primary_end_sg").on('change', function (event) { |
fef03c7ae353
Update primary svg when entering the end primary sg.
Michiel Broek <mbroek@mbse.eu>
parents:
280
diff
changeset
|
2348 | dataRecord.primary_end_sg = parseFloat(event.args.value); |
fef03c7ae353
Update primary svg when entering the end primary sg.
Michiel Broek <mbroek@mbse.eu>
parents:
280
diff
changeset
|
2349 | calcFermentation(); |
fef03c7ae353
Update primary svg when entering the end primary sg.
Michiel Broek <mbroek@mbse.eu>
parents:
280
diff
changeset
|
2350 | }); |
282
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2351 | $("#primary_end_brix").on('change', function (event) { |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2352 | // Brix reading from refractometer RI |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2353 | if (dataRecord.brew_fermenter_sg >= 1.020) { |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2354 | OBrix = sg_to_brix(dataRecord.brew_fermenter_sg); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2355 | FBrix = parseFloat(event.args.value) / my_brix_correction; |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2356 | // http://seanterrill.com/2011/04/07/refractometer-fg-results/ |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2357 | var FG = 1.0000 - 0.0044993 * OBrix + 0.0117741 * FBrix + |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2358 | 0.000275806 * (OBrix * OBrix) - 0.00127169 * (FBrix * FBrix) - |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2359 | 0.00000727999 * Math.pow(OBrix, 3) + 0.0000632929 * Math.pow(FBrix, 3); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2360 | // var FG = 1.0000 - 0.00085683 * OBrix + 0.0034941 * FBrix; |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2361 | // Brouwhulp |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2362 | // var FG = ((1.001843 - 0.002318474 * OBrix - 0.000007775 * (OBrix * OBrix) |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2363 | // - 0.000000034 * Math.pow(OBrix, 3) + 0.00574 * (FBrix) |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2364 | // + 0.00003344 * (FBrix * FBrix) + 0.000000086 * Math.pow(FBrix, 3)) |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2365 | // + (1.313454) * 0.001); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2366 | console.log("OBrix:"+OBrix+" FBrix:"+FBrix+" FG:"+FG); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2367 | if (FG > 1.00001) { |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2368 | $("#primary_end_sg").val(FG); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2369 | dataRecord.primary_end_sg = FG; |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2370 | } |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2371 | calcFermentation(); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2372 | } |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2373 | }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2374 | $("#final_brix").on('change', function (event) { |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2375 | // Brix reading from refractometer RI |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2376 | if (dataRecord.brew_fermenter_sg >= 1.020) { |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2377 | OBrix = sg_to_brix(dataRecord.brew_fermenter_sg); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2378 | FBrix = parseFloat(event.args.value) / my_brix_correction; |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2379 | var FG = 1.0000 - 0.0044993 * OBrix + 0.0117741 * FBrix + |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2380 | 0.000275806 * (OBrix * OBrix) - 0.00127169 * (FBrix * FBrix) - |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2381 | 0.00000727999 * Math.pow(OBrix, 3) + 0.0000632929 * Math.pow(FBrix, 3); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2382 | console.log("OBrix:"+OBrix+" FBrix:"+FBrix+" FG:"+FG); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2383 | if (FG > 1.00001) { |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2384 | $("#fg").val(FG); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2385 | dataRecord.fg = FG; |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2386 | } |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2387 | calcFermentation(); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2388 | } |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
2389 | }); |
171
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
2390 | $("#BLog").jqxButton({ disabled: (dataRecord.log_brew) ? false:true }); |
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
2391 | $("#FLog").jqxButton({ disabled: (dataRecord.log_fermentation) ? false:true }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2392 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2393 | |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2394 | $("#styleSelect").jqxDropDownList({ |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2395 | placeHolder: "Kies bierstijl:", |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2396 | theme: theme, |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2397 | source: styleslist, |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2398 | displayMember: "name", |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2399 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2400 | height: 23, |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2401 | dropDownVerticalAlignment: 'top', |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2402 | dropDownWidth: 500, |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2403 | dropDownHeight: 380, |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2404 | renderer: function (index, label, value) { |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2405 | var datarecord = styleslist.records[index]; |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2406 | return datarecord.style_guide + " " + datarecord.style_letter+ " " + datarecord.name; |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2407 | } |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2408 | }); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2409 | $("#styleSelect").on('select', function (event) { |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2410 | if (event.args) { |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2411 | var index = event.args.index; |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2412 | var datarecord = styleslist.records[index]; |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2413 | $("#st_name").val(datarecord.name); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2414 | $("#st_category").val(datarecord.category); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2415 | $("#st_category_number").val(datarecord.category_number); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2416 | $("#st_letter").val(datarecord.style_letter); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2417 | $("#st_guide").val(datarecord.style_guide); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2418 | $("#st_type").val(StyleTypeData[datarecord.type].nl); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2419 | $("#st_og_min").val(datarecord.og_min); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2420 | $("#st_og_max").val(datarecord.og_max); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2421 | $("#st_fg_min").val(datarecord.fg_min); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2422 | $("#st_fg_max").val(datarecord.fg_max); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2423 | $("#st_ibu_min").val(datarecord.ibu_min); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2424 | $("#st_ibu_max").val(datarecord.ibu_max); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2425 | $("#st_color_min").val(datarecord.color_min); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2426 | $("#st_color_max").val(datarecord.color_max); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2427 | $("#st_carb_min").val(datarecord.carb_min); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2428 | $("#st_carb_min2").val(datarecord.carb_min); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2429 | $("#st_carb_max").val(datarecord.carb_max); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2430 | $("#st_carb_max2").val(datarecord.carb_max); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2431 | $("#st_abv_min").val(datarecord.abv_min); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2432 | $("#st_abv_max").val(datarecord.abv_max); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2433 | } |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2434 | }); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2435 | |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2436 | // Equipemnt dropdown list |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2437 | $("#equipmentSelect").jqxDropDownList({ |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2438 | placeHolder: "Kies apparatuur:", |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2439 | theme: theme, |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2440 | source: equipmentlist, |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2441 | displayMember: "name", |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2442 | width: 170, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2443 | height: 23, |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2444 | dropDownWidth: 300, |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2445 | renderer: function (index, label, value) { |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2446 | var datarecord = equipmentlist.records[index]; |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2447 | return datarecord.batch_size + " liter " + datarecord.name; |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2448 | } |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2449 | }); |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2450 | $("#equipmentSelect").on('select', function (event) { |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2451 | if (event.args) { |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2452 | var index = event.args.index; |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2453 | var datarecord = equipmentlist.records[index]; |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2454 | var factor = datarecord.batch_size / dataRecord.batch_size; |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2455 | $("#eq_name").val(datarecord.name); |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2456 | $("#eq_boil_size").val(datarecord.boil_size); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2457 | dataRecord.boil_size = datarecord.boil_size; |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2458 | $("#boil_size").val(datarecord.boil_size); |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2459 | $("#eq_batch_size").val(datarecord.batch_size); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2460 | dataRecord.batch_size = datarecord.batch_size; |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2461 | $("#batch_size").val(datarecord.batch_size); |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
2462 | $("#est_a_vol").val(datarecord.batch_size * 1.04); |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2463 | $("#eq_tun_volume").val(datarecord.tun_volume); |
122
5d5bcab19b8f
Removed unimportant equipemnt items from the screen.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
2464 | dataRecord.eq_tun_weight = datarecord.tun_weight; |
5d5bcab19b8f
Removed unimportant equipemnt items from the screen.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
2465 | dataRecord.eq_tun_specific_heat = datarecord.tun_specific_heat; |
5d5bcab19b8f
Removed unimportant equipemnt items from the screen.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
2466 | dataRecord.eq_tun_material = datarecord.tun_material; |
123
b4aaf52941e9
We get equipment kettle heights in centimeters, we use meters.
Michiel Broek <mbroek@mbse.eu>
parents:
122
diff
changeset
|
2467 | dataRecord.eq_tun_height = datarecord.tun_height / 100.0; |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2468 | $("#eq_top_up_water").val(datarecord.top_up_water); |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2469 | dataRecord.eq_trub_chiller_loss = datarecord.trub_chiller_loss; |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2470 | $("#eq_trub_chiller_loss").val(datarecord.trub_chiller_loss); |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2471 | $("#eq_evap_rate").val(datarecord.evap_rate); |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2472 | $("#eq_boil_time").val(datarecord.boil_time); |
122
5d5bcab19b8f
Removed unimportant equipemnt items from the screen.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
2473 | dataRecord.eq_calc_boil_volume = datarecord.calc_boil_volume; |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2474 | $("#eq_top_up_kettle").val(datarecord.top_up_kettle); |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2475 | $("#eq_hop_utilization").val(datarecord.hop_utilization); |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2476 | $("#eq_notes").val(datarecord.notes); |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2477 | $("#eq_lauter_volume").val(datarecord.lauter_volume); |
123
b4aaf52941e9
We get equipment kettle heights in centimeters, we use meters.
Michiel Broek <mbroek@mbse.eu>
parents:
122
diff
changeset
|
2478 | dataRecord.eq_lauter_height = datarecord.lauter_height / 100.0; |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2479 | $("#eq_lauter_deadspace").val(datarecord.lauter_deadspace); |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2480 | $("#eq_kettle_volume").val(datarecord.kettle_volume); |
123
b4aaf52941e9
We get equipment kettle heights in centimeters, we use meters.
Michiel Broek <mbroek@mbse.eu>
parents:
122
diff
changeset
|
2481 | dataRecord.eq_kettle_height = datarecord.kettle_height / 100.0; |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2482 | $("#eq_mash_volume").val(datarecord.mash_volume); |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
2483 | $("#eq_mash_max").val(datarecord.mash_max); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2484 | dataRecord.eq_mash_max = datarecord.mash_max; |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2485 | $("#mash_max").val(datarecord.mash_max); |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2486 | $("#eq_efficiency").val(datarecord.efficiency); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2487 | dataRecord.efficiency = datarecord.efficiency; |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2488 | $("#efficiency").val(datarecord.efficiency); |
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2489 | |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2490 | dataRecord.sparge_volume = Math.round(datarecord.boil_size * 5) / 10; |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2491 | $("#sparge_volume").val(dataRecord.sparge_volume); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2492 | $("#est_pre_vol").val(datarecord.boil_size * 1.04); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2493 | calcFermentablesFromOG(parseFloat($("#est_og").jqxNumberInput('decimal'))); // Keep the OG |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2494 | adjustWaters(factor); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2495 | calcFermentables(); |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2496 | adjustHops(factor); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2497 | adjustMiscs(factor); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2498 | adjustYeasts(factor); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
2499 | calcIBUs(); |
263
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2500 | calcWater(); |
ed22ac46404b
Adjust water, hops, yeasts and miscs when the batch size or equipment changes.
Michiel Broek <mbroek@mbse.eu>
parents:
262
diff
changeset
|
2501 | calcSparge(); |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2502 | } |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2503 | }); |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2504 | |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2505 | function saveRecord() { |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2506 | console.log("saveRecord()"); |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2507 | var fermentablerow = $('#fermentableGrid').jqxGrid('getrows'); |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2508 | var hoprow = $('#hopGrid').jqxGrid('getrows'); |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2509 | var miscrow = $('#miscGrid').jqxGrid('getrows'); |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2510 | var yeastrow = $('#yeastGrid').jqxGrid('getrows'); |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2511 | var mashrow = $('#mashGrid').jqxGrid('getrows'); |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2512 | var row = { |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2513 | record: my_record, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2514 | uuid: dataRecord.uuid, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2515 | name: $("#name").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2516 | code: $("#code").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2517 | birth: $("#birth").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2518 | stage: dataRecord.stage, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2519 | notes: $("#notes").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2520 | log_brew: dataRecord.log_brew, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2521 | log_fermentation: dataRecord.log_fermentation, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2522 | inventory_reduced: dataRecord.inventory_reduced, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2523 | locked: dataRecord.locked, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2524 | eq_name: $("#eq_name").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2525 | eq_boil_size: parseFloat($("#eq_boil_size").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2526 | eq_batch_size: parseFloat($("#eq_batch_size").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2527 | eq_tun_volume: parseFloat($("#eq_tun_volume").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2528 | eq_tun_weight: dataRecord.eq_tun_weight, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2529 | eq_tun_specific_heat: dataRecord.eq_tun_specific_heat, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2530 | eq_tun_material: dataRecord.eq_tun_material, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2531 | eq_tun_height: dataRecord.eq_tun_height, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2532 | eq_top_up_water: parseFloat($("#eq_top_up_water").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2533 | eq_trub_chiller_loss: parseFloat($("#eq_trub_chiller_loss").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2534 | eq_evap_rate: parseFloat($("#eq_evap_rate").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2535 | eq_boil_time: parseFloat($("#eq_boil_time").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2536 | eq_calc_boil_volume: dataRecord.eq_calc_boil_volume, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2537 | eq_top_up_kettle: parseFloat($("#eq_top_up_kettle").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2538 | eq_hop_utilization: parseFloat($("#eq_hop_utilization").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2539 | eq_notes: $("#eq_notes").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2540 | eq_lauter_volume: parseFloat($("#eq_lauter_volume").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2541 | eq_lauter_height: dataRecord.eq_lauter_height, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2542 | eq_lauter_deadspace: parseFloat($("#eq_lauter_deadspace").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2543 | eq_kettle_volume: parseFloat($("#eq_kettle_volume").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2544 | eq_kettle_height: dataRecord.eq_kettle_height, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2545 | eq_mash_volume: parseFloat($("#eq_mash_volume").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2546 | eq_mash_max: parseFloat($("#eq_mash_max").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2547 | eq_efficiency: parseFloat($("#eq_efficiency").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2548 | brew_date_start: $("#brew_date_start").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2549 | brew_mash_ph: parseFloat($("#brew_mash_ph").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2550 | brew_mash_sg: parseFloat($("#brew_mash_sg").jqxNumberInput('decimal')), |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2551 | brew_mash_efficiency: parseFloat($("#brew_mash_efficiency").jqxNumberInput('decimal')), |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2552 | brew_sparge_temperature: parseFloat($("#brew_sparge_temperature").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2553 | brew_sparge_volume: parseFloat($("#brew_sparge_volume").jqxNumberInput('decimal')), |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2554 | brew_sparge_est: parseFloat($("#brew_sparge_est").jqxNumberInput('decimal')), |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2555 | brew_sparge_ph: parseFloat($("#brew_sparge_ph").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2556 | brew_preboil_volume: parseFloat($("#brew_preboil_volume").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2557 | brew_preboil_sg: parseFloat($("#brew_preboil_sg").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2558 | brew_preboil_ph: parseFloat($("#brew_preboil_ph").jqxNumberInput('decimal')), |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2559 | brew_preboil_efficiency: parseFloat($("#brew_preboil_efficiency").jqxNumberInput('decimal')), |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2560 | brew_aboil_volume: parseFloat($("#brew_aboil_volume").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2561 | brew_aboil_sg: parseFloat($("#brew_aboil_sg").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2562 | brew_aboil_ph: parseFloat($("#brew_aboil_ph").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2563 | brew_aboil_efficiency: parseFloat($("#brew_aboil_efficiency").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2564 | brew_cooling_method: $("#brew_cooling_method").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2565 | brew_cooling_time: parseFloat($("#brew_cooling_time").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2566 | brew_cooling_to: parseFloat($("#brew_cooling_to").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2567 | brew_whirlpool9: parseFloat($("#brew_whirlpool9").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2568 | brew_whirlpool7: parseFloat($("#brew_whirlpool7").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2569 | brew_whirlpool6: parseFloat($("#brew_whirlpool6").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2570 | brew_whirlpool2: parseFloat($("#brew_whirlpool2").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2571 | brew_fermenter_volume: parseFloat($("#brew_fermenter_volume").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2572 | brew_fermenter_extrawater: parseFloat($("#brew_fermenter_extrawater").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2573 | brew_fermenter_tcloss: parseFloat($("#brew_fermenter_tcloss").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2574 | brew_aeration_time: parseFloat($("#brew_aeration_time").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2575 | brew_aeration_speed: parseFloat($("#brew_aeration_speed").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2576 | brew_aeration_type: $("#brew_aeration_type").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2577 | brew_fermenter_sg: parseFloat($("#brew_fermenter_sg").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2578 | brew_fermenter_ibu: parseFloat($("#brew_fermenter_ibu").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2579 | brew_fermenter_color: parseFloat($("#brew_fermenter_color").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2580 | brew_date_end: $("#brew_date_end").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2581 | og: dataRecord.og, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2582 | fg: parseFloat($("#fg").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2583 | primary_start_temp: parseFloat($("#primary_start_temp").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2584 | primary_max_temp: parseFloat($("#primary_max_temp").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2585 | primary_end_temp: parseFloat($("#primary_end_temp").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2586 | primary_end_sg: parseFloat($("#primary_end_sg").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2587 | primary_end_date: $("#primary_end_date").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2588 | secondary_temp: parseFloat($("#secondary_temp").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2589 | secondary_end_date: $("#secondary_end_date").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2590 | tertiary_temp: parseFloat($("#tertiary_temp").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2591 | package_date: $("#package_date").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2592 | bottle_amount: parseFloat($("#bottle_amount").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2593 | bottle_carbonation: parseFloat($("#bottle_carbonation").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2594 | bottle_priming_sugar: $("#bottle_priming_sugar").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2595 | bottle_priming_amount: parseFloat($("#bottle_priming_amount").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2596 | bottle_carbonation_temp: parseFloat($("#bottle_carbonation_temp").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2597 | keg_amount: parseFloat($("#keg_amount").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2598 | keg_carbonation: parseFloat($("#keg_carbonation").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2599 | keg_priming_sugar: $("#keg_priming_sugar").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2600 | keg_priming_amount: parseFloat($("#keg_priming_amount").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2601 | keg_carbonation_temp: parseFloat($("#keg_carbonation_temp").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2602 | keg_forced_carb: dataRecord.keg_forced_carb, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2603 | keg_pressure: parseFloat($("#keg_pressure").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2604 | taste_notes: $("#taste_notes").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2605 | taste_rate: parseFloat($("#taste_rate").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2606 | taste_date: $("#taste_date").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2607 | taste_color: $("#taste_color").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2608 | taste_transparency: $("#taste_transparency").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2609 | taste_head: $("#taste_head").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2610 | taste_aroma: $("#taste_aroma").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2611 | taste_taste: $("#taste_taste").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2612 | taste_mouthfeel: $("#taste_mouthfeel").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2613 | taste_aftertaste: $("#taste_aftertaste").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2614 | st_name: $('#st_name').val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2615 | st_letter: $('#st_letter').val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2616 | st_guide: $('#st_guide').val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2617 | st_type: dataRecord.st_type, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2618 | st_category: $('#st_category').val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2619 | st_category_number: parseFloat($("#st_category_number").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2620 | st_og_min: parseFloat($("#st_og_min").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2621 | st_og_max: parseFloat($("#st_og_max").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2622 | st_fg_min: parseFloat($("#st_fg_min").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2623 | st_fg_max: parseFloat($("#st_fg_max").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2624 | st_ibu_min: parseFloat($("#st_ibu_min").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2625 | st_ibu_max: parseFloat($("#st_ibu_max").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2626 | st_color_min: parseFloat($("#st_color_min").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2627 | st_color_max: parseFloat($("#st_color_max").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2628 | st_carb_min: parseFloat($("#st_carb_min").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2629 | st_carb_max: parseFloat($("#st_carb_max").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2630 | st_abv_min: parseFloat($("#st_abv_min").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2631 | st_abv_max: parseFloat($("#st_abv_max").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2632 | type: $("#type").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2633 | batch_size: parseFloat($("#batch_size").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2634 | boil_size: parseFloat($("#boil_size").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2635 | boil_time: parseFloat($("#boil_time").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2636 | efficiency: parseFloat($("#efficiency").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2637 | est_og: parseFloat($("#est_og").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2638 | est_fg: parseFloat($("#est_fg").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2639 | est_abv: parseFloat($("#est_abv").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2640 | est_color: parseFloat($("#est_color").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2641 | color_method: $("#color_method").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2642 | est_ibu: parseFloat($("#est_ibu").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2643 | ibu_method: $("#ibu_method").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2644 | est_carb: parseFloat($("#est_carb").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2645 | mash_name: $("#mash_name").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2646 | mash_ph: parseFloat($("#mash_ph").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2647 | sparge_temp: parseFloat($("#sparge_temp").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2648 | sparge_ph: parseFloat($("#sparge_ph").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2649 | sparge_volume: parseFloat($("#sparge_volume").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2650 | sparge_source: $("#sparge_source").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2651 | sparge_acid_type: $("#sparge_acid_type").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2652 | sparge_acid_perc: parseFloat($("#sparge_acid_perc").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2653 | sparge_acid_amount: dataRecord.sparge_acid_amount, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2654 | calc_acid: dataRecord.calc_acid, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2655 | w1_name: $("#w1_name").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2656 | w1_amount: parseFloat($("#w1_amount").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2657 | w1_calcium: parseFloat($("#w1_calcium").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2658 | w1_sulfate: parseFloat($("#w1_sulfate").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2659 | w1_chloride: parseFloat($("#w1_chloride").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2660 | w1_sodium: parseFloat($("#w1_sodium").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2661 | w1_magnesium: parseFloat($("#w1_magnesium").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2662 | w1_total_alkalinity: parseFloat($("#w1_total_alkalinity").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2663 | w1_ph: parseFloat($("#w1_ph").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2664 | w1_cost: dataRecord.w1_cost, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2665 | w2_name: $("#w2_name").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2666 | w2_amount: parseFloat($("#w2_amount").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2667 | w2_calcium: parseFloat($("#w2_calcium").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2668 | w2_sulfate: parseFloat($("#w2_sulfate").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2669 | w2_chloride: parseFloat($("#w2_chloride").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2670 | w2_sodium: parseFloat($("#w2_sodium").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2671 | w2_magnesium: parseFloat($("#w2_magnesium").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2672 | w2_total_alkalinity: parseFloat($("#w2_total_alkalinity").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2673 | w2_ph: parseFloat($("#w2_ph").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2674 | w2_cost: dataRecord.w2_cost, |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2675 | wg_amount: parseFloat($("#wg_amount").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2676 | wg_calcium: parseFloat($("#wg_calcium").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2677 | wg_sulfate: parseFloat($("#wg_sulfate").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2678 | wg_chloride: parseFloat($("#wg_chloride").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2679 | wg_sodium: parseFloat($("#wg_sodium").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2680 | wg_magnesium: parseFloat($("#wg_magnesium").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2681 | wg_total_alkalinity: parseFloat($("#wg_total_alkalinity").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2682 | wg_ph: parseFloat($("#wg_ph").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2683 | wb_calcium: parseFloat($("#wb_calcium").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2684 | wb_sulfate: parseFloat($("#wb_sulfate").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2685 | wb_chloride: parseFloat($("#wb_chloride").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2686 | wb_sodium: parseFloat($("#wb_sodium").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2687 | wb_magnesium: parseFloat($("#wb_magnesium").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2688 | wb_total_alkalinity: parseFloat($("#wb_total_alkalinity").jqxNumberInput('decimal')), |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2689 | wb_ph: parseFloat($("#wb_ph").jqxNumberInput('decimal')), |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2690 | wa_acid_name: $("#wa_acid_name").val(), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2691 | wa_acid_perc: parseFloat($("#wa_acid_perc").jqxNumberInput('decimal')), |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2692 | wa_base_name: $("#wa_base_name").val(), |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2693 | starter_enable: dataRecord.starter_enable, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2694 | starter_type: $("#starter_type").val(), |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2695 | starter_sg: parseFloat($("#starter_sg").jqxNumberInput('decimal')), |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2696 | prop1_type: $("#prop1_type").val(), |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2697 | prop1_volume: parseFloat($("#prop1_volume").jqxNumberInput('decimal')), |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2698 | prop2_type: $("#prop2_type").val(), |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2699 | prop2_volume: parseFloat($("#prop2_volume").jqxNumberInput('decimal')), |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2700 | prop3_type: $("#prop3_type").val(), |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2701 | prop3_volume: parseFloat($("#prop3_volume").jqxNumberInput('decimal')), |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2702 | prop4_type: $("#prop4_type").val(), |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2703 | prop4_volume: parseFloat($("#prop4_volume").jqxNumberInput('decimal')), |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2704 | fermentables: fermentablerow, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2705 | hops: hoprow, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2706 | miscs: miscrow, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2707 | yeasts: yeastrow, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2708 | mashs: mashrow |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2709 | }; |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2710 | var data = "update=true&" + $.param(row); |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2711 | $.ajax({ |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2712 | dataType: 'json', |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2713 | url: url, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2714 | cache: false, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2715 | data: data, |
316
82c3bb9a40c2
See if we can solve the sometimes not saved data.
Michiel Broek <mbroek@mbse.eu>
parents:
315
diff
changeset
|
2716 | async: false, |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2717 | type: "POST", |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2718 | success: function (data, status, xhr) { |
316
82c3bb9a40c2
See if we can solve the sometimes not saved data.
Michiel Broek <mbroek@mbse.eu>
parents:
315
diff
changeset
|
2719 | console.log("saveRecord() success"); |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2720 | }, |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2721 | error: function(jqXHR, textStatus, errorThrown) { |
316
82c3bb9a40c2
See if we can solve the sometimes not saved data.
Michiel Broek <mbroek@mbse.eu>
parents:
315
diff
changeset
|
2722 | console.log("saveRecord() error"); |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2723 | } |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2724 | }); |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2725 | }; |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
2726 | |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
2727 | var dataRecord = {}; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2728 | var url = "includes/db_product.php"; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2729 | |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2730 | // Prepare the data |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2731 | var source = { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2732 | datatype: "json", |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2733 | cache: false, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2734 | datafields: [ |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2735 | // From prod_main |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2736 | { name: 'record', type: 'number' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2737 | { name: 'uuid', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2738 | { name: 'name', type: 'string' }, |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2739 | { name: 'code', type: 'string' }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2740 | { name: 'birth', type: 'string' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2741 | { name: 'stage', type: 'int' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2742 | { name: 'notes', type: 'string' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2743 | { name: 'log_brew', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2744 | { name: 'log_fermentation', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2745 | { name: 'inventory_reduced', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2746 | { name: 'locked', type: 'int' }, |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2747 | { name: 'eq_name', type: 'string' }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2748 | { name: 'eq_boil_size', type: 'float' }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2749 | { name: 'eq_batch_size', type: 'float' }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2750 | { name: 'eq_tun_volume', type: 'float' }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2751 | { name: 'eq_tun_weight', type: 'float' }, |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2752 | { name: 'eq_tun_specific_heat', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2753 | { name: 'eq_tun_material', type: 'int' }, |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2754 | { name: 'eq_tun_height', type: 'float' }, |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2755 | { name: 'eq_top_up_water', type: 'float' }, |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2756 | { name: 'eq_trub_chiller_loss', type: 'float' }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2757 | { name: 'eq_evap_rate', type: 'float' }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2758 | { name: 'eq_boil_time', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2759 | { name: 'eq_calc_boil_volume', type: 'int' }, |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2760 | { name: 'eq_top_up_kettle', type: 'float' }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2761 | { name: 'eq_hop_utilization', type: 'float' }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2762 | { name: 'eq_notes', type: 'string' }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2763 | { name: 'eq_lauter_volume', type: 'float' }, |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2764 | { name: 'eq_lauter_height', type: 'float' }, |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2765 | { name: 'eq_lauter_deadspace', type: 'float' }, |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2766 | { name: 'eq_kettle_volume', type: 'float' }, |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2767 | { name: 'eq_kettle_height', type: 'float' }, |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2768 | { name: 'eq_mash_volume', type: 'float' }, |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
2769 | { name: 'eq_mash_max', type: 'float' }, |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2770 | { name: 'eq_efficiency', type: 'float' }, |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2771 | { name: 'brew_date_start', type: 'string' }, |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2772 | { name: 'brew_mash_ph', type: 'float' }, |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2773 | { name: 'brew_mash_sg', type: 'float' }, |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2774 | { name: 'brew_mash_efficiency', type: 'float' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2775 | { name: 'brew_sparge_temperature', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2776 | { name: 'brew_sparge_volume', type: 'float' }, |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2777 | { name: 'brew_sparge_est', type: 'float' }, |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
2778 | { name: 'brew_sparge_ph', type: 'float' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2779 | { name: 'brew_preboil_volume', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2780 | { name: 'brew_preboil_sg', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2781 | { name: 'brew_preboil_ph', type: 'float' }, |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2782 | { name: 'brew_preboil_efficiency', type: 'float' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2783 | { name: 'brew_aboil_volume', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2784 | { name: 'brew_aboil_sg', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2785 | { name: 'brew_aboil_ph', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2786 | { name: 'brew_aboil_efficiency', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2787 | { name: 'brew_cooling_method', type: 'int' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2788 | { name: 'brew_cooling_time', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2789 | { name: 'brew_cooling_to', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2790 | { name: 'brew_whirlpool9', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2791 | { name: 'brew_whirlpool7', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2792 | { name: 'brew_whirlpool6', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2793 | { name: 'brew_whirlpool2', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2794 | { name: 'brew_fermenter_volume', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2795 | { name: 'brew_fermenter_extrawater', type: 'float' }, |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2796 | { name: 'brew_fermenter_tcloss', type: 'float' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2797 | { name: 'brew_aeration_time', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2798 | { name: 'brew_aeration_speed', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2799 | { name: 'brew_aeration_type', type: 'int' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2800 | { name: 'brew_fermenter_sg', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2801 | { name: 'brew_fermenter_ibu', type: 'float' }, |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2802 | { name: 'brew_fermenter_color', type: 'float' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2803 | { name: 'brew_date_end', type: 'string' }, |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2804 | { name: 'og', type: 'float' }, |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
2805 | { name: 'fg', type: 'float' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2806 | { name: 'primary_start_temp', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2807 | { name: 'primary_max_temp', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2808 | { name: 'primary_end_temp', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2809 | { name: 'primary_end_sg', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2810 | { name: 'primary_end_date', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2811 | { name: 'secondary_temp', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2812 | { name: 'secondary_end_date', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2813 | { name: 'tertiary_temp', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2814 | { name: 'package_date', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2815 | { name: 'bottle_amount', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2816 | { name: 'bottle_carbonation', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2817 | { name: 'bottle_priming_sugar', type: 'int' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2818 | { name: 'bottle_priming_amount', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2819 | { name: 'bottle_carbonation_temp', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2820 | { name: 'keg_amount', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2821 | { name: 'keg_carbonation', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2822 | { name: 'keg_priming_sugar', type: 'int' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2823 | { name: 'keg_priming_amount', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2824 | { name: 'keg_carbonation_temp', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2825 | { name: 'keg_forced_carb', type: 'int' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2826 | { name: 'keg_pressure', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2827 | { name: 'taste_notes', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2828 | { name: 'taste_rate', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2829 | { name: 'taste_date', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2830 | { name: 'taste_color', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2831 | { name: 'taste_transparency', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2832 | { name: 'taste_head', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2833 | { name: 'taste_aroma', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2834 | { name: 'taste_taste', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2835 | { name: 'taste_mouthfeel', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2836 | { name: 'taste_aftertaste', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2837 | { name: 'st_name', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2838 | { name: 'st_letter', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2839 | { name: 'st_guide', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2840 | { name: 'st_category', type: 'string' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2841 | { name: 'st_category_number', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2842 | { name: 'st_type', type: 'int' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2843 | { name: 'st_og_min', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2844 | { name: 'st_og_max', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2845 | { name: 'st_fg_min', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2846 | { name: 'st_fg_max', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2847 | { name: 'st_ibu_min', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2848 | { name: 'st_ibu_max', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2849 | { name: 'st_color_min', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2850 | { name: 'st_color_max', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2851 | { name: 'st_carb_min', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2852 | { name: 'st_carb_max', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2853 | { name: 'st_abv_min', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2854 | { name: 'st_abv_max', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2855 | { name: 'type', type: 'int' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2856 | { name: 'batch_size', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2857 | { name: 'boil_size', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2858 | { name: 'boil_time', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2859 | { name: 'efficiency', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2860 | { name: 'est_og', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2861 | { name: 'est_fg', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2862 | { name: 'est_abv', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2863 | { name: 'est_color', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2864 | { name: 'color_method', type: 'int' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2865 | { name: 'est_ibu', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2866 | { name: 'ibu_method', type: 'int' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2867 | { name: 'est_carb', type: 'float' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2868 | { name: 'sparge_temp', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2869 | { name: 'sparge_ph', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2870 | { name: 'sparge_volume', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2871 | { name: 'sparge_source', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2872 | { name: 'sparge_acid_type', type: 'int' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2873 | { name: 'sparge_acid_perc', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2874 | { name: 'sparge_acid_amount', type: 'float' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2875 | { name: 'mash_ph', type: 'float' }, |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2876 | { name: 'mash_name', type: 'string' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2877 | { name: 'calc_acid', type: 'int' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2878 | { name: 'w1_name', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2879 | { name: 'w1_amount', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2880 | { name: 'w1_calcium', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2881 | { name: 'w1_sulfate', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2882 | { name: 'w1_chloride', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2883 | { name: 'w1_sodium', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2884 | { name: 'w1_magnesium', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2885 | { name: 'w1_total_alkalinity', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2886 | { name: 'w1_ph', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2887 | { name: 'w1_cost', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2888 | { name: 'w2_name', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2889 | { name: 'w2_amount', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2890 | { name: 'w2_calcium', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2891 | { name: 'w2_sulfate', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2892 | { name: 'w2_chloride', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2893 | { name: 'w2_sodium', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2894 | { name: 'w2_magnesium', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2895 | { name: 'w2_total_alkalinity', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2896 | { name: 'w2_ph', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2897 | { name: 'w2_cost', type: 'float' }, |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2898 | { name: 'wg_amount', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2899 | { name: 'wg_calcium', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2900 | { name: 'wg_sulfate', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2901 | { name: 'wg_chloride', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2902 | { name: 'wg_sodium', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2903 | { name: 'wg_magnesium', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2904 | { name: 'wg_total_alkalinity', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2905 | { name: 'wg_ph', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2906 | { name: 'wb_calcium', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2907 | { name: 'wb_sulfate', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2908 | { name: 'wb_chloride', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2909 | { name: 'wb_sodium', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2910 | { name: 'wb_magnesium', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2911 | { name: 'wb_total_alkalinity', type: 'float' }, |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2912 | { name: 'wb_ph', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2913 | { name: 'wa_acid_name', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2914 | { name: 'wa_acid_perc', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2915 | { name: 'wa_base_name', type: 'int' }, |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2916 | { name: 'starter_enable', type: 'int' }, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2917 | { name: 'starter_type', type: 'int' }, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2918 | { name: 'starter_sg', type: 'float' }, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2919 | { name: 'prop1_type', type: 'int' }, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2920 | { name: 'prop1_volume', type: 'float' }, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2921 | { name: 'prop2_type', type: 'int' }, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2922 | { name: 'prop2_volume', type: 'float' }, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2923 | { name: 'prop3_type', type: 'int' }, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2924 | { name: 'prop3_volume', type: 'float' }, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2925 | { name: 'prop4_type', type: 'int' }, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
2926 | { name: 'prop4_volume', type: 'float' }, |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2927 | { name: 'fermentables', type: 'array' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2928 | { name: 'hops', type: 'array' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2929 | { name: 'miscs', type: 'array' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2930 | { name: 'yeasts', type: 'array' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
2931 | { name: 'mashs', type: 'array' } |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2932 | ], |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2933 | id: 'record', |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2934 | url: url + '?record=' + my_record |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2935 | }; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2936 | // Load data and select one record. |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2937 | var dataAdapter = new $.jqx.dataAdapter(source, { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2938 | loadComplete: function () { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2939 | var records = dataAdapter.records; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2940 | dataRecord = records[0]; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2941 | // Hidden record uuid |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2942 | $("#name").val(dataRecord.name); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2943 | $("#code").val(dataRecord.code); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2944 | $("#birth").val(dataRecord.birth); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
2945 | $("#stage").val(StageData[dataRecord.stage].nl); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2946 | $("#notes").val(dataRecord.notes); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
2947 | $("#locked").val(dataRecord.locked); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2948 | $("#eq_name").val(dataRecord.eq_name); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2949 | $("#eq_notes").val(dataRecord.eq_notes); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2950 | $("#eq_boil_size").val(dataRecord.eq_boil_size); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2951 | $("#eq_batch_size").val(dataRecord.eq_batch_size); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2952 | $("#eq_tun_volume").val(dataRecord.eq_tun_volume); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2953 | $("#eq_top_up_water").val(dataRecord.eq_top_up_water); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2954 | $("#eq_trub_chiller_loss").val(dataRecord.eq_trub_chiller_loss); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2955 | $("#eq_evap_rate").val(dataRecord.eq_evap_rate); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2956 | $("#eq_boil_time").val(dataRecord.eq_boil_time); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2957 | $("#eq_top_up_kettle").val(dataRecord.eq_top_up_kettle); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2958 | $("#eq_hop_utilization").val(dataRecord.eq_hop_utilization); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2959 | $("#eq_lauter_volume").val(dataRecord.eq_lauter_volume); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
2960 | $("#eq_lauter_deadspace").val(dataRecord.eq_lauter_deadspace); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2961 | $("#eq_kettle_volume").val(dataRecord.eq_kettle_volume); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2962 | $("#eq_mash_volume").val(dataRecord.eq_mash_volume); |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
2963 | $("#eq_mash_max").val(dataRecord.eq_mash_max); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2964 | $("#eq_efficiency").val(dataRecord.eq_efficiency); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2965 | // Brewdate |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2966 | $("#brew_date_start").val(dataRecord.brew_date_start); |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2967 | $("#brew_mash_ph").val(dataRecord.brew_mash_ph); |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
2968 | $("#brew_mash_sg").val(dataRecord.brew_mash_sg); |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2969 | $("#brew_mash_efficiency").val(dataRecord.brew_mash_efficiency); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2970 | // Header Spoelen en filteren |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2971 | $("#brew_sparge_temperature").val(dataRecord.brew_sparge_temperature); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2972 | $("#brew_sparge_volume").val(dataRecord.brew_sparge_volume); |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2973 | $("#brew_sparge_est").val(dataRecord.brew_sparge_est); |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
2974 | $("#brew_sparge_ph").val(dataRecord.brew_sparge_ph); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2975 | // Header Beluchten |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2976 | $("#brew_aeration_type").val(dataRecord.brew_aeration_type); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2977 | $("#brew_aeration_time").val(dataRecord.brew_aeration_time); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2978 | $("#brew_aeration_speed").val(dataRecord.brew_aeration_speed); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2979 | |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2980 | $("#brew_preboil_ph").val(dataRecord.brew_preboil_ph); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2981 | $("#brew_preboil_sg").val(dataRecord.brew_preboil_sg); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2982 | $("#brew_preboil_volume").val(dataRecord.brew_preboil_volume); |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
2983 | $("#brew_preboil_efficiency").val(dataRecord.brew_preboil_efficiency); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2984 | // Header Koelen en whirlpoolen |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2985 | $("#brew_whirlpool9").val(dataRecord.brew_whirlpool9); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2986 | $("#brew_whirlpool7").val(dataRecord.brew_whirlpool7); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2987 | $("#brew_whirlpool6").val(dataRecord.brew_whirlpool6); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2988 | $("#brew_whirlpool2").val(dataRecord.brew_whirlpool2); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2989 | // Header Naar gistvat |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2990 | $("#brew_fermenter_volume").val(dataRecord.brew_fermenter_volume); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2991 | $("#brew_fermenter_sg").val(dataRecord.brew_fermenter_sg); |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
2992 | $("#brew_fermenter_sg2").val(dataRecord.brew_fermenter_sg); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2993 | $("#brew_fermenter_ibu").val(dataRecord.brew_fermenter_ibu); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2994 | $("#brew_fermenter_color").val(dataRecord.brew_fermenter_color); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2995 | $("#brew_fermenter_extrawater").val(dataRecord.brew_fermenter_extrawater); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
2996 | $("#brew_fermenter_tcloss").val(dataRecord.brew_fermenter_tcloss); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2997 | |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2998 | $("#brew_aboil_ph").val(dataRecord.brew_aboil_ph); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
2999 | $("#brew_aboil_sg").val(dataRecord.brew_aboil_sg); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
3000 | $("#brew_aboil_volume").val(dataRecord.brew_aboil_volume); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
3001 | $("#brew_aboil_efficiency").val(dataRecord.brew_aboil_efficiency); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
3002 | // Header Koelen en whirlpoolen |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
3003 | $("#brew_cooling_to").val(dataRecord.brew_cooling_to); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
3004 | $("#brew_cooling_method").val(dataRecord.brew_cooling_method); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
3005 | $("#brew_cooling_time").val(dataRecord.brew_cooling_time); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
3006 | // Niks |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
3007 | $("#brew_date_end").val(dataRecord.brew_date_end); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3008 | $("#og").val(dataRecord.og); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3009 | $("#fg").val(dataRecord.fg); |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
3010 | $("#primary_start_temp").val(dataRecord.primary_start_temp); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
3011 | $("#primary_max_temp").val(dataRecord.primary_max_temp); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
3012 | $("#primary_end_temp").val(dataRecord.primary_end_temp); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
3013 | $("#primary_end_sg").val(dataRecord.primary_end_sg); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
3014 | $("#primary_end_date").val(dataRecord.primary_end_date); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
3015 | $("#secondary_temp").val(dataRecord.secondary_temp); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
3016 | $("#secondary_end_date").val(dataRecord.secondary_end_date); |
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
3017 | $("#tertiary_temp").val(dataRecord.tertiary_temp); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3018 | $("#package_date").val(dataRecord.package_date); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3019 | $("#bottle_amount").val(dataRecord.bottle_amount); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3020 | $("#bottle_carbonation").val(dataRecord.bottle_carbonation); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3021 | $("#bottle_priming_sugar").val(dataRecord.bottle_priming_sugar); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3022 | $("#bottle_priming_amount").val(dataRecord.bottle_priming_amount); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3023 | $("#bottle_carbonation_temp").val(dataRecord.bottle_carbonation_temp); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3024 | $("#keg_amount").val(dataRecord.keg_amount); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3025 | $("#keg_carbonation").val(dataRecord.keg_carbonation); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3026 | $("#keg_priming_sugar").val(dataRecord.keg_priming_sugar); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3027 | $("#keg_priming_amount").val(dataRecord.keg_priming_amount); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3028 | $("#keg_carbonation_temp").val(dataRecord.keg_carbonation_temp); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3029 | $("#keg_forced_carb").val(dataRecord.keg_forced_carb); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3030 | $("#keg_pressure").val(dataRecord.keg_pressure); |
162
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3031 | $("#taste_notes").val(dataRecord.taste_notes); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3032 | $("#taste_rate").val(dataRecord.taste_rate); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3033 | $("#taste_date").val(dataRecord.taste_date); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3034 | $("#taste_color").val(dataRecord.taste_color); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3035 | $("#taste_transparency").val(dataRecord.taste_transparency); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3036 | $("#taste_head").val(dataRecord.taste_head); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3037 | $("#taste_aroma").val(dataRecord.taste_aroma); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3038 | $("#taste_taste").val(dataRecord.taste_taste); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3039 | $("#taste_mouthfeel").val(dataRecord.taste_mouthfeel); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3040 | $("#taste_aftertaste").val(dataRecord.taste_aftertaste); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
3041 | |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
3042 | // Recipe |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3043 | $("#st_name").val(dataRecord.st_name); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3044 | $("#st_letter").val(dataRecord.st_letter); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3045 | $("#st_guide").val(dataRecord.st_guide); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3046 | $("#st_category").val(dataRecord.st_category); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3047 | $("#st_category_number").val(dataRecord.st_category_number); |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
3048 | $("#st_type").val(StyleTypeData[dataRecord.st_type].nl); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3049 | $("#st_og_min").val(dataRecord.st_og_min); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3050 | $("#st_og_max").val(dataRecord.st_og_max); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3051 | $("#st_fg_min").val(dataRecord.st_fg_min); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3052 | $("#st_fg_max").val(dataRecord.st_fg_max); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3053 | $("#st_abv_min").val(dataRecord.st_abv_min); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3054 | $("#st_abv_max").val(dataRecord.st_abv_max); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3055 | $("#st_color_min").val(dataRecord.st_color_min); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3056 | $("#st_color_max").val(dataRecord.st_color_max); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3057 | $("#st_ibu_min").val(dataRecord.st_ibu_min); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3058 | $("#st_ibu_max").val(dataRecord.st_ibu_max); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3059 | $("#st_carb_min").val(dataRecord.st_carb_min); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3060 | $("#st_carb_min2").val(dataRecord.st_carb_min); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3061 | $("#st_carb_max").val(dataRecord.st_carb_max); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
3062 | $("#st_carb_max2").val(dataRecord.st_carb_max); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3063 | $("#type").val(dataRecord.type); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3064 | $("#batch_size").val(dataRecord.batch_size); |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
3065 | $("#est_a_vol").val(dataRecord.batch_size * 1.04); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3066 | $("#boil_size").val(dataRecord.boil_size); |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
3067 | $("#est_pre_vol").val(dataRecord.boil_size * 1.04); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3068 | $("#boil_time").val(dataRecord.boil_time); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3069 | $("#efficiency").val(dataRecord.efficiency); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3070 | $("#est_og").val(dataRecord.est_og); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3071 | $("#est_og2").val(dataRecord.est_og); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
3072 | $("#est_og3").val(0); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3073 | $("#est_fg").val(dataRecord.est_fg); |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
3074 | $("#est_fg2").val(dataRecord.est_fg); |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
3075 | $("#est_fg3").val(dataRecord.est_fg); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3076 | $("#est_color").val(dataRecord.est_color); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3077 | $("#est_color2").val(dataRecord.est_color); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3078 | $("#est_abv").val(dataRecord.est_abv); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3079 | $("#color_method").val(dataRecord.color_method); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3080 | $("#est_ibu").val(dataRecord.est_ibu); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3081 | $("#est_ibu2").val(dataRecord.est_ibu); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3082 | $("#ibu_method").val(dataRecord.ibu_method); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3083 | $("#est_carb").val(dataRecord.est_carb); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3084 | $("#mash_name").val(dataRecord.mash_name); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3085 | $("#mash_ph").val(dataRecord.mash_ph); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3086 | $("#sparge_temp").val(dataRecord.sparge_temp); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3087 | $("#sparge_ph").val(dataRecord.sparge_ph); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3088 | $("#sparge_volume").val(dataRecord.sparge_volume); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
3089 | $("#sparge_source").val(dataRecord.sparge_source); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3090 | $("#sparge_acid_type").val(dataRecord.sparge_acid_type); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3091 | $("#sparge_acid_perc").val(dataRecord.sparge_acid_perc); |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
3092 | $("#sparge_acid_amount").val(dataRecord.sparge_acid_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3093 | $("#calc_acid").val(dataRecord.calc_acid); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3094 | $("#w1_name").val(dataRecord.w1_name); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3095 | $("#w1_amount").val(dataRecord.w1_amount); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3096 | $("#w1_calcium").val(dataRecord.w1_calcium); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3097 | $("#w1_sulfate").val(dataRecord.w1_sulfate); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3098 | $("#w1_chloride").val(dataRecord.w1_chloride); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3099 | $("#w1_sodium").val(dataRecord.w1_sodium); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3100 | $("#w1_magnesium").val(dataRecord.w1_magnesium); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3101 | $("#w1_total_alkalinity").val(dataRecord.w1_total_alkalinity); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3102 | $("#w1_ph").val(dataRecord.w1_ph); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3103 | $("#w1_cost").val(dataRecord.w1_cost); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3104 | $("#w2_name").val(dataRecord.w2_name); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3105 | $("#w2_amount").val(dataRecord.w2_amount); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3106 | $("#w2_calcium").val(dataRecord.w2_calcium); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3107 | $("#w2_sulfate").val(dataRecord.w2_sulfate); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3108 | $("#w2_chloride").val(dataRecord.w2_chloride); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3109 | $("#w2_sodium").val(dataRecord.w2_sodium); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3110 | $("#w2_magnesium").val(dataRecord.w2_magnesium); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3111 | $("#w2_total_alkalinity").val(dataRecord.w2_total_alkalinity); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3112 | $("#w2_ph").val(dataRecord.w2_ph); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3113 | $("#w2_cost").val(dataRecord.w2_cost); |
392
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3114 | $("#wg_amount").val(dataRecord.wg_amount); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3115 | $("#wg_calcium").val(dataRecord.wg_calcium); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3116 | $("#wg_sulfate").val(dataRecord.wg_sulfate); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3117 | $("#wg_chloride").val(dataRecord.wg_chloride); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3118 | $("#wg_sodium").val(dataRecord.wg_sodium); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3119 | $("#wg_magnesium").val(dataRecord.wg_magnesium); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3120 | $("#wg_total_alkalinity").val(dataRecord.wg_total_alkalinity); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3121 | $("#wg_ph").val(dataRecord.wg_ph); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3122 | $("#wb_calcium").val(dataRecord.wb_calcium); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3123 | $("#wb_sulfate").val(dataRecord.wb_sulfate); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3124 | $("#wb_chloride").val(dataRecord.wb_chloride); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3125 | $("#wb_sodium").val(dataRecord.wb_sodium); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3126 | $("#wb_magnesium").val(dataRecord.wb_magnesium); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3127 | $("#wb_total_alkalinity").val(dataRecord.wb_total_alkalinity); |
544d7d0183b2
Added 15 fields to the recipes table. Added 18 fields to the products table. These are calculated values that are now stored in the database so export programs can use these values without calculating them again. Product and recipe print have water and mash schedule added. Product print has brewday results added if the brewday is over. The ingredients layout changed in the product and recipe prints.
Michiel Broek <mbroek@mbse.eu>
parents:
389
diff
changeset
|
3128 | $("#wb_ph").val(dataRecord.wb_ph); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3129 | $("#wa_acid_name").val(dataRecord.wa_acid_name); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3130 | $("#wa_acid_perc").val(dataRecord.wa_acid_perc); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3131 | $("#wa_base_name").val(dataRecord.wa_base_name); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3132 | $("#starter_enable").val(dataRecord.starter_enable); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3133 | $("#starter_type").val(dataRecord.starter_type); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3134 | $("#starter_sg").val(dataRecord.starter_sg); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3135 | $("#prop1_type").val(dataRecord.prop1_type); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3136 | $("#prop1_volume").val(dataRecord.prop1_volume); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3137 | $("#prop2_type").val(dataRecord.prop2_type); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3138 | $("#prop2_volume").val(dataRecord.prop2_volume); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3139 | $("#prop3_type").val(dataRecord.prop3_type); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3140 | $("#prop3_volume").val(dataRecord.prop3_volume); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3141 | $("#prop4_type").val(dataRecord.prop4_type); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3142 | $("#prop4_volume").val(dataRecord.prop4_volume); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3143 | editFermentable(dataRecord); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3144 | editHop(dataRecord); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3145 | editMisc(dataRecord); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3146 | editYeast(dataRecord); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3147 | editMash(dataRecord); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
3148 | calcStage(); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3149 | $('#jqxTabs').jqxTabs('select', 2); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3150 | }, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3151 | loadError: function (jqXHR, status, error) { |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3152 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3153 | beforeLoadComplete: function (records) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3154 | $('#jqxLoader').jqxLoader('open'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3155 | } |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3156 | }); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3157 | dataAdapter.dataBind(); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3158 | |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3159 | // Inline fermentables editor |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3160 | var editFermentable = function (data) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3161 | var fermentableSource = { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3162 | localdata: data.fermentables, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3163 | datatype: "local", |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3164 | cache: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3165 | async: false, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3166 | datafields: [ |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3167 | { name: 'f_name', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3168 | { name: 'f_origin', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3169 | { name: 'f_supplier', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3170 | { name: 'f_amount', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3171 | { name: 'f_cost', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3172 | { name: 'f_type', type: 'int' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3173 | { name: 'f_yield', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3174 | { name: 'f_color', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3175 | { name: 'f_coarse_fine_diff', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3176 | { name: 'f_moisture', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3177 | { name: 'f_diastatic_power', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3178 | { name: 'f_protein', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3179 | { name: 'f_max_in_batch', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3180 | { name: 'f_graintype', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3181 | { name: 'f_added', type: 'int' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3182 | { name: 'f_dissolved_protein', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3183 | { name: 'f_recommend_mash', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3184 | { name: 'f_add_after_boil', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3185 | { name: 'f_adjust_to_total_100', type: 'int' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3186 | { name: 'f_percentage', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3187 | { name: 'f_di_ph', type: 'float' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3188 | { name: 'f_acid_to_ph_57', type: 'float' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3189 | { name: 'f_inventory', type: 'float' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3190 | { name: 'f_avail', type: 'int' } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3191 | ], |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3192 | addrow: function (rowid, rowdata, position, commit) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3193 | console.log("fermentable addrow "+rowid); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3194 | commit(true); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3195 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3196 | deleterow: function (rowid, commit) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3197 | console.log("fermentable deleterow "+rowid); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3198 | commit(true); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3199 | }, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3200 | updaterow: function (rowid, rowdata, commit) { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3201 | console.log("fermentable updaterow "+rowid); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3202 | commit(true); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3203 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3204 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3205 | var fermentableAdapter = new $.jqx.dataAdapter(fermentableSource); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3206 | $("#fermentableGrid").jqxGrid({ |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3207 | width: 1240, |
376
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
375
diff
changeset
|
3208 | height: 470, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3209 | source: fermentableAdapter, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3210 | theme: theme, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3211 | selectionmode: 'singlerow', |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3212 | showtoolbar: true, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3213 | rendertoolbar: function (toolbar) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3214 | var me = this; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3215 | var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3216 | toolbar.append(container); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3217 | container.append('<div style="float: left; margin-left: 165px;" id="faddrowbutton"></div>'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3218 | container.append('<div style="float: left; margin-left: 10px; margin-top: 5px;">In voorraad:</div>'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3219 | container.append('<div style="float: left; margin-left: 10px;" id="finstockbutton"></div>'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3220 | container.append('<input style="float: left; margin-left: 400px;" id="fdeleterowbutton" type="button" value="Verwijder mout" />'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3221 | // add fermentable from dropdownlist. |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3222 | $("#faddrowbutton").jqxDropDownList({ |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3223 | placeHolder: "Kies mout:", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3224 | theme: theme, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3225 | template: "primary", |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3226 | source: fermentablelist, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3227 | displayMember: "name", |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3228 | disabled: (dataRecord.stage > 3), |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3229 | width: 150, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3230 | height: 27, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3231 | dropDownWidth: 500, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3232 | dropDownHeight: 500, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3233 | renderer: function (index, label, value) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3234 | var datarecord = fermentablelist.records[index]; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3235 | return datarecord.supplier+ " / " + datarecord.name + " (" + datarecord.color + " EBC)"; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3236 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3237 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3238 | $("#faddrowbutton").on('select', function (event) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3239 | if (event.args) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3240 | var rowscount = $("#fermentableGrid").jqxGrid('getdatainformation').rowscount; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3241 | var index = event.args.index; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3242 | var datarecord = fermentablelist.records[index]; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3243 | var row = {}; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3244 | row["f_name"] = datarecord.name; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3245 | row["f_origin"] = datarecord.origin; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3246 | row["f_supplier"] = datarecord.supplier; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3247 | row["f_amount"] = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3248 | row["f_cost"] = datarecord.cost; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3249 | row["f_type"] = datarecord.type; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3250 | row["f_yield"] = datarecord.yield; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3251 | row["f_color"] = datarecord.color; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3252 | row["f_coarse_fine_diff"] = datarecord.coarse_fine_diff; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3253 | row["f_moisture"] = datarecord.moisture; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3254 | row["f_diastatic_power"] = datarecord.diastatic_power; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3255 | row["f_protein"] = datarecord.protein; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3256 | row["f_max_in_batch"] = datarecord.max_in_batch; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3257 | row["f_graintype"] = datarecord.graintype; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3258 | if (datarecord.add_after_boil) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3259 | row["f_added"] = 2; // Fermentation |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3260 | } else if ((datarecord.type == 1) || (datarecord.type == 4)) { // Sugar or Adjunct |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3261 | row["f_added"] = 1; // Boil |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3262 | } else { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3263 | row["f_added"] = 0; // Mash |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3264 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3265 | row["f_dissolved_protein"] = datarecord.dissolved_protein; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3266 | row["f_recommend_mash"] = datarecord.recommend_mash; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3267 | row["f_add_after_boil"] = datarecord.add_after_boil; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3268 | if (rowscount == 0) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3269 | // The first fermentable |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3270 | row["f_adjust_to_total_100"] = 1; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3271 | row["f_percentage"] = 100; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3272 | } else { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3273 | row["f_adjust_to_total_100"] = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3274 | row["f_percentage"] = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3275 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3276 | row["f_di_ph"] = datarecord.di_ph; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3277 | row["f_acid_to_ph_57"] = datarecord.acid_to_ph_57; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3278 | row["f_inventory"] = datarecord.inventory; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3279 | var commit = $("#fermentableGrid").jqxGrid('addrow', null, row); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3280 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3281 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3282 | |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3283 | $("#finstockbutton").jqxCheckBox({ theme: theme, height: 27, disabled: (dataRecord.stage > 3) }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3284 | $("#finstockbutton").on('change', function (event) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3285 | fermentableinstock = event.args.checked; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3286 | fermentablelist.dataBind(); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3287 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3288 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3289 | // delete selected fermentable. |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3290 | $("#fdeleterowbutton").jqxButton({ template: "danger", theme: theme, height: 27, width: 150, disabled: (dataRecord.stage > 3) }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3291 | $("#fdeleterowbutton").on('click', function () { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3292 | var selectedrowindex = $("#fermentableGrid").jqxGrid('getselectedrowindex'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3293 | var rowscount = $("#fermentableGrid").jqxGrid('getdatainformation').rowscount; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3294 | if (selectedrowindex >= 0 && selectedrowindex < rowscount) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3295 | var id = $("#fermentableGrid").jqxGrid('getrowid', selectedrowindex); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3296 | var percent = $('#fermentableGrid').jqxGrid('getcellvalue', id, "f_percentage"); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3297 | var amount = $('#fermentableGrid').jqxGrid('getcellvalue', id, "f_amount"); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3298 | var commit = $("#fermentableGrid").jqxGrid('deleterow', id); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3299 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3300 | rowscount = $("#fermentableGrid").jqxGrid('getdatainformation').rowscount; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3301 | if (rowscount > 1) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3302 | if (to_100) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3303 | for (var i = 0; i < rowscount; i++) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3304 | var rowdata = $("#fermentableGrid").jqxGrid('getrowdata', i); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3305 | if (rowdata.f_adjust_to_total_100) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3306 | rowdata.f_percentage += percent; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3307 | rowdata.f_amount += amount; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3308 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3309 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3310 | } else { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3311 | var tw = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3312 | for (i = 0; i < rowscount; i++) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3313 | var rowdata = $("#fermentableGrid").jqxGrid('getrowdata', i); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3314 | tw += rowdata.f_amount; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3315 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3316 | for (i = 0; i < rowscount; i++) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3317 | var rowdata = $("#fermentableGrid").jqxGrid('getrowdata', i); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3318 | var percentage = Math.round(rowdata.f_amount / tw * 1000) / 10.0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3319 | $("#fermentableGrid").jqxGrid('setcellvalue', i, "f_percentage", percentage); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3320 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3321 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3322 | } else { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3323 | $("#fermentableGrid").jqxGrid('setcellvalue', 0, "f_percentage", 100); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3324 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3325 | calcFermentables(); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3326 | calcIBUs(); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3327 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3328 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3329 | ready: function() { |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
3330 | calcFermentables(); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3331 | $('#jqxTabs').jqxTabs('next'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3332 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3333 | columns: [ |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3334 | { text: 'Vergistbaar ingrediënt', datafield: 'f_name', |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3335 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3336 | return "<span style='margin: 3px; margin-top: 6px; float: left;'>" + |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3337 | rowdata.f_supplier+" / "+rowdata.f_name+" ("+rowdata.f_color+" EBC)</span>"; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3338 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3339 | }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3340 | { text: 'Type', width: 100, datafield: 'f_type', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3341 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3342 | return "<span style='margin: 3px; margin-top: 6px; float: left;'>" + FermentableTypeData[value].nl + "</span>"; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3343 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3344 | }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3345 | { text: 'Moment', width: 110, datafield: 'f_added', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3346 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3347 | return "<span style='margin: 3px; margin-top: 6px; float: left;'>" + AddedData[value].nl + "</span>"; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3348 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3349 | }, |
331
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3350 | { text:'Maxinbatch', datafield: 'f_max_in_batch', hidden: true }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3351 | { text: 'Opbrengst', datafield: 'f_yield', width: 90, align: 'right', cellsalign: 'right', cellsformat: 'p1' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3352 | { text: 'Gewicht Kg', datafield: 'f_amount', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'f3' }, |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3353 | { text: 'Voorraad Kg', datafield: 'f_inventory', width: 120, align: 'right', |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3354 | cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties, rowdata) { |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3355 | var color = '#ffffff'; |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3356 | if (((dataRecord.inventory_reduced <= 2) && (rowdata.f_added <= 1)) || // Mash or boil |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3357 | ((dataRecord.inventory_reduced <= 3) && (rowdata.f_added == 2)) || // Primary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3358 | ((dataRecord.inventory_reduced <= 5) && (rowdata.f_added == 3)) || // Secondary or Tertiary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3359 | ((dataRecord.inventory_reduced <= 6) && (rowdata.f_added == 4))) { // Bottle |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3360 | if (value < rowdata.f_amount) |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3361 | color = '#ff4040'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3362 | return '<span style="margin: 4px; margin-top: 6px; float: right; color: ' + |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3363 | color + ';">' +fermentableAdapter.formatNumber(value, "f3") + '</span>'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3364 | } else { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3365 | return '<span></span>'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3366 | } |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3367 | } |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3368 | }, |
331
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3369 | { text: 'Procent', datafield: 'f_percentage', width: 90, align: 'right', |
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3370 | cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties, rowdata) { |
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3371 | var color = '#ffffff'; |
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3372 | if (value > rowdata.f_max_in_batch) |
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3373 | color = '#ff4040'; |
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3374 | return '<span style="margin: 4px; margin-top: 6px; float: right; color: ' + |
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3375 | color + ';">' +fermentableAdapter.formatNumber(value, "p1") + '</span>'; |
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3376 | } |
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3377 | }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3378 | { text: '100%', align: 'center', datafield: 'f_adjust_to_total_100', columntype: 'checkbox', width: 70 }, |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3379 | { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', cellsrenderer: function () { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3380 | return "Wijzig"; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3381 | }, buttonclick: function (row) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3382 | if (dataRecord.stage > 3) { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3383 | alert("Ingredieënt is al verwerkt."); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3384 | } else { |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3385 | fermentableRow = row; |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3386 | fermentableData = $("#fermentableGrid").jqxGrid('getrowdata', fermentableRow); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3387 | $("#wf_name").val(fermentableData.f_name); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3388 | $("#wf_amount").val(fermentableData.f_amount); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3389 | $("#wf_percentage").val(fermentableData.f_percentage); |
331
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
3390 | $("#wf_max_in_batch").val(fermentableData.f_max_in_batch); |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3391 | $("#wf_adjust_to_total_100").val(fermentableData.f_adjust_to_total_100); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3392 | $("#wf_added").val(fermentableData.f_added); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3393 | // show the popup window. |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3394 | $("#popupFermentable").jqxWindow('open'); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3395 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3396 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3397 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3398 | ] |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3399 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3400 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3401 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3402 | // Inline hops editor |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3403 | var editHop = function (data) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3404 | var hopSource = { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3405 | localdata: data.hops, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3406 | datatype: "local", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3407 | cache: false, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3408 | async: false, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3409 | datafields: [ |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3410 | { name: 'h_name', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3411 | { name: 'h_origin', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3412 | { name: 'h_amount', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3413 | { name: 'h_cost', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3414 | { name: 'h_type', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3415 | { name: 'h_form', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3416 | { name: 'h_useat', type: 'int' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3417 | { name: 'h_time', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3418 | { name: 'h_alpha', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3419 | { name: 'h_beta', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3420 | { name: 'h_hsi', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3421 | { name: 'h_humulene', type: 'float' }, |
223
0de4455bd2a1
Fixed spelling area in all programs for caryophyllene. This is still wrong in brouwhulp, we correct it during database import. Also mycrene was spelled myrcene, my fault. The hops grid now uses a popup editor, this is not yet complete. Friendly weight display in the hop grid and added the inventory comlumn.
Michiel Broek <mbroek@mbse.eu>
parents:
177
diff
changeset
|
3422 | { name: 'h_caryophyllene', type: 'float' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3423 | { name: 'h_cohumulone', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3424 | { name: 'h_myrcene', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3425 | { name: 'h_total_oil', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3426 | { name: 'h_inventory', type: 'float' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3427 | { name: 'h_avail', type: 'int' } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3428 | ], |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3429 | addrow: function (rowid, rowdata, position, commit) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3430 | console.log("hop addrow "+rowid); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3431 | commit(true); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3432 | }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3433 | deleterow: function (rowid, commit) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3434 | console.log("hop deleterow "+rowid); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3435 | commit(true); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3436 | }, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3437 | updaterow: function (rowid, rowdata, commit) { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3438 | console.log("hop updaterow "+rowid); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3439 | commit(true); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3440 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3441 | }; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3442 | var hopAdapter = new $.jqx.dataAdapter(hopSource); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3443 | $("#hopGrid").jqxGrid({ |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3444 | width: 1240, |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3445 | height: 560, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3446 | source: hopAdapter, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3447 | theme: theme, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3448 | selectionmode: 'singlerow', |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3449 | showtoolbar: true, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3450 | rendertoolbar: function (toolbar) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3451 | var me = this; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3452 | var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3453 | toolbar.append(container); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3454 | container.append('<div style="float: left; margin-left: 165px;" id="haddrowbutton"></div>'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3455 | container.append('<div style="float: left; margin-left: 10px; margin-top: 5px;">In voorraad:</div>'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3456 | container.append('<div style="float: left; margin-left: 10px;" id="hinstockbutton"></div>'); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3457 | container.append('<input style="float: left; margin-left: 400px;" id="hdeleterowbutton" type="button" value="Verwijder hop" />'); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3458 | // add hop from dropdownlist. |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3459 | $("#haddrowbutton").jqxDropDownList({ |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3460 | placeHolder: "Kies hop:", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3461 | theme: theme, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3462 | template: "primary", |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3463 | source: hoplist, |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3464 | disabled: (dataRecord.stage > 3), |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3465 | displayMember: "name", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3466 | width: 150, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3467 | height: 27, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3468 | dropDownWidth: 500, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3469 | dropDownHeight: 500, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3470 | renderer: function (index, label, value) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3471 | var datarecord = hoplist.records[index]; |
288
06dd071a429d
Hop dropdown lists also show the hop form
Michiel Broek <mbroek@mbse.eu>
parents:
286
diff
changeset
|
3472 | return datarecord.origin+ " - " + datarecord.name + " / " + HopFormData[datarecord.form].nl + |
06dd071a429d
Hop dropdown lists also show the hop form
Michiel Broek <mbroek@mbse.eu>
parents:
286
diff
changeset
|
3473 | " (" + datarecord.alpha + "% α)"; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3474 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3475 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3476 | $("#haddrowbutton").on('select', function (event) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3477 | if (event.args) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3478 | var index = event.args.index; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3479 | var datarecord = hoplist.records[index]; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3480 | var row = {}; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3481 | row["h_name"] = datarecord.name; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3482 | row["h_origin"] = datarecord.origin; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3483 | row["h_amount"] = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3484 | row["h_cost"] = datarecord.cost; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3485 | row["h_type"] = datarecord.type; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3486 | row["h_form"] = datarecord.form; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3487 | row["h_useat"] = 2; // Boil |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3488 | row["h_time"] = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3489 | row["h_alpha"] = datarecord.alpha; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3490 | row["h_beta"] = datarecord.beta; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3491 | row["h_hsi"] = datarecord.hsi; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3492 | row["h_humulene"] = datarecord.humulene; |
223
0de4455bd2a1
Fixed spelling area in all programs for caryophyllene. This is still wrong in brouwhulp, we correct it during database import. Also mycrene was spelled myrcene, my fault. The hops grid now uses a popup editor, this is not yet complete. Friendly weight display in the hop grid and added the inventory comlumn.
Michiel Broek <mbroek@mbse.eu>
parents:
177
diff
changeset
|
3493 | row["h_caryophyllene"] = datarecord.caryophyllene; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3494 | row["h_cohumulone"] = datarecord.cohumulone; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3495 | row["h_myrcene"] = datarecord.myrcene; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3496 | row["h_total_oil"] = datarecord.total_oil; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3497 | row["h_inventory"] = datarecord.inventory; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3498 | var commit = $("#hopGrid").jqxGrid('addrow', null, row); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3499 | } |
267
dafc9ff806a4
Allow the same hops and yeasts to be added multiple times.
Michiel Broek <mbroek@mbse.eu>
parents:
265
diff
changeset
|
3500 | $("#haddrowbutton").jqxDropDownList('clearSelection'); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3501 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3502 | |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3503 | $("#hinstockbutton").jqxCheckBox({ theme: theme, height: 27, disabled: (dataRecord.stage > 3) }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3504 | $("#hinstockbutton").on('change', function (event) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3505 | hopinstock = event.args.checked; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3506 | hoplist.dataBind(); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3507 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3508 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3509 | // delete selected hop. |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3510 | $("#hdeleterowbutton").jqxButton({ template: "danger", theme: theme, height: 27, width: 150, disabled: (dataRecord.stage > 3) }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3511 | $("#hdeleterowbutton").on('click', function () { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3512 | var selectedrowindex = $("#hopGrid").jqxGrid('getselectedrowindex'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3513 | var rowscount = $("#hopGrid").jqxGrid('getdatainformation').rowscount; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3514 | if (selectedrowindex >= 0 && selectedrowindex < rowscount) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3515 | var id = $("#hopGrid").jqxGrid('getrowid', selectedrowindex); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3516 | var commit = $("#hopGrid").jqxGrid('deleterow', id); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3517 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3518 | calcIBUs(); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3519 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3520 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3521 | ready: function() { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3522 | calcIBUs(); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3523 | $('#jqxTabs').jqxTabs('next'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3524 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3525 | columns: [ |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3526 | { text: 'Hop', datafield: 'h_name', |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3527 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3528 | return "<span style='margin: 3px; margin-top: 6px; float: left;'>" +rowdata.h_origin+" / "+rowdata.h_name+"</span>"; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3529 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3530 | }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3531 | { text: 'Type', width: 90, datafield: 'h_type', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3532 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3533 | return '<span style="margin: 4px; margin-top: 6px; float: left;">' + HopTypeData[value].nl + '</span>'; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3534 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3535 | }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3536 | { text: 'Vorm', width: 90, datafield: 'h_form', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3537 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3538 | return '<span style="margin: 4px; margin-top: 6px; float: left;">' + HopFormData[value].nl + '</span>'; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3539 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3540 | }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3541 | { text: 'Alpha', datafield: 'h_alpha', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'p1' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3542 | { text: 'Gebruik', width: 110, datafield: 'h_useat', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3543 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3544 | return '<span style="margin: 4px; margin-top: 6px; float: left;">' + HopUseData[value].nl + '</span>'; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3545 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3546 | }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3547 | { text: 'Tijdsduur', datafield: 'h_time', width: 90, align: 'right', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3548 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3549 | var duration = ''; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3550 | if ((rowdata.h_useat == 2) || (rowdata.h_useat == 4)) // Boil, Whirlpool |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3551 | duration = dataAdapter.formatNumber(value, "f0")+" min."; |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3552 | else if (rowdata.h_useat == 5) // Dry hop |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3553 | duration = dataAdapter.formatNumber(value/1440, "f0")+" dagen"; |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3554 | return '<span style="margin: 4px; margin-top: 6px; float: right;">' + duration + '</span>'; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3555 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3556 | }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3557 | { text: 'IBU', datafield: 'ibu', width: 80, align: 'right', |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3558 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3559 | var ibu = toIBU(rowdata.h_useat, rowdata.h_form, preboil_sg, parseFloat($("#batch_size").jqxNumberInput('decimal')), |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3560 | parseFloat(rowdata.h_amount), parseFloat(rowdata.h_time), |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3561 | parseFloat(rowdata.h_alpha), $("#ibu_method").val()); |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3562 | return '<span style="margin: 4px; margin-top: 6px; float: right;">' + dataAdapter.formatNumber(ibu, "f1") + '</span>'; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3563 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3564 | }, |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3565 | { text: 'Gewicht', datafield: 'h_amount', width: 110, align: 'right', |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3566 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3567 | var amount = dataAdapter.formatNumber(value, "f1") + ' kg'; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3568 | if (value < 1) |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3569 | amount = dataAdapter.formatNumber(value * 1000, "f1") + ' gr'; |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3570 | return '<span style="margin: 4px; margin-top: 6px; float: right;">' + amount + '</span>'; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3571 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3572 | }, |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3573 | { text: 'Voorraad', datafield: 'h_inventory', width: 110, align: 'right', |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3574 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3575 | if (((dataRecord.inventory_reduced <= 2) && (rowdata.h_useat <= 4)) || // Mash, FW, Boil, Aroma, Whirlpool |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3576 | ((dataRecord.inventory_reduced <= 6) && (rowdata.h_useat == 5))) { // Dry hop |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3577 | var color = '#ffffff'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3578 | if (value < rowdata.h_amount) |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3579 | color = '#ff4040'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3580 | var amount = dataAdapter.formatNumber(value, "f1") + ' kg'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3581 | if (value < 1) |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3582 | amount = dataAdapter.formatNumber(value * 1000, "f1") + ' gr'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3583 | return '<span style="margin: 4px; margin-top: 6px; float: right; color: '+color+';">'+amount+'</span>'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3584 | } else { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3585 | return '<span></span>'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3586 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3587 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3588 | }, |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3589 | { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', cellsrenderer: function () { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3590 | return "Wijzig"; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3591 | }, buttonclick: function (row) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3592 | if (dataRecord.stage > 3) { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3593 | alert("Ingredieënt is al verwerkt."); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3594 | } else { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3595 | console.log("edit button row "+row); |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3596 | hopRow = row; |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3597 | hopData = $("#hopGrid").jqxGrid('getrowdata', hopRow); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3598 | $("#wh_name").val(hopData.h_name); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3599 | $("#wh_amount").val(hopData.h_amount * 1000); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3600 | var ibu = toIBU(hopData.h_useat, hopData.h_form, preboil_sg, |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3601 | parseFloat($("#batch_size").jqxNumberInput('decimal')), |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3602 | parseFloat(hopData.h_amount), parseFloat(hopData.h_time), |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3603 | parseFloat(hopData.h_alpha), $("#ibu_method").val() |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3604 | ); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3605 | $("#wh_ibu").val(ibu); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3606 | if (hopData.h_useat == 5) // Dry hop |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3607 | $("#wh_time").val(hopData.h_time / 1440); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3608 | else |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3609 | $("#wh_time").val(hopData.h_time); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3610 | $("#wh_useat").val(hopData.h_useat); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3611 | // show the popup window. |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3612 | $("#popupHop").jqxWindow('open'); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3613 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3614 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3615 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3616 | ] |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3617 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3618 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3619 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3620 | // Inline miscs editor |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3621 | var editMisc = function (data) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3622 | var miscSource = { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3623 | localdata: data.miscs, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3624 | datatype: "local", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3625 | cache: false, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3626 | async: false, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3627 | datafields: [ |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3628 | { name: 'm_name', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3629 | { name: 'm_amount', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3630 | { name: 'm_cost', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3631 | { name: 'm_type', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3632 | { name: 'm_use_use', type: 'int' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3633 | { name: 'm_time', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3634 | { name: 'm_amount_is_weight', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3635 | { name: 'm_inventory', type: 'float' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3636 | { name: 'm_avail', type: 'int' } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3637 | ], |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3638 | addrow: function (rowid, rowdata, position, commit) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3639 | console.log("misc addrow "+rowid); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3640 | commit(true); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3641 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3642 | deleterow: function (rowid, commit) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3643 | console.log("misc deleterow "+rowid); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3644 | commit(true); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3645 | }, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3646 | updaterow: function (rowid, rowdata, commit) { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3647 | console.log("misc updaterow "+rowid); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3648 | commit(true); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3649 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3650 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3651 | var miscAdapter = new $.jqx.dataAdapter(miscSource, { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3652 | beforeLoadComplete: function (records) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3653 | var data = new Array(); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3654 | for (var i = 0; i < records.length; i++) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3655 | var row = records[i]; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3656 | data.push(row); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3657 | // Initial set water agent values. |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3658 | switch (row.m_name) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3659 | case 'CaCl2': $("#wa_cacl2").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3660 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3661 | case 'CaSO4': $("#wa_caso4").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3662 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3663 | case 'MgSO4': $("#wa_mgso4").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3664 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3665 | case 'NaCl': $("#wa_nacl").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3666 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3667 | case 'Melkzuur': $("#wa_acid_name").val(0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3668 | $("#wa_acid").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3669 | $("#wa_acid_perc").val(80); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3670 | last_acid = 'Melkzuur'; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3671 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3672 | case 'Zoutzuur': $("#wa_acid_name").val(1); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3673 | $("#wa_acid").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3674 | $("#wa_acid_perc").val(80); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3675 | last_acid = 'Zoutzuur'; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3676 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3677 | case 'Fosforzuur': $("#wa_acid_name").val(2); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3678 | $("#wa_acid").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3679 | $("#wa_acid_perc").val(80); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3680 | last_acid = 'Fosforzuur'; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3681 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3682 | case 'Zwavelzuur': $("#wa_acid_name").val(3); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3683 | $("#wa_acid").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3684 | $("#wa_acid_perc").val(80); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3685 | last_acid = 'Zwavelzuur'; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3686 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3687 | case 'NaHCO3': $("#wa_base_name").val(0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3688 | $("#wa_base").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3689 | last_base = 'NaHCO3'; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3690 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3691 | case 'Na2CO3': $("#wa_base_name").val(1); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3692 | $("#wa_base").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3693 | last_base = 'Na2CO3'; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3694 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3695 | case 'CaCO3': $("#wa_base_name").val(2); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3696 | $("#wa_base").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3697 | last_base = 'CaCO3'; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3698 | break; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3699 | case 'Ca(OH)2': $("#wa_base_name").val(3); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3700 | $("#wa_base").val(row.m_amount * 1000); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3701 | last_base = 'Ca(OH)2'; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3702 | break; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3703 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3704 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3705 | return data; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3706 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3707 | loadError: function(jqXHR, status, error) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3708 | $('#err').text(status + ' ' + error); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3709 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3710 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3711 | $("#miscGrid").jqxGrid({ |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3712 | width: 1240, |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3713 | height: 575, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3714 | source: miscAdapter, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3715 | theme: theme, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3716 | selectionmode: 'singlerow', |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3717 | showtoolbar: true, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3718 | rendertoolbar: function (toolbar) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3719 | var me = this; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3720 | var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3721 | toolbar.append(container); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3722 | container.append('<div style="float: left; margin-left: 165px;" id="maddrowbutton"></div>'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3723 | container.append('<div style="float: left; margin-left: 10px; margin-top: 5px;">In voorraad:</div>'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3724 | container.append('<div style="float: left; margin-left: 10px;" id="minstockbutton"></div>'); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3725 | container.append('<input style="float: left; margin-left: 400px;" id="mdeleterowbutton" type="button" value="Verwijder ingredient" />'); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3726 | // add misc from dropdownlist. |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3727 | $("#maddrowbutton").jqxDropDownList({ |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3728 | placeHolder: "Kies ingrediënt:", |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3729 | theme: theme, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3730 | template: "primary", |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3731 | source: misclist, |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3732 | disabled: (dataRecord.stage > 3), |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3733 | displayMember: "name", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3734 | width: 150, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3735 | height: 27, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3736 | dropDownWidth: 500, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3737 | dropDownHeight: 500 |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3738 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3739 | $("#maddrowbutton").on('select', function (event) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3740 | if (event.args) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3741 | var index = event.args.index; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3742 | var datarecord = misclist.records[index]; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3743 | var row = {}; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3744 | row["m_name"] = datarecord.name; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3745 | row["m_amount"] = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3746 | row["m_cost"] = datarecord.cost; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3747 | row["m_type"] = datarecord.type; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3748 | row["m_use_use"] = datarecord.use_use; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3749 | row["m_time"] = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3750 | row["m_amount_is_weight"] = datarecord.amount_is_weight; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3751 | row["m_inventory"] = datarecord.inventory; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3752 | var commit = $("#miscGrid").jqxGrid('addrow', null, row); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3753 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3754 | }); |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3755 | $("#minstockbutton").jqxCheckBox({ theme: theme, height: 27, disabled: (dataRecord.stage > 3) }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3756 | $("#minstockbutton").on('change', function (event) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3757 | miscinstock = event.args.checked; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3758 | misclist.dataBind(); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3759 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3760 | // delete selected misc. |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3761 | $("#mdeleterowbutton").jqxButton({ template: "danger", theme: theme, height: 27, width: 150, disabled: (dataRecord.stage > 3) }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3762 | $("#mdeleterowbutton").on('click', function () { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3763 | var selectedrowindex = $("#miscGrid").jqxGrid('getselectedrowindex'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3764 | var rowscount = $("#miscGrid").jqxGrid('getdatainformation').rowscount; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3765 | var type = $("#miscGrid").jqxGrid('getcellvalue', selectedrowindex, "m_type"); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3766 | if (selectedrowindex >= 0 && selectedrowindex < rowscount && type != 4) { // Water agent |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3767 | var id = $("#miscGrid").jqxGrid('getrowid', selectedrowindex); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3768 | var commit = $("#miscGrid").jqxGrid('deleterow', id); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3769 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3770 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3771 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3772 | ready: function() { |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3773 | calcMiscs(); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3774 | $('#jqxTabs').jqxTabs('next'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3775 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3776 | columns: [ |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3777 | { text: 'Ingredient', datafield: 'm_name' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3778 | { text: 'Type', width: 140, datafield: 'm_type', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3779 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3780 | return "<span style='margin: 3px; margin-top: 6px; float: left;'>" + MiscTypeData[value].nl + "</span>"; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3781 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3782 | }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3783 | { text: 'Gebruik', width: 140, datafield: 'm_use_use', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3784 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3785 | return "<span style='margin: 3px; margin-top: 6px; float: left;'>" + MiscUseData[value].nl + "</span>"; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3786 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3787 | }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3788 | { text: 'Tijd', datafield: 'm_time', width: 90, align: 'right', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3789 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3790 | var duration = ''; |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3791 | if (rowdata.m_use_use == 2) // Boil |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3792 | duration = dataAdapter.formatNumber(value, "f0")+" min."; |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3793 | else if ((rowdata.m_use_use == 3) || (rowdata.m_use_use == 4)) // Primary or Secondary |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3794 | duration = dataAdapter.formatNumber(value/1440, "f0")+" dagen"; |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3795 | return '<span style="margin: 4px; margin-top: 6px; float: right;">' + duration + '</span>'; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3796 | }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3797 | }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3798 | { text: 'Hoeveel', datafield: 'm_amount', width: 110, align: 'right', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3799 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3800 | var vstr = rowdata.m_amount_is_weight ? "gr":"ml"; |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3801 | return '<span style="margin: 4px; margin-top: 6px; float: right;">' + |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3802 | dataAdapter.formatNumber(value * 1000,"f2")+" "+vstr + '</span>'; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3803 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3804 | }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3805 | { text: 'Voorraad', datafield: 'm_inventory', width: 110, align: 'right', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3806 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3807 | if (((dataRecord.inventory_reduced <= 2) && (rowdata.m_use_use <= 2)) || // Starter, Mash, Boil |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3808 | ((dataRecord.inventory_reduced <= 3) && (rowdata.m_use_use == 3)) || // Primary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3809 | ((dataRecord.inventory_reduced <= 5) && (rowdata.m_use_use == 4)) || // Secondary, Teriary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3810 | ((dataRecord.inventory_reduced <= 6) && (rowdata.m_use_use == 5))) { // Bottle |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3811 | var vstr = rowdata.m_amount_is_weight ? "gr":"ml"; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3812 | var color = '#ffffff'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3813 | if (value < rowdata.m_amount) |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3814 | color = '#ff4040'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3815 | var amount = dataAdapter.formatNumber(value * 1000,"f2")+" "+vstr; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3816 | return '<span style="margin: 4px; margin-top: 6px; float: right; color: '+color+';">'+amount+'</span>'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3817 | } else { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3818 | return '<span></span>'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
3819 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3820 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3821 | }, |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3822 | { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', cellsrenderer: function () { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3823 | return "Wijzig"; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3824 | }, buttonclick: function (row) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3825 | miscRow = row; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3826 | miscData = $("#miscGrid").jqxGrid('getrowdata', miscRow); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3827 | if (dataRecord.stage > 3) { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3828 | alert("Ingredieënt is al verwerkt."); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3829 | } else if (miscData.m_type == 4) { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3830 | alert("Brouwzouten wijzigen in de water tab."); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3831 | } else { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3832 | console.log("edit button row "+row); |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3833 | if (miscData.m_amount_is_weight) |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3834 | $("#wm_pmpt_amount").html("Gewicht gram:"); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3835 | else |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3836 | $("#wm_pmpt_amount").html("Volume ml:"); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3837 | $("#wm_name").val(miscData.m_name); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3838 | $("#wm_amount").val(miscData.m_amount * 1000); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3839 | if ((miscData.m_use_use == 3) || (miscData.m_use_use == 4)) // Primary or Secondary |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3840 | $("#wm_time").val(miscData.m_time / 1440); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3841 | else |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3842 | $("#wm_time").val(miscData.m_time); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3843 | $("#wm_use_use").val(miscData.m_use_use); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3844 | // show the popup window. |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3845 | $("#popupMisc").jqxWindow('open'); |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3846 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3847 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3848 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3849 | ] |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3850 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3851 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3852 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3853 | // Inline yeasts editor |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3854 | var editYeast = function (data) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3855 | var yeastSource = { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3856 | localdata: data.yeasts, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3857 | datatype: "local", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3858 | cache: false, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3859 | async: false, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3860 | datafields: [ |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3861 | { name: 'y_name', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3862 | { name: 'y_laboratory', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3863 | { name: 'y_product_id', type: 'string' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3864 | { name: 'y_amount', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3865 | { name: 'y_cost', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3866 | { name: 'y_type', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3867 | { name: 'y_form', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3868 | { name: 'y_flocculation', type: 'int' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3869 | { name: 'y_min_temperature', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3870 | { name: 'y_max_temperature', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3871 | { name: 'y_attenuation', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3872 | { name: 'y_use', type: 'int' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3873 | { name: 'y_cells', type: 'float' }, |
332
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3874 | { name: 'y_tolerance', type: 'float' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3875 | { name: 'y_inventory', type: 'float' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3876 | { name: 'y_avail', type: 'int' } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3877 | ], |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3878 | addrow: function (rowid, rowdata, position, commit) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3879 | console.log("yeast addrow "+rowid); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3880 | commit(true); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3881 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3882 | deleterow: function (rowid, commit) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3883 | console.log("yeast deleterow "+rowid); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3884 | commit(true); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3885 | }, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3886 | updaterow: function (rowid, rowdata, commit) { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3887 | console.log("yeast updaterow "+rowid); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3888 | commit(true); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
3889 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3890 | }; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3891 | var yeastAdapter = new $.jqx.dataAdapter(yeastSource); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3892 | $("#yeastGrid").jqxGrid({ |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3893 | width: 1240, |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3894 | height: 350, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3895 | source: yeastAdapter, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3896 | theme: theme, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3897 | selectionmode: 'singlerow', |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3898 | showtoolbar: true, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3899 | rendertoolbar: function (toolbar) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3900 | var me = this; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3901 | var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3902 | toolbar.append(container); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3903 | container.append('<div style="float: left; margin-left: 165px;" id="yaddrowbutton"></div>'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3904 | container.append('<div style="float: left; margin-left: 10px; margin-top: 5px;">In voorraad:</div>'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3905 | container.append('<div style="float: left; margin-left: 10px;" id="yinstockbutton"></div>'); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3906 | container.append('<input style="float: left; margin-left: 400px;" id="ydeleterowbutton" type="button" value="Verwijder gist" />'); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3907 | // add yeast from dropdownlist. |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3908 | $("#yaddrowbutton").jqxDropDownList({ |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3909 | placeHolder: "Kies gist:", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3910 | theme: theme, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3911 | source: yeastlist, |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3912 | disabled: (dataRecord.stage > 3), |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3913 | template: "primary", |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3914 | displayMember: "name", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3915 | width: 150, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3916 | height: 27, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3917 | dropDownWidth: 500, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3918 | dropDownHeight: 500, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3919 | renderer: function (index, label, value) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3920 | var datarecord = yeastlist.records[index]; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3921 | return datarecord.laboratory+" "+datarecord.product_id+" "+datarecord.name; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3922 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3923 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3924 | $("#yaddrowbutton").on('select', function (event) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3925 | if (event.args) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3926 | var index = event.args.index; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3927 | var datarecord = yeastlist.records[index]; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3928 | var row = {}; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3929 | row["y_name"] = datarecord.name; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3930 | row["y_laboratory"] = datarecord.laboratory; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3931 | row["y_product_id"] = datarecord.product_id; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3932 | row["y_type"] = datarecord.type; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3933 | row["y_form"] = datarecord.form; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3934 | row["y_amount"] = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3935 | row["y_cost"] = datarecord.cost; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3936 | row["y_use"] = 0; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3937 | row["y_min_temperature"] = datarecord.min_temperature; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3938 | row["y_max_temperature"] = datarecord.max_temperature; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3939 | row["y_attenuation"] = datarecord.attenuation; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3940 | row["y_flocculation"] = datarecord.flocculation; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3941 | row["y_cells"] = datarecord.cells; |
332
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3942 | row["y_tolerance"] = datarecord.tolerance; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3943 | row["y_inventory"] = datarecord.inventory; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3944 | var commit = $("#yeastGrid").jqxGrid('addrow', null, row); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3945 | } |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3946 | calcYeast(); |
267
dafc9ff806a4
Allow the same hops and yeasts to be added multiple times.
Michiel Broek <mbroek@mbse.eu>
parents:
265
diff
changeset
|
3947 | $("#yaddrowbutton").jqxDropDownList('clearSelection'); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3948 | }); |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3949 | $("#yinstockbutton").jqxCheckBox({ theme: theme, height: 27, disabled: (dataRecord.stage > 3) }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3950 | $("#yinstockbutton").on('change', function (event) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3951 | yeastinstock = event.args.checked; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3952 | yeastlist.dataBind(); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3953 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3954 | // delete selected yeast. |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
3955 | $("#ydeleterowbutton").jqxButton({ template: "danger", theme: theme, height: 27, width: 150, disabled: (dataRecord.stage > 3) }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3956 | $("#ydeleterowbutton").on('click', function () { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3957 | var selectedrowindex = $("#yeastGrid").jqxGrid('getselectedrowindex'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3958 | var rowscount = $("#yeastGrid").jqxGrid('getdatainformation').rowscount; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3959 | if (selectedrowindex >= 0 && selectedrowindex < rowscount) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3960 | var id = $("#yeastGrid").jqxGrid('getrowid', selectedrowindex); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3961 | var commit = $("#yeastGrid").jqxGrid('deleterow', id); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3962 | calcYeast(); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3963 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3964 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3965 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3966 | ready: function() { |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
3967 | calcFermentables(); |
280
c1f2a90c93ca
Fixed initial display of the yeast propagation window
Michiel Broek <mbroek@mbse.eu>
parents:
278
diff
changeset
|
3968 | showStarter(); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
3969 | calcYeast(); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3970 | $('#jqxTabs').jqxTabs('next'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3971 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3972 | columns: [ |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3973 | { text: 'Gist', datafield: 'y_name' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3974 | { text: 'Laboratorium', width: 150, datafield: 'y_laboratory' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3975 | { text: 'Code', width: 90, datafield: 'y_product_id' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3976 | { text: 'Soort', width: 100, datafield: 'y_form', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3977 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3978 | return '<span style="margin: 4px; margin-top: 6px; float: left;">' + YeastFormData[value].nl + '</span>'; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3979 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3980 | }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3981 | { text: 'Min. °C', width: 70, align: 'right', cellsalign: 'right', datafield: 'y_min_temperature' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3982 | { text: 'Max. °C', width: 70, align: 'right', cellsalign: 'right', datafield: 'y_max_temperature' }, |
332
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3983 | { text: 'Tol. %', width: 60, align: 'right', cellsalign: 'right', datafield: 'y_tolerance', |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3984 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3985 | var color = '#ffffff'; |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3986 | var amount = ""; |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3987 | if (value > 0) { |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3988 | amount = dataAdapter.formatNumber(value, "f1"); |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3989 | if (dataRecord.est_abv > value) |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3990 | color = '#ff4040'; |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3991 | } |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3992 | return '<span style="margin: 4px; margin-top: 6px; float: right; color: ' + color + ';">' + amount + '</span>'; |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3993 | } |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
3994 | }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3995 | { text: 'Attn. %', width: 70, align: 'right', cellsalign: 'right', datafield: 'y_attenuation', cellsformat: 'f1' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3996 | { text: 'Voor', width: 120, datafield: 'y_use', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
3997 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
3998 | return '<span style="margin: 4px; margin-top: 6px; float: left;">' + YeastUseData[value].nl + '</span>'; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
3999 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4000 | }, |
332
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
4001 | { text: 'Hoeveel', datafield: 'y_amount', width: 90, align: 'right', |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4002 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4003 | var amount = dataAdapter.formatNumber(value*1000, "f0")+" ml"; |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4004 | if (rowdata.y_form == 0) // Liquid |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4005 | amount = dataAdapter.formatNumber(value, "f0")+" pk"; |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4006 | else if (rowdata.y_form == 1) // Dry |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4007 | amount = dataAdapter.formatNumber(value*1000, "f1")+" gr"; |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4008 | return '<span style="margin: 4px; margin-top: 6px; float: right;">' + amount + '</span>'; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4009 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4010 | }, |
332
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
4011 | { text: 'Voorraad', datafield: 'y_inventory', width: 90, align: 'right', |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4012 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4013 | if (((dataRecord.inventory_reduced <= 3) && (rowdata.y_use == 0)) || // Primary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4014 | ((dataRecord.inventory_reduced <= 4) && (rowdata.y_use == 1)) || // Secondary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4015 | ((dataRecord.inventory_reduced <= 5) && (rowdata.y_use == 2)) || // Tertiary |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4016 | ((dataRecord.inventory_reduced <= 6) && (rowdata.y_use == 3))) { // Bottle |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4017 | var color = '#ffffff'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4018 | if (value < rowdata.y_amount) |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4019 | color = '#ff4040'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4020 | var amount = dataAdapter.formatNumber(value*1000, "f0")+" ml"; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4021 | if (rowdata.y_form == 0) // Liquid |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4022 | amount = dataAdapter.formatNumber(value, "f0")+" pk"; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4023 | else if (rowdata.y_form == 1) // Dry |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4024 | amount = dataAdapter.formatNumber(value*1000, "f1")+" gr"; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4025 | return '<span style="margin: 4px; margin-top: 6px; float: right; color: '+color+';">'+amount+'</span>'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4026 | } else { |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4027 | return '<span></span>'; |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4028 | } |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4029 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4030 | }, |
332
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
331
diff
changeset
|
4031 | { text: '', datafield: 'Edit', columntype: 'button', width: 90, align: 'center', cellsrenderer: function () { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4032 | return "Wijzig"; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4033 | }, buttonclick: function (row) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4034 | if (dataRecord.stage > 3) { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4035 | alert("Ingredieënt is al verwerkt."); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4036 | } else { |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4037 | yeastRow = row; |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4038 | yeastData = $("#yeastGrid").jqxGrid('getrowdata', yeastRow); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4039 | if (yeastData.y_form == 0) { |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4040 | $("#wy_pmpt_amount").html("Pak(ken):"); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4041 | $("#wy_amount").val(yeastData.y_amount); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4042 | $("#wy_amount").jqxNumberInput({ decimalDigits: 0 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4043 | } else if (yeastData.y_form == 1) { |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4044 | $("#wy_pmpt_amount").html("Gewicht gram:"); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4045 | $("#wy_amount").val(yeastData.y_amount * 1000); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4046 | $("#wy_amount").jqxNumberInput({ decimalDigits: 1 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4047 | } else { |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4048 | $("#wy_pmpt_amount").html("Volume ml:"); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4049 | $("#wy_amount").val(yeastData.y_amount * 1000); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4050 | $("#wy_amount").jqxNumberInput({ decimalDigits: 0 }); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4051 | } |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4052 | $("#wy_name").val(yeastData.y_name); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4053 | $("#wy_laboratory").val(yeastData.y_laboratory); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4054 | $("#wy_product_id").val(yeastData.y_product_id); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4055 | $("#wy_use").val(yeastData.y_use); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4056 | // show the popup window. |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4057 | $("#popupYeast").jqxWindow('open'); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4058 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4059 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4060 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4061 | ] |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4062 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4063 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4064 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4065 | // inline mash editor |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4066 | var editMash = function (data) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4067 | var mashSource = { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4068 | localdata: data.mashs, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4069 | datatype: "local", |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4070 | cache: false, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4071 | async: false, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4072 | datafields: [ |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4073 | { name: 'step_name', type: 'string' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4074 | { name: 'step_type', type: 'int' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4075 | { name: 'step_infuse_amount', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4076 | { name: 'step_temp', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4077 | { name: 'step_time', type: 'float' }, |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4078 | { name: 'step_thickness', type: 'float' }, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4079 | { name: 'ramp_time', type: 'float' }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4080 | { name: 'end_temp', type: 'float' } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4081 | ], |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4082 | addrow: function (rowid, rowdata, position, commit) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4083 | commit(true); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4084 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4085 | deleterow: function (rowid, commit) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4086 | commit(true); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4087 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4088 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4089 | var mashAdapter = new $.jqx.dataAdapter(mashSource, { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4090 | beforeLoadComplete: function (records) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4091 | mash_infuse = 0; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4092 | var data = new Array(); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4093 | for (var i = 0; i < records.length; i++) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4094 | var row = records[i]; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4095 | if (row.step_type == 0) // Infusion |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4096 | mash_infuse += parseFloat(row.step_infuse_amount); |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4097 | row.step_thickness = 0; // Init this field. |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4098 | data.push(row); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4099 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4100 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4101 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4102 | $("#mashGrid").jqxGrid({ |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4103 | width: 1240, |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4104 | height: 400, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4105 | source: mashAdapter, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4106 | theme: theme, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4107 | selectionmode: 'singlerow', |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4108 | showtoolbar: true, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4109 | rendertoolbar: function (toolbar) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4110 | var me = this; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4111 | var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4112 | toolbar.append(container); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4113 | container.append('<input style="float: left; margin-left: 165px;" id="saddrowbutton" type="button" value="Nieuwe stap" />'); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4114 | container.append('<input style="float: left; margin-left: 565px;" id="sdeleterowbutton" type="button" value="Verwijder stap" />'); |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4115 | $("#saddrowbutton").jqxButton({ template: "primary", theme: theme, height: 27, width: 150, disabled: (dataRecord.stage > 3) }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4116 | $("#saddrowbutton").on('click', function () { |
333 | 4117 | var rowscount = $("#mashGrid").jqxGrid('getdatainformation').rowscount; |
4118 | var row = {}; | |
4119 | row["step_name"] = "Stap " + (rowscount + 1); | |
4120 | if (rowscount > 0) { | |
4121 | row["step_type"] = 1; | |
4122 | } else { | |
4123 | row["step_type"] = 0; | |
4124 | row["step_infuse_amount"] = 15; | |
4125 | } | |
4126 | row["step_temp"] = 62.0; | |
4127 | row['step_time'] = 20.0; | |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4128 | row['step_thickness'] = 0; |
333 | 4129 | row['ramp_time'] = 1.0; |
4130 | row['end_temp'] = 62.0; | |
4131 | var commit = $("#mashGrid").jqxGrid('addrow', null, row); | |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4132 | }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4133 | // delete selected step. |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4134 | $("#sdeleterowbutton").jqxButton({ template: "danger", theme: theme, height: 27, width: 150, disabled: (dataRecord.stage > 3) }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4135 | $("#sdeleterowbutton").on('click', function () { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4136 | var selectedrowindex = $("#mashGrid").jqxGrid('getselectedrowindex'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4137 | var rowscount = $("#mashGrid").jqxGrid('getdatainformation').rowscount; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4138 | if (selectedrowindex >= 0 && selectedrowindex < rowscount) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4139 | var id = $("#mashGrid").jqxGrid('getrowid', selectedrowindex); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4140 | var commit = $("#mashGrid").jqxGrid('deleterow', id); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4141 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4142 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4143 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4144 | ready: function() { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4145 | calcInit(); |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4146 | calcMash(); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4147 | $('#jqxLoader').jqxLoader('close'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4148 | $('#jqxTabs').jqxTabs('first'); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4149 | }, |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4150 | columns: [ |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4151 | { text: 'Stap naam', datafield: 'step_name' }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4152 | { text: 'Stap type', datafield: 'step_type', width: 175, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4153 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4154 | return '<span style="margin: 4px; margin-top: 6px; float: left;">' + MashStepTypeData[value].nl + '</span>'; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4155 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4156 | }, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4157 | { text: 'Start °C', datafield: 'step_temp', width: 90, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4158 | { text: 'Eind °C', datafield: 'end_temp', width: 90, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4159 | { text: 'Rust min.', datafield: 'step_time', width: 90, align: 'right', cellsalign: 'right' }, |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4160 | { text: 'Stap min.', datafield: 'ramp_time', width: 90, align: 'right', cellsalign: 'right' }, |
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4161 | { text: 'Infuse L.', datafield: 'step_infuse_amount', width: 90, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4162 | { text: 'L/Kg.', datafield: 'step_thickness', width: 90, align: 'right', cellsalign: 'right', cellsformat: 'f2' }, |
286
124af734af68
Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents:
283
diff
changeset
|
4163 | { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', cellsrenderer: function () { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4164 | return "Wijzig"; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4165 | }, buttonclick: function (row) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4166 | if (dataRecord.stage > 3) { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4167 | alert("Het maichen is al gedaan."); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4168 | } else { |
273
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4169 | mashRow = row; |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4170 | mashData = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4171 | $("#wstep_name").val(mashData.step_name); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4172 | $("#wstep_type").val(mashData.step_type); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4173 | $("#wstep_infuse_amount").val(mashData.step_infuse_amount); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4174 | $("#wstep_temp").val(mashData.step_temp); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4175 | $("#wend_temp").val(mashData.end_temp); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4176 | $("#wstep_time").val(mashData.step_time); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4177 | $("#wramp_time").val(mashData.ramp_time); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4178 | if (mashData.step_type == 0) { |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4179 | $("#wstep_infuse_amount").show(); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4180 | $("#wstep_pmpt").show(); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4181 | } else { |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4182 | $("#wstep_infuse_amount").hide(); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4183 | $("#wstep_pmpt").hide(); |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4184 | } |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4185 | // show the popup window. |
19606adfea42
Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.
Michiel Broek <mbroek@mbse.eu>
parents:
271
diff
changeset
|
4186 | $("#popupMash").jqxWindow('open'); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4187 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4188 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4189 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4190 | ] |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4191 | }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4192 | }; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4193 | |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4194 | // initialize the input fields. |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4195 | // Tab 1, Algemeen |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4196 | $("#name").jqxTooltip({ content: 'De naam voor dit product.' }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4197 | $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4198 | $("#code").jqxTooltip({ content: 'Product code nummer.' }); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4199 | $("#code").jqxInput({ theme: theme, width: 100, height: 23 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4200 | $("#birth").jqxTooltip({ content: 'De ontwerp datum van dit product.' }); |
167
dabcd35f8f92
Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents:
164
diff
changeset
|
4201 | $("#birth").jqxInput({ theme: theme, width: 120, height: 23 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4202 | $("#stage").jqxTooltip({ content: 'De productie fase van dit product.' }); |
112
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
4203 | $("#stage").jqxInput({ theme: theme, width: 100, height: 23 }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4204 | $("#locked").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true }); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4205 | $('#locked').on('checked', function (event) { |
306
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
4206 | if (dataRecord.stage >= 10) { |
252
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
246
diff
changeset
|
4207 | dataRecord.locked = 1; |
306
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
4208 | dataRecord.stage = 11; |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
4209 | calcStage(); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
4210 | } |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
4211 | }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
4212 | $('#locked').on('unchecked', function (event) { |
306
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
4213 | if (dataRecord.stage >= 10) { |
252
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
246
diff
changeset
|
4214 | dataRecord.locked = 0; |
306
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
4215 | dataRecord.stage = 10; |
3435646b230e
Made text input fields opacity a bit lighter. Enable/disable yeast and taste tab fields according to the project stage. Activate the locked checkbox so the project can be closed.
Michiel Broek <mbroek@mbse.eu>
parents:
302
diff
changeset
|
4216 | calcStage(); |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
4217 | } |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
4218 | }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4219 | $("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit product.' }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4220 | $("#notes").jqxInput({ theme: theme, width: 960, height: 100 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4221 | $("#type").jqxTooltip({ content: 'Het brouw type van dit recept.' }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4222 | $("#type").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4223 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4224 | source: RecipeTypeAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4225 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4226 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4227 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4228 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4229 | autoDropDownHeight: true |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4230 | }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4231 | $("#efficiency").jqxTooltip({ content: 'Het rendement van maischen en koken.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
4232 | $("#efficiency").jqxNumberInput( Perc1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4233 | $("#batch_size").jqxTooltip({ content: 'Het volume van het gekoelde wort na het koken.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
4234 | $("#batch_size").jqxNumberInput( Spin1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4235 | $("#batch_size").jqxNumberInput({ min: 4 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4236 | $("#boil_time").jqxTooltip({ content: 'De kooktijd in minuten.' }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4237 | $("#boil_time").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4238 | $("#boil_time").jqxNumberInput({ min: 4, max: 360 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4239 | $("#boil_size").jqxTooltip({ content: 'Het volume van het wort voor het koken.' }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4240 | $("#boil_size").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 2, readOnly: true }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4241 | |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4242 | $("#st_guide").jqxTooltip({ content: 'De bierstijl gids voor dit recept.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4243 | $("#st_guide").jqxInput({ theme: theme, width: 250, height: 23 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4244 | $("#st_name").jqxTooltip({ content: 'De bierstijl naam voor dit recept.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4245 | $("#st_name").jqxInput({ theme: theme, width: 250, height: 23 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4246 | $("#st_letter").jqxTooltip({ content: 'De bierstijl letter voor dit recept.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4247 | $("#st_letter").jqxInput({ theme: theme, width: 100, height: 23 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4248 | $("#st_type").jqxTooltip({ content: 'Het bierstijl type.'}); |
240
a85c1d4c4d12
Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
4249 | $("#st_type").jqxInput({ theme: theme, width: 250, height: 23 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4250 | $("#st_category").jqxTooltip({ content: 'De Amerikaanse bierstijl categorie.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4251 | $("#st_category").jqxInput({ theme: theme, width: 250, height: 23 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4252 | $("#st_category_number").jqxTooltip({ content: 'De Amerikaanse bierstijl categorie sub nummer.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4253 | $("#st_category_number").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4254 | |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4255 | $("#est_og").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4256 | $("#est_og").jqxNumberInput( SGopts ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4257 | $("#st_og_min").jqxTooltip({ content: 'Het minimum begin SG voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4258 | $("#st_og_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4259 | $("#st_og_max").jqxTooltip({ content: 'Het maximum begin SG voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4260 | $("#st_og_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4261 | |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
4262 | $("#est_fg").jqxTooltip({ content: 'Het verwachte eind SG. Dit wordt automatisch berekend.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4263 | $("#est_fg").jqxNumberInput( Show3dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4264 | $("#st_fg_min").jqxTooltip({ content: 'Het minimum eind SG voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4265 | $("#st_fg_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4266 | $("#st_fg_max").jqxTooltip({ content: 'Het maximum eind SG voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4267 | $("#st_fg_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 3, readOnly: true }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4268 | |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4269 | $("#est_abv").jqxTooltip({ content: 'Alcohol volume %. Dit wordt automatisch berekend.' }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4270 | $("#est_abv").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4271 | $("#st_abv_min").jqxTooltip({ content: 'Het minimum alcohol volume % voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4272 | $("#st_abv_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4273 | $("#st_abv_max").jqxTooltip({ content: 'Het maximum alcohol volume % voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4274 | $("#st_abv_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4275 | |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4276 | $("#est_color").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4277 | $("#est_color").jqxNumberInput( Show0dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4278 | $("#st_color_min").jqxTooltip({ content: 'De minimum kleur voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4279 | $("#st_color_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4280 | $("#st_color_max").jqxTooltip({ content: 'De maximum kleur voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4281 | $("#st_color_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4282 | $("#color_method").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4283 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4284 | source: ColorMethodAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4285 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4286 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4287 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4288 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4289 | autoDropDownHeight: true |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4290 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4291 | |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4292 | $("#est_ibu").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4293 | $("#est_ibu").jqxNumberInput( Show0dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4294 | $("#st_ibu_min").jqxTooltip({ content: 'De minimum bitterheid voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4295 | $("#st_ibu_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4296 | $("#st_ibu_max").jqxTooltip({ content: 'De maximum bitterheid voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4297 | $("#st_ibu_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4298 | $("#ibu_method").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4299 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4300 | source: IBUmethodAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4301 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4302 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4303 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4304 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4305 | autoDropDownHeight: true, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4306 | dropDownVerticalAlignment: 'top' |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4307 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4308 | |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4309 | $("#est_carb").jqxTooltip({ content: 'Koolzuur volume. Dit wordt automatisch berekend.' }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4310 | $("#est_carb").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4311 | $("#st_carb_min").jqxTooltip({ content: 'Het minimum koolzuur volume voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4312 | $("#st_carb_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4313 | $("#st_carb_max").jqxTooltip({ content: 'Het maximum koolzuur volume voor deze bierstijl.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4314 | $("#st_carb_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4315 | |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4316 | // Tab 2, Equipment |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4317 | $("#eq_name").jqxTooltip({ content: 'De naam van deze brouw apparatuur.' }); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4318 | $("#eq_name").jqxInput({ theme: theme, width: 250, height: 23 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4319 | $("#eq_boil_size").jqxTooltip({ content: 'Normaal kook volume in liters' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4320 | $("#eq_boil_size").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4321 | $("#eq_batch_size").jqxTooltip({ content: 'Berekende batch grootte in liters aan het eind van de kook.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4322 | $("#eq_batch_size").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4323 | $("#eq_tun_volume").jqxTooltip({ content: 'Maisch ketel volume.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4324 | $("#eq_tun_volume").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4325 | $("#eq_top_up_water").jqxTooltip({ content: 'Extra water in het gistvat.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4326 | $("#eq_top_up_water").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4327 | $("#eq_trub_chiller_loss").jqxTooltip({ content: 'Standaard verlies bij het overbrengen naar het gistvat.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4328 | $("#eq_trub_chiller_loss").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4329 | $("#eq_evap_rate").jqxTooltip({ content: 'Verdamping in liters per uur.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4330 | $("#eq_evap_rate").jqxNumberInput( Show2dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4331 | $("#eq_boil_time").jqxTooltip({ content: 'Normale kooktijd in minuten.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4332 | $("#eq_boil_time").jqxNumberInput( Show0dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4333 | $("#eq_top_up_kettle").jqxTooltip({ content: 'Extra water toevoegen tijdens de kook.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4334 | $("#eq_top_up_kettle").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4335 | $("#eq_hop_utilization").jqxTooltip({ content: '100% voor kleine installaties, hoger voor grote brouwerijen.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4336 | $("#eq_hop_utilization").jqxNumberInput( Show0dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4337 | $("#eq_notes").jqxTooltip({ content: 'Opmerkingen over deze apparatuur.' }); |
152
2e4249add363
Import from brouwhulp fix style color ranges. Added calcSVG and calcABV calculation. Added batch size, time, efficiency and og change actions. Added style select and redesigned the first tab to fit this in. When equipment is changed, recalculate the recipe. Added print button.
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
4338 | $("#eq_notes").jqxInput({ theme: theme, width: 960, height: 200 }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4339 | $("#eq_lauter_volume").jqxTooltip({ content: 'Filterkuip volume.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4340 | $("#eq_lauter_volume").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4341 | $("#eq_lauter_deadspace").jqxTooltip({ content: 'Filterkuip verlies in liters.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4342 | $("#eq_lauter_deadspace").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4343 | $("#eq_kettle_volume").jqxTooltip({ content: 'Kook ketel volume in liters.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4344 | $("#eq_kettle_volume").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4345 | $("#eq_mash_volume").jqxTooltip({ content: 'Maisch water voor de eerste stap.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4346 | $("#eq_mash_volume").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4347 | $("#eq_mash_max").jqxTooltip({ content: 'De maximale moutstort in Kg.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4348 | $("#eq_mash_max").jqxNumberInput( Show1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4349 | $("#eq_efficiency").jqxTooltip({ content: 'Gemiddeld brouwzaal rendement.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4350 | $("#eq_efficiency").jqxNumberInput( Show1dec ); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4351 | |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4352 | // Tab 3, Fermentables |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4353 | $("#est_color2").jqxTooltip({ content: 'De kleur in EBC. Dit wordt automatisch berekend.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4354 | $("#est_color2").jqxNumberInput( Show0dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4355 | $("#est_og2").jqxTooltip({ content: 'Het geschatte begin SG van dit product.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4356 | $("#est_og2").jqxNumberInput( Show3dec ); |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4357 | $("#mash_kg").jqxTooltip({ content: 'Het gewicht van alle mouten in de maisch.' }); |
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4358 | $("#mash_kg").jqxNumberInput( Show3dec ); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4359 | $("#perc_malts").jqxProgressBar({ |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4360 | width: 300, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4361 | height: 23, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4362 | theme: theme, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4363 | showText: true, |
381
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4364 | max: 120, |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4365 | animationDuration: 0, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4366 | colorRanges: [ |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4367 | { stop: 90, color: '#008C00' }, |
381
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4368 | { stop: 100, color: '#EB7331' }, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4369 | { stop: 120, color: '#FF0000' } |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4370 | ], |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4371 | renderText: function (text) { |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4372 | return (Math.round(parseInt(text) * 1.2)) + '%'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4373 | } |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4374 | }); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4375 | $("#perc_sugars").jqxProgressBar({ |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4376 | width: 300, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4377 | height: 23, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4378 | theme: theme, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4379 | showText: true, |
381
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4380 | max: 50, |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4381 | animationDuration: 0, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4382 | colorRanges: [ |
381
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4383 | { stop: 20, color: '#008C00' }, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4384 | { stop: 50, color: '#FF0000' } |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4385 | ], |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4386 | renderText: function (text) { |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4387 | return (Math.round(parseInt(text) * 5) / 10) + '%'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4388 | } |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4389 | }); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4390 | $("#perc_cara").jqxProgressBar({ |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4391 | width: 300, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4392 | height: 23, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4393 | theme: theme, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4394 | showText: true, |
381
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4395 | max: 50, |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4396 | animationDuration: 0, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4397 | colorRanges: [ |
381
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4398 | { stop: 25, color: '#008C00' }, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4399 | { stop: 50, color: '#FF0000' } |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4400 | ], |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4401 | renderText: function (text) { |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4402 | return (Math.round(parseInt(text) * 5) / 10) + '%'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4403 | } |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4404 | }); |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4405 | $("#ferm_lintner").jqxProgressBar({ |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4406 | width: 300, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4407 | height: 23, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4408 | theme: theme, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4409 | showText: true, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4410 | max: 200, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4411 | animationDuration: 0, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4412 | colorRanges: [ |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4413 | { stop: 30, color: '#FF0000' }, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4414 | { stop: 40, color: '#EB7331' }, |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4415 | { stop: 200, color: '#008C00' } |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4416 | ], |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4417 | renderText: function (text) { |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4418 | return (parseInt(text) * 2) + ' lintner'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4419 | } |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4420 | }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4421 | $("#popupFermentable").jqxWindow({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4422 | width: 800, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4423 | height: 300, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4424 | position: { x: 230, y: 100 }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4425 | resizable: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4426 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4427 | isModal: true, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4428 | autoOpen: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4429 | cancelButton: $("#FermentableReady"), |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4430 | modalOpacity: 0.40 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4431 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4432 | $("#FermentableReady").jqxButton({ template: "success", width: '90px', theme: theme }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4433 | $("#FermentableReady").click(function () { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4434 | var rowID = $("#fermentableGrid").jqxGrid('getrowid', fermentableRow); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4435 | console.log("FermentableReady row:"+fermentableRow+" ID:"+rowID); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4436 | var row = { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4437 | f_name: fermentableData.f_name, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4438 | f_origin: fermentableData.f_origin, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4439 | f_supplier: fermentableData.f_supplier, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4440 | f_amount: fermentableData.f_amount, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4441 | f_cost: fermentableData.f_cost, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4442 | f_type: fermentableData.f_type, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4443 | f_yield: fermentableData.f_yield, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4444 | f_color: fermentableData.f_color, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4445 | f_coarse_fine_diff: fermentableData.f_coarse_fine_diff, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4446 | f_moisture: fermentableData.f_moisture, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4447 | f_diastatic_power: fermentableData.f_diastatic_power, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4448 | f_protein: fermentableData.f_protein, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4449 | f_max_in_batch: fermentableData.f_max_in_batch, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4450 | f_graintype: fermentableData.f_graintype, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4451 | f_added: fermentableData.f_added, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4452 | f_dissolved_protein: fermentableData.f_dissolved_protein, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4453 | f_recommend_mash: fermentableData.f_recommend_mash, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4454 | f_add_after_boil: fermentableData.f_add_after_boil, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4455 | f_adjust_to_total_100: fermentableData.f_adjust_to_total_100, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4456 | f_percentage: fermentableData.f_percentage, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4457 | f_di_ph: fermentableData.f_di_ph, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4458 | f_acid_to_ph_57: fermentableData.f_acid_to_ph_57, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4459 | f_inventory: fermentableData.f_inventory, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4460 | f_avail: fermentableData.f_avail |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4461 | }; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4462 | $("#fermentableGrid").jqxGrid('updaterow', rowID, row); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4463 | // Recalc percentages |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4464 | calcFermentables(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4465 | calcIBUs(); |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4466 | calcMash(); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4467 | // Waters: yes there is impact. |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4468 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4469 | $("#wf_name").jqxInput({ theme: theme, width: 320, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4470 | $("#wf_instock").jqxCheckBox({ theme: theme, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4471 | $("#wf_instock").on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4472 | fermentableinstock = event.args.checked; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4473 | fermentablelist.dataBind(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4474 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4475 | $("#wf_select").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4476 | placeHolder: "Kies mout:", |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4477 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4478 | source: fermentablelist, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4479 | displayMember: "name", |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4480 | width: 150, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4481 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4482 | dropDownWidth: 500, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4483 | dropDownHeight: 500, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4484 | renderer: function (index, label, value) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4485 | var datarecord = fermentablelist.records[index]; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4486 | return datarecord.supplier+ " / " + datarecord.name + " (" + datarecord.color + " EBC)"; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4487 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4488 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4489 | $("#wf_select").on('select', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4490 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4491 | var index = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4492 | var datarecord = fermentablelist.records[index]; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4493 | $("#wf_name").val(datarecord.name); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4494 | fermentableData.f_name = datarecord.name; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4495 | fermentableData.f_origin = datarecord.origin; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4496 | fermentableData.f_supplier = datarecord.supplier; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4497 | fermentableData.f_type = datarecord.type; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4498 | fermentableData.f_cost = datarecord.cost; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4499 | fermentableData.f_yield = datarecord.yield; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4500 | fermentableData.f_color = datarecord.color; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4501 | fermentableData.f_coarse_fine_diff = datarecord.coarse_fine_diff; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4502 | fermentableData.f_moisture = datarecord.moisture; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4503 | fermentableData.f_diastatic_power = datarecord.diastatic_power; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4504 | fermentableData.f_protein = datarecord.protein; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4505 | fermentableData.f_max_in_batch = datarecord.max_in_batch; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4506 | fermentableData.f_graintype = datarecord.graintype; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4507 | fermentableData.f_dissolved_protein = datarecord.dissolved_protein; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4508 | fermentableData.f_recommend_mash = datarecord.recommend_mash; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4509 | fermentableData.f_add_after_boil = datarecord.add_after_boil; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4510 | fermentableData.f_di_ph = datarecord.di_ph; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4511 | fermentableData.f_acid_to_ph_57 = datarecord.acid_to_ph_57; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4512 | fermentableData.f_inventory = datarecord.inventory; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4513 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4514 | }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
4515 | $("#wf_amount").jqxNumberInput( Spin3dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4516 | $('#wf_amount').on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4517 | console.log("amount changed: "+event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4518 | $("#fermentableGrid").jqxGrid('setcellvalue', fermentableRow, 'f_amount', event.args.value); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4519 | fermentableData.f_amount = event.args.value; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4520 | if (! to_100) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4521 | // Recalculate percentages |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4522 | console.log("adjust percentages"); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4523 | var rowscount = $("#fermentableGrid").jqxGrid('getdatainformation').rowscount; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4524 | if (rowscount > 1) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4525 | var tw = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4526 | for (i = 0; i < rowscount; i++) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4527 | var rowdata = $("#fermentableGrid").jqxGrid('getrowdata', i); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4528 | tw += rowdata.f_amount; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4529 | }; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4530 | for (i = 0; i < rowscount; i++) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4531 | var rowdata = $("#fermentableGrid").jqxGrid('getrowdata', i); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4532 | var percentage = Math.round(rowdata.f_amount / tw * 1000) / 10.0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4533 | $("#fermentableGrid").jqxGrid('setcellvalue', i, "f_percentage", percentage); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4534 | // if (i == fermentableRow) // Will crash the script. |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4535 | // $("#wf_percentage").val(percentage); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4536 | }; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4537 | } else { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4538 | $("#fermentableGrid").jqxGrid('setcellvalue', 0, "f_percentage", 100); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4539 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4540 | calcFermentables(); |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
4541 | calcIBUs(); |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4542 | calcMash(); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4543 | }; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4544 | }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
4545 | $("#wf_percentage").jqxNumberInput( Perc1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4546 | $("#wf_percentage").on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4547 | var oldvalue = Math.round(fermentableData.f_percentage * 10) / 10.0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4548 | var newvalue = event.args.value; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4549 | console.log("percentage changed: "+newvalue+" old: "+oldvalue); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4550 | fermentableData.f_percent = newvalue; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4551 | var rowscount = $("#fermentableGrid").jqxGrid('getdatainformation').rowscount; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4552 | if ((oldvalue != newvalue) && (rowscount > 1)) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4553 | var rowdata = $("#fermentableGrid").jqxGrid('getrowdata', fermentableRow); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4554 | if (rowdata.f_adjust_to_total_100) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4555 | $("#wf_percentage").val(oldvalue); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4556 | } else { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4557 | var diff = newvalue - oldvalue; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4558 | var tw = 0; // total weight |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4559 | for (i = 0; i < rowscount; i++) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4560 | var rowdata = $("#fermentableGrid").jqxGrid('getrowdata', i); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4561 | tw += rowdata.f_amount; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4562 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4563 | if (to_100) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4564 | // Adjust this row and the 100% row. |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4565 | var damount = tw * diff / 100; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4566 | var rowdata = $("#fermentableGrid").jqxGrid('getrowdata', fermentableRow); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4567 | var namount = rowdata.f_amount + damount; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4568 | $("#fermentableGrid").jqxGrid('setcellvalue', fermentableRow, 'f_amount', namount); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4569 | $("#wf_amount").val(namount); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4570 | $("#fermentableGrid").jqxGrid('setcellvalue', fermentableRow, 'f_percentage', rowdata.f_percentage + diff); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4571 | for (i = 0; i < rowscount; i++) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4572 | var rowdata = $("#fermentableGrid").jqxGrid('getrowdata', i); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4573 | if (rowdata.f_adjust_to_total_100) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4574 | namount = rowdata.f_amount - damount; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4575 | $("#fermentableGrid").jqxGrid('setcellvalue', i, 'f_percentage', rowdata.f_percentage - diff); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4576 | $("#fermentableGrid").jqxGrid('setcellvalue', i, 'f_amount', namount); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4577 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4578 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4579 | calcFermentables(); |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
4580 | calcIBUs(); |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4581 | calcMash(); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4582 | } else { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4583 | // Adjust all the rows. |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4584 | var nw = tw * diff / 100; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4585 | for (i = 0; i < rowscount; i++) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4586 | var rowdata = $("#fermentableGrid").jqxGrid('getrowdata', i); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4587 | if (i == fermentableRow) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4588 | var namount = rowdata.f_amount + nw; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4589 | $("#fermentableGrid").jqxGrid('setcellvalue', i, 'f_amount', namount); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4590 | // $("#wf_amount").val(namount); // Will crash the script. |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4591 | $("#fermentableGrid").jqxGrid('setcellvalue', i, 'f_percentage', newvalue); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4592 | } else { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4593 | var namount = rowdata.f_amount - (nw / (rowscount - 1)); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4594 | var newperc = Math.round((namount / tw) * 1000) / 10.0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4595 | $("#fermentableGrid").jqxGrid('setcellvalue', i, 'f_amount', namount); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4596 | $("#fermentableGrid").jqxGrid('setcellvalue', i, 'f_percentage', newperc); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4597 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4598 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4599 | calcFermentables(); |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
4600 | calcIBUs(); |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4601 | calcMash(); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4602 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4603 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4604 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4605 | }); |
331
8d7fad771dde
Warn if a fermentabe ingredient is used above the maximum in batch percentage.
Michiel Broek <mbroek@mbse.eu>
parents:
322
diff
changeset
|
4606 | $("#wf_max_in_batch").jqxNumberInput( Show1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4607 | $("#wf_adjust_to_total_100").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4608 | $("#wf_adjust_to_total_100").on('checked', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4609 | if (fermentableData.f_adjust_to_total_100 == 0) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4610 | if (to_100) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4611 | // Reset other flag first. |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4612 | var rowscount = $("#fermentableGrid").jqxGrid('getdatainformation').rowscount; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4613 | for (var i = 0; i < rowscount; i++) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4614 | if (i != fermentableRow) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4615 | $("#fermentableGrid").jqxGrid('setcellvalue', i, 'f_adjust_to_total_100', 0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4616 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4617 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4618 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4619 | $("#fermentableGrid").jqxGrid('setcellvalue', fermentableRow, 'f_adjust_to_total_100', 1); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4620 | calcFermentables(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4621 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4622 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4623 | $("#wf_adjust_to_total_100").on('unchecked', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4624 | if (fermentableData.f_adjust_to_total_100 != 0) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4625 | $("#fermentableGrid").jqxGrid('setcellvalue', fermentableRow, 'f_adjust_to_total_100', 0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4626 | calcFermentables(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4627 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4628 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4629 | $("#wf_added").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4630 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4631 | source: AddedAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4632 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4633 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4634 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4635 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4636 | autoDropDownHeight: true, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4637 | dropDownVerticalAlignment: 'top' |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4638 | }); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
4639 | $("#wf_added").on('select', function (event) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
4640 | if (event.args) { |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
4641 | var index = event.args.index; |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
4642 | $("#fermentableGrid").jqxGrid('setcellvalue', fermentableRow, 'f_added', index); |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
4643 | calcFermentables(); |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
4644 | calcIBUs(); |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
4645 | calcMash(); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
4646 | } |
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
4647 | }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4648 | |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4649 | // Tab 4, Hops |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
4650 | $("#est_ibu2").jqxTooltip({ content: 'De bitterheid in IBU. Dit wordt automatisch berekend.' }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4651 | $("#est_ibu2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 0, readOnly: true }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4652 | $("#hop_flavour").jqxProgressBar({ |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4653 | width: 300, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4654 | height: 23, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4655 | theme: theme, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4656 | showText: true, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4657 | animationDuration: 0, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4658 | colorRanges: [ |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4659 | { stop: 20, color: '#004D00' }, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4660 | { stop: 40, color: '#008C00' }, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4661 | { stop: 60, color: '#00BF00' }, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4662 | { stop: 80, color: '#00FF00' }, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4663 | { stop: 100, color: '#80FF80' } |
381
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4664 | ], |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4665 | renderText: function (text) { |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4666 | var val = parseInt(text); |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4667 | if (val < 20) |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4668 | return 'Weinig'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4669 | else if (val < 40) |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4670 | return 'Matig'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4671 | else if (val < 60) |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4672 | return 'Redelijk'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4673 | else if (val < 80) |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4674 | return 'Veel'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4675 | else |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4676 | return 'Zeer veel'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4677 | } |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4678 | }); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4679 | $("#hop_aroma").jqxProgressBar({ |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4680 | width: 300, height: 23, theme: theme, showText: true, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4681 | animationDuration: 0, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4682 | colorRanges: [ |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4683 | { stop: 20, color: '#004D00' }, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4684 | { stop: 40, color: '#008C00' }, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4685 | { stop: 60, color: '#00BF00' }, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4686 | { stop: 80, color: '#00FF00' }, |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4687 | { stop: 100, color: '#80FF80' } |
381
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4688 | ], |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4689 | renderText: function (text) { |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4690 | var val = parseInt(text); |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4691 | if (val < 20) |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4692 | return 'Weinig'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4693 | else if (val < 40) |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4694 | return 'Matig'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4695 | else if (val < 60) |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4696 | return 'Redelijk'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4697 | else if (val < 80) |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4698 | return 'Veel'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4699 | else |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4700 | return 'Zeer veel'; |
0ec81755396e
Improved the progress bars for the fermentables and hops in the editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
380
diff
changeset
|
4701 | } |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4702 | }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4703 | $("#popupHop").jqxWindow({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4704 | width: 800, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4705 | height: 300, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4706 | position: { x: 230, y: 100 }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4707 | resizable: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4708 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4709 | isModal: true, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4710 | autoOpen: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4711 | cancelButton: $("#HopReady"), |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4712 | modalOpacity: 0.40 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4713 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4714 | $("#HopReady").jqxButton({ template: "success", width: '90px', theme: theme }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4715 | $("#HopReady").click(function () { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4716 | var rowID = $("#hopGrid").jqxGrid('getrowid', hopRow); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4717 | console.log("HopReady row:"+hopRow+" ID:"+rowID); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4718 | var row = { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4719 | h_name: $("#wh_name").val(), |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4720 | h_origin: hopData.h_origin, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4721 | h_amount: parseFloat($("#wh_amount").jqxNumberInput('decimal')) / 1000, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4722 | h_cost: hopData.h_cost, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4723 | h_type: hopData.h_type, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4724 | h_form: hopData.h_form, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4725 | h_useat: $("#wh_useat").val(), |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4726 | h_time: hopData.h_time, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4727 | h_alpha: hopData.h_alpha, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4728 | h_beta: hopData.h_beta, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4729 | h_hsi: hopData.h_hsi, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4730 | h_humulene: hopData.h_humulene, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4731 | h_caryophyllene: hopData.h_caryophyllene, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4732 | h_cohumulone: hopData.h_cohumulone, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4733 | h_myrcene: hopData.h_myrcene, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4734 | h_total_oil: hopData.h_total_oil, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4735 | h_inventory: hopData.h_inventory, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4736 | h_avail: hopData.h_avail |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4737 | }; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4738 | $("#hopGrid").jqxGrid('updaterow', rowID, row); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4739 | calcIBUs(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4740 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4741 | $("#wh_name").jqxInput({ theme: theme, width: 320, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4742 | $("#wh_instock").jqxCheckBox({ theme: theme, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4743 | $("#wh_instock").on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4744 | hopinstock = event.args.checked; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4745 | hoplist.dataBind(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4746 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4747 | $("#wh_select").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4748 | placeHolder: "Kies hop:", |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4749 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4750 | source: hoplist, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4751 | displayMember: "name", |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4752 | width: 150, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4753 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4754 | dropDownWidth: 500, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4755 | dropDownHeight: 500, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4756 | renderer: function (index, label, value) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4757 | var datarecord = hoplist.records[index]; |
288
06dd071a429d
Hop dropdown lists also show the hop form
Michiel Broek <mbroek@mbse.eu>
parents:
286
diff
changeset
|
4758 | return datarecord.origin+ " - " + datarecord.name + " / " + HopFormData[datarecord.form].nl + " (" + datarecord.alpha + " % α)"; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4759 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4760 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4761 | $("#wh_select").on('select', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4762 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4763 | var index = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4764 | var datarecord = hoplist.records[index]; |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4765 | // console.log("select another hop:"+index+" "+datarecord.name); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4766 | $("#wh_name").val(datarecord.name); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4767 | hopData.h_name = datarecord.name; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4768 | hopData.h_origin = datarecord.origin; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4769 | hopData.h_cost = datarecord.cost; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4770 | hopData.h_type = datarecord.type; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4771 | hopData.h_form = datarecord.form; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4772 | hopData.h_alpha = datarecord.alpha; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4773 | hopData.h_beta = datarecord.beta; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4774 | hopData.h_hsi = datarecord.hsi; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4775 | hopData.h_humulene = datarecord.humulene; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4776 | hopData.h_caryophyllene = datarecord.caryophyllene; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4777 | hopData.h_cohumulone = datarecord.cohumulone; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4778 | hopData.h_myrcene = datarecord.myrcene; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4779 | hopData.h_total_oil = datarecord.total_oil; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4780 | hopData.h_inventory = datarecord.inventory; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4781 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4782 | }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
4783 | $("#wh_amount").jqxNumberInput( Spin1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4784 | $('#wh_amount').on('change', function (event) { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4785 | console.log("amount changed: "+event.args.value+" time:"+hopData.h_time+" alpha:"+hopData.h_alpha); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4786 | var amount = parseFloat(event.args.value) / 1000; |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4787 | var ibu = toIBU(hopData.h_useat, hopData.h_form, preboil_sg, |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4788 | parseFloat($("#batch_size").jqxNumberInput('decimal')), |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4789 | amount, parseFloat(hopData.h_time), |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4790 | parseFloat(hopData.h_alpha), $("#ibu_method").val() |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4791 | ); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4792 | hopData.h_amount = amount; |
311
f6fafccd8a6d
Added xml import for fermentables, hops, miscs, yeasts and styles. Fixed update IBU calculation in the editor hop popups.
Michiel Broek <mbroek@mbse.eu>
parents:
306
diff
changeset
|
4793 | $("#wh_ibu").val(ibu); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4794 | }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4795 | $("#wh_ibu").jqxNumberInput( Show1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4796 | $("#wh_time").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4797 | $("#wh_time").on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4798 | var newtime = parseFloat(event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4799 | // Check limits and correct |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4800 | if (hopData.h_useat == 2) { // Boil |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4801 | if (newtime > parseFloat($("#boil_time").jqxNumberInput('decimal'))) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4802 | newtime = parseFloat($("#boil_time").jqxNumberInput('decimal')); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4803 | $("#wh_time").val(newtime); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4804 | } |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4805 | hopData.h_time = newtime; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4806 | } else if (hopData.h_useat == 4) { // Whirlpool |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4807 | if (newtime > 120) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4808 | newtime = 120; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4809 | $("#wh_time").val(newtime); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4810 | } |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4811 | hopData.h_time = newtime; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4812 | } else if (hopData.h_useat == 5) { // Dry hop |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4813 | if (newtime > 21) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4814 | newtime = 21; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4815 | $("#wh_time").val(newtime); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4816 | } |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4817 | hopData.h_time = newtime * 1440; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4818 | } |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4819 | var ibu = toIBU(hopData.h_useat, hopData.h_form, preboil_sg, parseFloat($("#batch_size").jqxNumberInput('decimal')), |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4820 | parseFloat(hopData.h_amount), parseFloat(hopData.h_time), parseFloat(hopData.h_alpha), $("#ibu_method").val()); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4821 | // console.log("time changed: "+newtime+" final:"+hopData.h_time+" ibu:"+ibu); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4822 | $("#wh_ibu").val(ibu); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4823 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4824 | $("#wh_useat").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4825 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4826 | source: HopUseAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4827 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4828 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4829 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4830 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4831 | autoDropDownHeight: true, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4832 | dropDownVerticalAlignment: 'top' |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4833 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4834 | $("#wh_useat").on('select', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4835 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4836 | var index = event.args.index; |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4837 | hopData.h_useat = index; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4838 | if ((index == 0) || (index == 1)) { // Mashhop or First wort hop |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4839 | hopData.h_time = parseFloat(dataRecord.boil_time); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4840 | $("#wh_time").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4841 | $("#wh_time").val(hopData.h_time); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4842 | } else if (index == 3) { // Aroma |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4843 | hopData.h_time = 0; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4844 | $("#wh_time").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4845 | $("#wh_time").val(0); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4846 | } else { // Boil, Whirlpool or Dry hop |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4847 | $("#wh_time").jqxNumberInput({ spinButtons: true, readOnly: false, width: 110 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4848 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4849 | if (index == 5) // Dry hop |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4850 | $("#wh_pmpt_time").html("Tijd in dagen"); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4851 | else |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4852 | $("#wh_pmpt_time").html("Tijd in minuten"); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4853 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4854 | }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4855 | |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4856 | // Tab 5, Miscs |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4857 | $("#popupMisc").jqxWindow({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4858 | width: 800, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4859 | height: 275, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4860 | position: { x: 230, y: 100 }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4861 | resizable: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4862 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4863 | isModal: true, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4864 | autoOpen: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4865 | cancelButton: $("#MiscReady"), |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4866 | modalOpacity: 0.40 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4867 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4868 | $("#MiscReady").jqxButton({ template: "success", width: '90px', theme: theme }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4869 | $("#MiscReady").click(function () { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4870 | var rowID = $("#miscGrid").jqxGrid('getrowid', miscRow); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4871 | console.log("MiscReady row:"+miscRow+" ID:"+rowID); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4872 | var row = { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4873 | m_name: miscData.m_name, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4874 | m_amount: miscData.m_amount, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4875 | m_cost: miscData.m_cost, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4876 | m_type: miscData.m_type, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4877 | m_use_use: miscData.m_use_use, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4878 | m_time: miscData.m_time, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4879 | m_amount_is_weight: miscData.m_amount_is_weight, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4880 | m_inventory: miscData.m_inventory, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4881 | m_avail: miscData.m_avail |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4882 | }; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4883 | $("#miscGrid").jqxGrid('updaterow', rowID, row); |
358
3be8c2278fd7
Added flags for each ingredient group for the supplies state. On the main screen show the state of the supplies if the product stage is not yet packaged. Calculate the state of the supplies for fermentables, hops, yeasts and miscs. In the grids don't show the inventory values after they are used and reduced. On the fermentables tab show the weight of the grains to mash.
Michiel Broek <mbroek@mbse.eu>
parents:
356
diff
changeset
|
4884 | calcMiscs(); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4885 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4886 | $("#wm_name").jqxInput({ theme: theme, width: 320, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4887 | $("#wm_instock").jqxCheckBox({ theme: theme, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4888 | $("#wm_instock").on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4889 | miscinstock = event.args.checked; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4890 | misclist.dataBind(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4891 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4892 | $("#wm_select").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4893 | placeHolder: "Kies ingrediënt:", |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4894 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4895 | source: misclist, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4896 | displayMember: "name", |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4897 | width: 150, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4898 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4899 | dropDownWidth: 500, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4900 | dropDownHeight: 500 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4901 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4902 | $("#wm_select").on('select', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4903 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4904 | var index = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4905 | var datarecord = misclist.records[index]; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4906 | $("#wm_name").val(datarecord.name); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4907 | miscData.m_name = datarecord.name; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4908 | miscData.m_cost = datarecord.cost; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4909 | miscData.m_type = datarecord.type; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4910 | miscData.m_use_use = datarecord.use_use; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4911 | miscData.m_amount_is_weight = datarecord.amount_is_weight; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4912 | miscData.m_inventory = datarecord.inventory; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4913 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4914 | }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
4915 | $("#wm_amount").jqxNumberInput( Spin1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4916 | $('#wm_amount').on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4917 | console.log("amount changed: "+event.args.value); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4918 | miscData.m_amount = parseFloat(event.args.value) / 1000; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4919 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4920 | $("#wm_time").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4921 | $("#wm_time").on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4922 | console.log("time changed: "+event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4923 | var newtime = parseFloat(event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4924 | |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4925 | if (miscData.m_use_use == 2) { // Boil |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4926 | if (newtime > parseFloat($("#boil_time").jqxNumberInput('decimal'))) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4927 | newtime = parseFloat($("#boil_time").jqxNumberInput('decimal')); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4928 | $("#wm_time").val(newtime); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4929 | } |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4930 | miscData.m_time = newtime; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4931 | } else if ((miscData.m_use_use == 3) || (miscData.m_use_use == 4)) { // Primary or Secondary |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4932 | if (newtime > 21) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4933 | newtime = 21; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4934 | $("#wm_time").val(newtime); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4935 | } |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4936 | miscData.m_time = newtime * 1440; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4937 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4938 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4939 | $("#wm_use_use").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4940 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4941 | source: MiscUseAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4942 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4943 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4944 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4945 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4946 | autoDropDownHeight: true, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4947 | dropDownVerticalAlignment: 'top' |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4948 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4949 | $("#wm_use_use").on('select', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4950 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4951 | var index = event.args.index; |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4952 | miscData.m_use_use = index; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4953 | if ((index == 2) || (index == 3) || (index == 4)) { // Boil, Primary or Secondary |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4954 | $("#wm_time").jqxNumberInput({ spinButtons: true, readOnly: false, width: 110 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4955 | } else { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4956 | $("#wm_time").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4957 | $("#wm_time").val(0); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4958 | miscData.m_time = 0; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4959 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4960 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4961 | }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4962 | |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
4963 | // Tab 6, Yeasts |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
4964 | $("#est_fg2").jqxTooltip({ content: 'Het verwachte eind SG. Dit wordt automatisch berekend.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
4965 | $("#est_fg2").jqxNumberInput( Show3dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4966 | $("#est_abv2").jqxTooltip({ content: 'Alcohol volume %. Dit wordt automatisch berekend.' }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4967 | $("#est_abv2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
4968 | $("#yeast_cells").jqxNumberInput( Show1dec ); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
4969 | $("#need_cells").jqxNumberInput( Show1dec ); |
375
7f5455806f20
Reset starter values when saving a product without a starter. The yeast calculator only calculates a starter when enabled. Calculate the cells/ml/plato field. Disable starter buttons when the product brewday is over.
Michiel Broek <mbroek@mbse.eu>
parents:
373
diff
changeset
|
4970 | $("#plato_cells").jqxNumberInput( Show2dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4971 | $("#popupYeast").jqxWindow({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4972 | width: 800, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4973 | height: 300, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4974 | position: { x: 230, y: 100 }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4975 | resizable: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4976 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4977 | isModal: true, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4978 | autoOpen: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4979 | cancelButton: $("#YeastReady"), |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4980 | modalOpacity: 0.40 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4981 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4982 | $("#YeastReady").jqxButton({ template: "success", width: '90px', theme: theme }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
4983 | $("#YeastReady").click(function () { |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4984 | var rowID = $("#yeastGrid").jqxGrid('getrowid', yeastRow); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4985 | console.log("YeastReady row:"+yeastRow+" ID:"+rowID); |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4986 | var row = { |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4987 | y_name: yeastData.y_name, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4988 | y_laboratory: yeastData.y_laboratory, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4989 | y_product_id: yeastData.y_product_id, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4990 | y_amount: yeastData.y_amount, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4991 | y_cost: yeastData.y_cost, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4992 | y_type: yeastData.y_type, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4993 | y_form: yeastData.y_form, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4994 | y_flocculation: yeastData.y_flocculation, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4995 | y_min_temperature: yeastData.y_min_temperature, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4996 | y_max_temperature: yeastData.y_max_temperature, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4997 | y_attenuation: yeastData.y_attenuation, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4998 | y_use: yeastData.y_use, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
4999 | y_cells: yeastData.y_cells, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5000 | y_tolerance: yeastData.y_tolerance, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5001 | y_inventory: yeastData.y_inventory, |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5002 | y_avail: yeastData.y_avail |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5003 | }; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5004 | $("#yeastGrid").jqxGrid('updaterow', rowID, row); |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
5005 | calcFermentables(); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5006 | calcYeast(); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5007 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5008 | $("#wy_name").jqxInput({ theme: theme, width: 320, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5009 | $("#wy_laboratory").jqxInput({ theme: theme, width: 320, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5010 | $("#wy_product_id").jqxInput({ theme: theme, width: 320, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5011 | $("#wy_instock").jqxCheckBox({ theme: theme, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5012 | $("#wy_instock").on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5013 | yeastinstock = event.args.checked; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5014 | yeastlist.dataBind(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5015 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5016 | $("#wy_select").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5017 | placeHolder: "Kies gist:", |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5018 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5019 | source: yeastlist, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5020 | displayMember: "name", |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5021 | width: 150, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5022 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5023 | dropDownWidth: 500, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5024 | dropDownHeight: 500, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5025 | renderer: function (index, label, value) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5026 | var datarecord = yeastlist.records[index]; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5027 | return datarecord.laboratory+" "+datarecord.product_id+" "+datarecord.name; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5028 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5029 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5030 | $("#wy_select").on('select', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5031 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5032 | var index = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5033 | var datarecord = yeastlist.records[index]; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5034 | $("#wy_name").val(datarecord.name); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5035 | $("#wy_laboratory").val(datarecord.laboratory); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5036 | $("#wy_product_id").val(datarecord.product_id); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5037 | yeastData.y_name = datarecord.name; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5038 | yeastData.y_cost = datarecord.cost; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5039 | yeastData.y_type = datarecord.type; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5040 | yeastData.y_form = datarecord.form; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5041 | yeastData.y_laboratory = datarecord.laboratory; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5042 | yeastData.y_product_id = datarecord.product_id; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5043 | yeastData.y_min_temperature = datarecord.min_temperature; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5044 | yeastData.y_max_temperature = datarecord.max_temperature; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5045 | yeastData.y_flocculation = datarecord.flocculation; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5046 | yeastData.y_attenuation = datarecord.attenuation; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5047 | yeastData.y_cells = datarecord.cells; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5048 | yeastData.y_inventory = datarecord.inventory; |
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5049 | if (yeastData.y_form == 0) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5050 | $("#wy_pmpt_amount").html("Pak(ken):"); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5051 | } else if (yeastData.y_form == 1) { |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5052 | $("#wy_pmpt_amount").html("Gewicht gram:"); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5053 | } else { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5054 | $("#wy_pmpt_amount").html("Volume ml:"); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5055 | } |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
5056 | calcFermentables(); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5057 | calcYeast(); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5058 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5059 | }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5060 | $("#wy_amount").jqxNumberInput( Spin1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5061 | $('#wy_amount').on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5062 | console.log("amount changed: "+event.args.value); |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5063 | if (yeastData.y_form == 0) // Liquid |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5064 | var amount = parseFloat(event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5065 | else |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5066 | var amount = parseFloat(event.args.value) / 1000; |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5067 | yeastData.y_amount = amount; |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
5068 | calcFermentables(); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5069 | calcYeast(); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5070 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5071 | $("#wy_use").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5072 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5073 | source: YeastUseAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5074 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5075 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5076 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5077 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5078 | autoDropDownHeight: true, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5079 | dropDownVerticalAlignment: 'top' |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5080 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5081 | $("#wy_use").on('select', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5082 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5083 | var index = event.args.index; |
396
804800d8e885
Added console logging in the grid write callback functions. Removed grid sorting, it is done on the server side. Alert popup for block row edit functions. Better grid live updates. In recipe and product print show the whirlpool time. The checklist now shows misc ingredients added in the mash. Show hops added in the whirlpool. Most ingredient names are now quoted.
Michiel Broek <mbroek@mbse.eu>
parents:
392
diff
changeset
|
5084 | yeastData.y_use = index; |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
5085 | calcFermentables(); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5086 | calcYeast(); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5087 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5088 | }); |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5089 | for (var i = 1; i < 5; i++) { |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5090 | $("#prop"+i+"_type").jqxDropDownList({ |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5091 | theme: theme, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5092 | source: StarterTypeAdapter, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5093 | valueMember: 'id', |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5094 | displayMember: 'nl', |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5095 | width: 120, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5096 | height: 23, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5097 | autoDropDownHeight: true |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5098 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5099 | $("#prop"+i+"_type").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5100 | $("#prop"+i+"_volume").jqxNumberInput( Spin3dec ); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5101 | $("#prop"+i+"_volume").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5102 | $("#prop"+i+"_irate").jqxNumberInput( Show1dec ); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5103 | $("#prop"+i+"_irate").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5104 | $("#prop"+i+"_ncells").jqxNumberInput( Show1dec ); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5105 | $("#prop"+i+"_ncells").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5106 | $("#prop"+i+"_tcells").jqxNumberInput( Show1dec ); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5107 | $("#prop"+i+"_tcells").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5108 | $("#prop"+i+"_growf").jqxNumberInput( Show2dec ); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5109 | $("#prop"+i+"_growf").hide(); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5110 | } |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5111 | $("#starter_enable").jqxCheckBox({ theme: theme, height: 23 }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5112 | $("#starter_type").jqxDropDownList({ |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5113 | theme: theme, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5114 | source: StarterTypeAdapter, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5115 | valueMember: 'id', |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5116 | displayMember: 'nl', |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5117 | width: 120, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5118 | height: 23, |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5119 | autoDropDownHeight: true |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5120 | }); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5121 | $("#starter_sg").jqxNumberInput( SGopts ); |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
273
diff
changeset
|
5122 | $("#starter_try").jqxButton({ template: "primary", width: '100px', height: 23, theme: theme }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5123 | |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5124 | // Tab 7, Mashing |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
5125 | $("#mash_name").jqxTooltip({ content: 'De omschrijving van dit maisch profiel.' }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5126 | $("#mash_name").jqxInput({ theme: theme, width: 320, height: 23 }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5127 | $("#mash_select").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5128 | placeHolder: "Kies schema:", |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5129 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5130 | source: mashlist, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5131 | displayMember: "name", |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5132 | width: 250, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5133 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5134 | dropDownWidth: 500, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5135 | dropDownHeight: 500, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5136 | dropDownHorizontalAlignment: 'right' |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5137 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5138 | $("#mash_select").on('select', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5139 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5140 | var index = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5141 | // First delete all current steps |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5142 | var rowIDs = new Array(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5143 | var rows = $("#mashGrid").jqxGrid('getdisplayrows'); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5144 | for (var i = 0; i < rows.length; i++) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5145 | var row = rows[i]; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5146 | rowIDs.push(row.uid); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5147 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5148 | $("#mashGrid").jqxGrid('deleterow', rowIDs); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5149 | // Then add the new steps |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5150 | var datarecord = mashlist.records[index]; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5151 | $("#mash_name").val(datarecord.name); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5152 | for (var i = 0; i < datarecord.steps.length; i++) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5153 | var data = datarecord.steps[i]; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5154 | var row = {}; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5155 | row["step_name"] = data.step_name; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5156 | row["step_type"] = data.step_type; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5157 | // For now, but this must be smarter. |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5158 | if (mash_infuse == 0 && dataRecord.w1_amount > 0) |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5159 | mash_infuse = dataRecord.w1_amount; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5160 | if (i == 0) |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5161 | row["step_infuse_amount"] = mash_infuse; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5162 | else |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5163 | row["step_infuse_amount"] = 0; |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
5164 | if (mashkg > 0) |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
5165 | row['step_thickness'] = parseFloat(mash_infuse / mashkg); |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
5166 | else |
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
5167 | row['step_thickness'] = 0; |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5168 | row["step_temp"] = data.step_temp; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5169 | row["end_temp"] = data.end_temp; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5170 | row["step_time"] = data.step_time; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5171 | row["ramp_time"] = data.ramp_time; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5172 | var commit = $("#mashGrid").jqxGrid('addrow', null, row); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5173 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5174 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5175 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5176 | $("#popupMash").jqxWindow({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5177 | width: 800, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5178 | height: 350, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5179 | position: { x: 230, y: 100 }, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5180 | resizable: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5181 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5182 | isModal: true, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5183 | autoOpen: false, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5184 | cancelButton: $("#MashReady"), |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5185 | modalOpacity: 0.40 |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5186 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5187 | $("#MashReady").jqxButton({ template: "success", width: '90px', theme: theme }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5188 | $("#MashReady").click(function () { |
352
9d2a4703bdac
Version 0.1.2 Calculate mash thickness.
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
5189 | calcMash(); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5190 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5191 | $("#wstep_name").jqxInput({ theme: theme, width: 320, height: 23 }); |
340
fa4eb830c151
Fixed mash step name field editing.
Michiel Broek <mbroek@mbse.eu>
parents:
335
diff
changeset
|
5192 | $("#wstep_name").on('change', function (event) { |
fa4eb830c151
Fixed mash step name field editing.
Michiel Broek <mbroek@mbse.eu>
parents:
335
diff
changeset
|
5193 | var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
fa4eb830c151
Fixed mash step name field editing.
Michiel Broek <mbroek@mbse.eu>
parents:
335
diff
changeset
|
5194 | rowdata.step_name = event.args.value; |
fa4eb830c151
Fixed mash step name field editing.
Michiel Broek <mbroek@mbse.eu>
parents:
335
diff
changeset
|
5195 | }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5196 | $("#wstep_type").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5197 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5198 | source: MashStepTypeAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5199 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5200 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5201 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5202 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5203 | autoDropDownHeight: true |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5204 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5205 | $("#wstep_type").on('select', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5206 | if (event.args) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5207 | var index = event.args.index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5208 | var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5209 | rowdata.step_type = index; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5210 | if (index == 0) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5211 | $("#wstep_infuse_amount").show(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5212 | $("#wstep_pmpt").show(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5213 | } else { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5214 | rowdata.step_infuse_amount = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5215 | $("#wstep_infuse_amount").hide(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5216 | $("#wstep_pmpt").hide(); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5217 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5218 | mash_infuse = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5219 | var rows = $('#mashGrid').jqxGrid('getrows'); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5220 | for (var i = 0; i < rows.length; i++) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5221 | var row = rows[i]; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5222 | if (row.step_type == 0) // Infusion |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5223 | mash_infuse += parseFloat(row.step_infuse_amount); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5224 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5225 | } |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5226 | }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5227 | $("#wstep_temp").jqxNumberInput( Spin1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5228 | $('#wstep_temp').on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5229 | var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5230 | rowdata.step_temp = parseFloat(event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5231 | }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5232 | $("#wend_temp").jqxNumberInput( Spin1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5233 | $('#wend_temp').on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5234 | var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5235 | rowdata.end_temp = parseFloat(event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5236 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5237 | $("#wstep_time").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5238 | $('#wstep_time').on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5239 | var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5240 | rowdata.step_time = parseFloat(event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5241 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5242 | $("#wramp_time").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5243 | $('#wramp_time').on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5244 | var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5245 | rowdata.ramp_time = parseFloat(event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5246 | }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5247 | $("#wstep_infuse_amount").jqxNumberInput( Spin1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5248 | $('#wstep_infuse_amount').on('change', function (event) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5249 | var rowdata = $("#mashGrid").jqxGrid('getrowdata', mashRow); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5250 | rowdata.step_infuse_amount = parseFloat(event.args.value); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5251 | mash_infuse = 0; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5252 | var rows = $('#mashGrid').jqxGrid('getrows'); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5253 | for (var i = 0; i < rows.length; i++) { |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5254 | var row = rows[i]; |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5255 | if (row.step_type == 0) // Infusion |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5256 | mash_infuse += parseFloat(row.step_infuse_amount); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5257 | } |
264
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
5258 | if (dataRecord.w2_amount == 0) { |
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
5259 | dataRecord.w1_amount = mash_infuse; |
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
5260 | $("#w1_amount").val(mash_infuse); |
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
5261 | } else { |
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
5262 | dataRecord.w1_amount = (dataRecord.w1_amount / (dataRecord.w1_amount + dataRecord.w2_amount)) * mash_infuse; |
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
5263 | dataRecord.w2_amount = (dataRecord.w2_amount / (dataRecord.w1_amount + dataRecord.w2_amount)) * mash_infuse; |
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
5264 | $("#w1_amount").val(dataRecord.w1_amount); |
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
5265 | $("#w2_amount").val(dataRecord.w2_amount); |
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
5266 | } |
24139883b9fa
Adjust water volumes if mash infusion amount is changed.
Michiel Broek <mbroek@mbse.eu>
parents:
263
diff
changeset
|
5267 | $('#wg_amount').val(mash_infuse); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5268 | }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5269 | |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5270 | // Tab 8, Water |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5271 | $("#tgt_bu").jqxNumberInput( Show2wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5272 | $("#tgt_cl_so4").jqxNumberInput( Show1wat ); |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
5273 | $("#got_cl_so4").jqxNumberInput( Show1wat ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5274 | |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5275 | // Water source 1 |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5276 | $("#w1_name").jqxDropDownList({ |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5277 | placeHolder: "Kies hoofd water:", |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5278 | theme: theme, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5279 | source: waterlist, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5280 | displayMember: "name", |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5281 | width: 250, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5282 | height: 27, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5283 | dropDownWidth: 400, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5284 | dropDownHeight: 400 |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5285 | }); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5286 | $("#w1_name").on('select', function (event) { |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5287 | if (event.args) { |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5288 | var index = event.args.index; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5289 | var datarecord = waterlist.records[index]; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5290 | dataRecord.w1_name = datarecord.name; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5291 | $("#w1_calcium").val(datarecord.calcium); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5292 | dataRecord.w1_calcium = datarecord.calcium; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5293 | $("#w1_sulfate").val(datarecord.sulfate); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5294 | dataRecord.w1_sulfate = datarecord.sulfate; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5295 | $("#w1_chloride").val(datarecord.chloride); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5296 | dataRecord.w1_chloride = datarecord.chloride; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5297 | $("#w1_sodium").val(datarecord.sodium); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5298 | dataRecord.w1_sodium = datarecord.sodium; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5299 | $("#w1_magnesium").val(datarecord.magnesium); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5300 | dataRecord.w1_magnesium = datarecord.magnesium; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5301 | $("#w1_total_alkalinity").val(datarecord.total_alkalinity); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5302 | dataRecord.w1_total_alkalinity = datarecord.total_alkalinity; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5303 | $("#w1_ph").val(datarecord.ph); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5304 | dataRecord.w1_ph = datarecord.ph; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5305 | $("#w1_cost").val(datarecord.cost); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5306 | dataRecord.w1_cost = datarecord.cost; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5307 | calcWater(); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5308 | } |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5309 | }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5310 | $("#w1_amount").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5311 | $("#w1_calcium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5312 | $("#w1_magnesium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5313 | $("#w1_sodium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5314 | $("#w1_total_alkalinity").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5315 | $("#w1_chloride").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5316 | $("#w1_sulfate").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5317 | $("#w1_ph").jqxNumberInput( Show1wat ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5318 | // Water source 2 |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5319 | $("#w2_name").jqxDropDownList({ |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5320 | placeHolder: "Kies meng water:", |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5321 | theme: theme, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5322 | source: waterlist, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5323 | displayMember: "name", |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5324 | width: 250, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5325 | height: 27, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5326 | dropDownWidth: 400, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5327 | dropDownHeight: 400 |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5328 | }); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5329 | $("#w2_name").on('select', function (event) { |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5330 | if (event.args) { |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5331 | var index = event.args.index; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5332 | var datarecord = waterlist.records[index]; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5333 | dataRecord.w2_name = datarecord.name; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5334 | $("#w2_calcium").val(datarecord.calcium); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5335 | dataRecord.w2_calcium = datarecord.calcium; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5336 | $("#w2_sulfate").val(datarecord.sulfate); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5337 | dataRecord.w2_sulfate = datarecord.sulfate; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5338 | $("#w2_chloride").val(datarecord.chloride); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5339 | dataRecord.w2_chloride = datarecord.chloride; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5340 | $("#w2_sodium").val(datarecord.sodium); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5341 | dataRecord.w2_sodium = datarecord.sodium; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5342 | $("#w2_magnesium").val(datarecord.magnesium); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5343 | dataRecord.w2_magnesium = datarecord.magnesium; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5344 | $("#w2_total_alkalinity").val(datarecord.total_alkalinity); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5345 | dataRecord.w2_total_alkalinity = datarecord.total_alkalinity; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5346 | $("#w2_ph").val(datarecord.ph); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5347 | dataRecord.w2_ph = datarecord.ph; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5348 | $("#w2_cost").val(datarecord.cost); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5349 | dataRecord.w2_cost = datarecord.cost; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5350 | $("#w2_amount").jqxNumberInput({ max: 100000, readOnly: false }); // Set high max to enable the spinbuttons. |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5351 | calcWater(); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5352 | } |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5353 | }); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
5354 | $("#w2_amount").jqxTooltip({ content: 'De verdeling van het hoofd en meng water. Het totale maisch water volume blijft gelijk.'}); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5355 | $("#w2_amount").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 94, height: 23, min: 0, max: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5, readOnly: true }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5356 | $("#w2_calcium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5357 | $("#w2_magnesium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5358 | $("#w2_sodium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5359 | $("#w2_total_alkalinity").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5360 | $("#w2_chloride").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5361 | $("#w2_sulfate").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5362 | $("#w2_ph").jqxNumberInput( Show1wat ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5363 | // Water mixed |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5364 | $("#wg_amount").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5365 | $("#wg_calcium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5366 | $("#wg_magnesium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5367 | $("#wg_sodium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5368 | $("#wg_total_alkalinity").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5369 | $("#wg_chloride").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5370 | $("#wg_sulfate").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5371 | $("#wg_ph").jqxNumberInput( Show1wat ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5372 | // Water treated |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
5373 | $("#wb_calcium").jqxTooltip({ content: 'De ideale hoeveelheid Calcium is tussen 40 en 150.'}); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5374 | $("#wb_calcium").jqxNumberInput( Show1wat ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
5375 | $("#wb_magnesium").jqxTooltip({ content: 'De ideale hoeveelheid Magnesium is lager dan 30.'}); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5376 | $("#wb_magnesium").jqxNumberInput( Show1wat ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
5377 | $("#wb_sodium").jqxTooltip({ content: 'De ideale hoeveelheid Natrium is lager dan 150.'}); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5378 | $("#wb_sodium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5379 | $("#wb_total_alkalinity").jqxNumberInput( Show1wat ); |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
5380 | $("#wb_chloride").jqxTooltip({ content: 'De ideale hoeveelheid Chloride is tussen 50 en 100.'}); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5381 | $("#wb_chloride").jqxNumberInput( Show1wat ); |
347
e6e7ec9e33e0
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents:
342
diff
changeset
|
5382 | $("#wb_sulfate").jqxTooltip({ content: 'De ideale hoeveelheid Sulfaat is tussen 50 en 350.'}); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5383 | $("#wb_sulfate").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5384 | $("#wb_ph").jqxNumberInput( Show1wat ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5385 | // Water target profile |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5386 | $("#pr_name").jqxDropDownList({ |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5387 | placeHolder: "Kies doel profiel:", |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5388 | theme: theme, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5389 | source: waterprofiles, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5390 | displayMember: "name", |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5391 | width: 250, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5392 | height: 27, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5393 | dropDownWidth: 400, |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5394 | dropDownHeight: 300 |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5395 | }); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5396 | $("#pr_name").on('select', function (event) { |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5397 | if (event.args) { |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5398 | var index = event.args.index; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5399 | var datarecord = waterprofiles.records[index]; |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5400 | $("#pr_calcium").val(datarecord.calcium); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5401 | $("#pr_sulfate").val(datarecord.sulfate); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5402 | $("#pr_chloride").val(datarecord.chloride); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5403 | $("#pr_sodium").val(datarecord.sodium); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5404 | $("#pr_magnesium").val(datarecord.magnesium); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5405 | $("#pr_total_alkalinity").val(datarecord.total_alkalinity); |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5406 | } |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5407 | }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5408 | $("#pr_calcium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5409 | $("#pr_magnesium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5410 | $("#pr_sodium").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5411 | $("#pr_total_alkalinity").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5412 | $("#pr_chloride").jqxNumberInput( Show1wat ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5413 | $("#pr_sulfate").jqxNumberInput( Show1wat ); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5414 | |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5415 | // Water agents |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
5416 | $("#wa_cacl2").jqxTooltip({ content: 'Voor het maken van een ander waterprofiel. Voegt calcium en chloride toe. Voor het verbeteren van zoetere bieren.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5417 | $("#wa_cacl2").jqxNumberInput( Spin1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
5418 | $("#wa_caso4").jqxTooltip({ content: 'Gips. Voor het maken van een ander waterprofiel. Voegt calcium en sulfaat toe. Voor het verbeteren van bittere bieren.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5419 | $("#wa_caso4").jqxNumberInput( Spin1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
5420 | $("#wa_mgso4").jqxTooltip({ content: 'Epsom zout. Voor het maken van een ander waterprofiel. Voegt magnesium en sulfaat toe. Gebruik spaarzaam!' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5421 | $("#wa_mgso4").jqxNumberInput( Spin1dec ); |
161
2218edd86ba1
Moved the tooltips to the field declarations.
Michiel Broek <mbroek@mbse.eu>
parents:
160
diff
changeset
|
5422 | $("#wa_nacl").jqxTooltip({ content: 'Keukenzout. Voor het maken van een ander waterprofiel. Voegt natrium en chloride toe. Voor het accentueren van zoetheid. Bij hoge dosering wordt het bier ziltig.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5423 | $("#wa_nacl").jqxNumberInput( Spin1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5424 | $("#mash_ph").jqxTooltip({ content: 'Maisch pH tussen 5.2 en 5.6. Gebruik 5.2 voor lichte en 5.5 voor donkere bieren.'}); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5425 | $("#mash_ph").jqxNumberInput( SpinpH ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5426 | $("#calc_acid").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5427 | $("#wa_base_name").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5428 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5429 | source: BaseTypeAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5430 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5431 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5432 | width: 170, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5433 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5434 | autoDropDownHeight: true |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5435 | }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5436 | $("#wa_base").jqxNumberInput( Spin2dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5437 | $("#wa_base").jqxNumberInput({ symbol: ' gr', symbolPosition: 'right' }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5438 | $("#wa_acid_name").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5439 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5440 | source: AcidTypeAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5441 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5442 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5443 | width: 170, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5444 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5445 | autoDropDownHeight: true |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5446 | }) |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5447 | $("#wa_acid").jqxNumberInput( Spin2dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5448 | $("#wa_acid").jqxNumberInput({ symbol: ' ml', symbolPosition: 'right' }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5449 | $("#wa_acid_perc").jqxNumberInput( Perc0 ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5450 | $("#wa_acid_perc").jqxNumberInput({ width: 70, symbol: '%', symbolPosition: 'right' }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5451 | // Sparge water |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5452 | $("#sparge_temp").jqxNumberInput( Spin1dec ); |
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5453 | $("#sparge_volume").jqxNumberInput( Spin1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5454 | $("#sparge_ph").jqxNumberInput( SpinpH ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5455 | $("#sparge_source").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5456 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5457 | source: SpargeSourceAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5458 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5459 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5460 | width: 110, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5461 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5462 | autoDropDownHeight: true |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5463 | }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5464 | $("#sparge_acid_amount").jqxNumberInput( Spin2dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5465 | $("#sparge_acid_amount").jqxNumberInput({ spinButtons: false, readOnly: true, symbol: ' ml', symbolPosition: 'right' }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5466 | $("#sparge_acid_type").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5467 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5468 | source: AcidTypeAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5469 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5470 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5471 | width: 110, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5472 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5473 | autoDropDownHeight: true |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5474 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5475 | $("#sparge_acid_perc").jqxNumberInput( Perc0 ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5476 | $("#sparge_acid_perc").jqxNumberInput({ symbol: '%', symbolPosition: 'right' }); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5477 | |
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5478 | // Tab 9, Brewday |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5479 | $("#brew_date_start").jqxTooltip({ content: 'Brouw datum en tijd. Voor planning laat de tijd op 00:00:00 staan.' }); |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5480 | $("#brew_date_start").jqxDateTimeInput( DateTimeopts ); |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5481 | $('#brew_date_start').on('close', function (event) { calcStage(); }); |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5482 | $("#brew_date_end").jqxTooltip({ content: 'End datum en tijd van de brouw. Leeg laten als er nog niet gebrouwen is.' }); |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5483 | $("#brew_date_end").jqxDateTimeInput( DateTimeopts ); |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5484 | $('#brew_date_end').on('close', function (event) { calcStage(); }); |
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5485 | $("#brew_mash_ph").jqxTooltip({ content: 'De gemeten pH tijdens het maischen eventueel na correctie.' }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5486 | $("#brew_mash_ph").jqxNumberInput( SpinpH ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5487 | $("#est_mash_ph").jqxTooltip({ content: 'De gewenste pH tijdens het maischen.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5488 | $("#est_mash_ph").jqxNumberInput( Show1wat ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5489 | $("#brew_preboil_ph").jqxTooltip({ content: 'De gemeten pH in de kookketel na het spoelen en voor de kook.' }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5490 | $("#brew_preboil_ph").jqxNumberInput( SpinpH ); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5491 | // est_preboil_ph |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5492 | $("#brew_aboil_ph").jqxTooltip({ content: 'De gemeten pH na het koken.' }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5493 | $("#brew_aboil_ph").jqxNumberInput( SpinpH ); |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5494 | // est_aboil_ph |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5495 | $("#brew_mash_sg").jqxTooltip({ content: 'Het bereikte SG na het maischen.' }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5496 | $("#brew_mash_sg").jqxNumberInput( SGopts ); |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
5497 | $("#brew_mash_sg").on('valueChanged', function () { calcMashEfficiency(); }); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5498 | $("#est_mash_sg").jqxTooltip({ content: 'Het berekende verwachte SG na het maischen.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5499 | $("#est_mash_sg").jqxNumberInput( Show3wat ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5500 | $("#brew_preboil_sg").jqxTooltip({ content: 'Het gemeten SG in de kookketel na het spoelen en voor het koken.' }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5501 | $("#brew_preboil_sg").jqxNumberInput( SGopts ); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5502 | $("#brew_preboil_sg").on('valueChanged', function (event) { |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5503 | dataRecord.brew_preboil_sg = event.args.value; |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5504 | calcEfficiencyBeforeBoil(); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5505 | }); |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
5506 | $("#est_pre_sg").jqxTooltip({ content: 'Het berekende SG in de kookketel na het spoelen en voor het koken.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5507 | $("#est_pre_sg").jqxNumberInput( Show3wat ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5508 | $("#brew_aboil_sg").jqxTooltip({ content: 'Het gemeten SG in de kookketel na het koken.' }); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5509 | $("#brew_aboil_sg").jqxNumberInput( SGopts ); |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5510 | $("#brew_aboil_sg").on('valueChanged', function (event) { |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5511 | dataRecord.brew_aboil_sg = event.args.value; |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5512 | calcEfficiencyAfterBoil(); |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5513 | calcFermentables(); |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5514 | calcIBUs(); |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5515 | }); |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
5516 | $("#est_og3").jqxTooltip({ content: 'Het gewenste SG in de kookketel na het koken.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5517 | $("#est_og3").jqxNumberInput( Show3wat ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5518 | $("#brew_mash_efficiency").jqxTooltip({ content: 'Het behaalde maisch rendement.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5519 | $("#brew_mash_efficiency").jqxNumberInput( Show1dec ); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
5520 | $("#brew_preboil_volume").jqxTooltip({ content: 'Het gemeten volume van het wort voor het koken.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5521 | $("#brew_preboil_volume").jqxNumberInput( Spin1dec ); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5522 | $("#brew_preboil_volume").on('valueChanged', function (event) { |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5523 | dataRecord.brew_preboil_volume = event.args.value; |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5524 | calcEfficiencyBeforeBoil(); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5525 | }); |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
5526 | $("#est_pre_vol").jqxTooltip({ content: 'Het berekende volume van het wort voor het koken.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5527 | $("#est_pre_vol").jqxNumberInput( Show1wat ); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
5528 | $("#brew_aboil_volume").jqxTooltip({ content: 'Het gemeten volume van het wort na het koken.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5529 | $("#brew_aboil_volume").jqxNumberInput( Spin1dec ); |
255
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5530 | $("#brew_aboil_volume").on('valueChanged', function (event) { |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5531 | dataRecord.brew_aboil_volume = event.args.value; |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5532 | calcEfficiencyAfterBoil(); |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5533 | calcFermentables(); |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5534 | calcIBUs(); |
28953f9fc5b4
Added IBU calculation in the fermenter on the brewday tab. More auto IBU updates.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
5535 | }); |
244
3755db604432
Added brewday pre calculated boil values.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
5536 | $("#est_a_vol").jqxTooltip({ content: 'Het gewenste volume na het koken.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5537 | $("#est_a_vol").jqxNumberInput( Show1wat ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5538 | $("#brew_preboil_efficiency").jqxTooltip({ content: 'Het berekende rendement voor het koken.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5539 | $("#brew_preboil_efficiency").jqxNumberInput( Show1dec ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5540 | $("#brew_aboil_efficiency").jqxTooltip({ content: 'Het bereikte rendement na het koken.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5541 | $("#brew_aboil_efficiency").jqxNumberInput( Show1dec ); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5542 | $("#brew_sparge_temperature").jqxNumberInput( Spin1dec ); |
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5543 | $("#brew_sparge_volume").jqxNumberInput( Spin1dec ); |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
5544 | $("#brew_sparge_est").jqxNumberInput( Show1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5545 | $("#brew_whirlpool9").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5546 | $("#brew_whirlpool9").jqxNumberInput({ max: 120 }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5547 | $("#brew_cooling_to").jqxNumberInput( Spin1dec ); |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5548 | $("#brew_sparge_ph").jqxNumberInput( SpinpH ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5549 | $("#brew_whirlpool7").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5550 | $("#brew_whirlpool7").jqxNumberInput({ max: 120 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5551 | $("#brew_cooling_method").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5552 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5553 | source: CoolingTypeAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5554 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5555 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5556 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5557 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5558 | autoDropDownHeight: true |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5559 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5560 | $("#brew_whirlpool6").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5561 | $("#brew_whirlpool6").jqxNumberInput({ max: 120 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5562 | $("#brew_cooling_time").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5563 | $("#brew_cooling_time").jqxNumberInput({ max: 1440 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5564 | $("#brew_whirlpool2").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5565 | $("#brew_whirlpool2").jqxNumberInput({ max: 120 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5566 | $("#brew_aeration_type").jqxDropDownList({ |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5567 | theme: theme, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5568 | source: AerationTypeAdapter, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5569 | valueMember: 'id', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5570 | displayMember: 'nl', |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5571 | width: 180, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5572 | height: 23, |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5573 | autoDropDownHeight: true |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5574 | }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5575 | $("#brew_aeration_time").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5576 | $("#brew_aeration_time").jqxNumberInput({ max: 1440 }); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5577 | $("#brew_aeration_speed").jqxNumberInput( PosInt ); |
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5578 | $("#brew_aeration_speed").jqxNumberInput({ max: 1440 }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5579 | $("#brew_fermenter_volume").jqxNumberInput( Show1dec ); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5580 | $("#brew_fermenter_extrawater").jqxNumberInput( Spin1dec ); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5581 | $("#brew_fermenter_sg").jqxNumberInput( Show3dec ); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
5582 | $("#brew_fermenter_tcloss").jqxNumberInput( Spin1dec ); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5583 | $("#brew_fermenter_ibu").jqxNumberInput( Show0dec ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5584 | $("#brew_fermenter_color").jqxNumberInput( Show0dec ); |
171
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
5585 | $("#BLog").jqxButton({ template: "info", width: '150px', theme: theme }); |
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
5586 | $("#BLog").click(function () { |
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
5587 | // Open log in a new tab. |
294
1e09d1d102a8
Updated crontask to check for fermentation logs and update the products. Added initial brew log graph.
Michiel Broek <mbroek@mbse.eu>
parents:
288
diff
changeset
|
5588 | var url="log_brew.php?code=" + dataRecord.code + "&name=" + dataRecord.name; |
171
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
5589 | window.open(url); |
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
5590 | }); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5591 | |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5592 | // Tab 10, Fermentation |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5593 | // Note, fermentation temps changes must do calcCarbonation() |
282
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
5594 | $("#brew_fermenter_sg2").jqxTooltip({ content: 'Het behaalde SG in het gistvat, overgenomen van de brouwdag.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5595 | $("#brew_fermenter_sg2").jqxNumberInput( Show3dec ); |
282
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
5596 | $("#primary_start_temp").jqxTooltip({ content: 'De begintemperatuur van de hoofdvergisting.' }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5597 | $("#primary_start_temp").jqxNumberInput( YeastT ); |
282
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
5598 | $("#primary_max_temp").jqxTooltip({ content: 'De hoogst bereikte piek temperatuur tijdens de hoofgvergisting.' }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5599 | $("#primary_max_temp").jqxNumberInput( YeastT ); |
282
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
5600 | $("#primary_end_temp").jqxTooltip({ content: 'De eind temperatuur van de hoofdvergisting.' }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5601 | $("#primary_end_temp").jqxNumberInput( YeastT ); |
282
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
5602 | $("#primary_end_sg").jqxTooltip({ content: 'Het gemeten SG aan het eind van de hoofdvergisting.' }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5603 | $("#primary_end_sg").jqxNumberInput( SGopts ); |
282
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
5604 | $("#primary_end_brix").jqxTooltip({ content: 'Hulpfinctie: de afgelezen °Brix RI waarde met een refractometer.' }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
5605 | $("#primary_end_brix").jqxNumberInput( Spin1dec ); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
5606 | $("#primary_svg").jqxTooltip({ content: 'De schijnbare vergisting graad behaald na de hoofdgisting.' }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5607 | $("#primary_svg").jqxNumberInput( Show1dec ); |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
5608 | $("#primary_end_date").jqxTooltip({ content: 'De eind datum van de hoofdvergisting en eventueel overhevelen.' }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5609 | $("#primary_end_date").jqxDateTimeInput( Dateopts ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5610 | $('#primary_end_date').on('close', function (event) { calcStage(); }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5611 | $("#secondary_temp").jqxNumberInput( YeastT ); |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
5612 | $("#secondary_end_date").jqxTooltip({ content: 'De eind datum van de navergisting en het begin van het lageren.' }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5613 | $("#secondary_end_date").jqxDateTimeInput( Dateopts ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5614 | $('#secondary_end_date').on('close', function (event) { calcStage(); }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5615 | $("#tertiary_temp").jqxNumberInput( YeastT ); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5616 | $("#fg").jqxNumberInput( Spin3dec ); |
258
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
5617 | $("#est_fg3").jqxTooltip({ content: 'Het verwachte eind SG. Dit wordt automatisch berekend.' }); |
943fbe0e9fd6
Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents:
256
diff
changeset
|
5618 | $("#est_fg3").jqxNumberInput( Show3dec ); |
282
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
5619 | $("#final_brix").jqxTooltip({ content: 'Hulpfinctie: de afgelezen °Brix RI waarde met een refractometer.' }); |
f765249d57d7
ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents:
281
diff
changeset
|
5620 | $("#final_brix").jqxNumberInput( Spin1dec ); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5621 | $("#final_abv").jqxNumberInput( Show1dec ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5622 | $("#final_svg").jqxNumberInput( Show1dec ); |
171
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
5623 | $("#FLog").jqxButton({ template: "info", width: '150px', theme: theme }); |
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
5624 | $("#FLog").click(function () { |
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
5625 | // Open log in a new tab. |
172
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
171
diff
changeset
|
5626 | var url="log_fermentation.php?code=" + dataRecord.code + "&name=" + dataRecord.name; |
171
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
5627 | window.open(url); |
48cf3ea270f8
Removed checkboxes for brew and fermentation logs from the first tab. On the brewday and fermentation tabs added buttons to show log graphs. The buttuns are only enabled if there is a log.
Michiel Broek <mbroek@mbse.eu>
parents:
169
diff
changeset
|
5628 | }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
5629 | |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5630 | // Tab 11, Packaging |
236
4b8e5478d08f
First run to rebuild the prod_edit module to the indexed data types.
Michiel Broek <mbroek@mbse.eu>
parents:
223
diff
changeset
|
5631 | // TODO: high gravity packaging, extra water and recalc abv, color and ibu. |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5632 | $("#package_date").jqxTooltip({ content: 'De verpakkings datum van dit bier.' }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5633 | $("#package_date").jqxDateTimeInput( Dateopts ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5634 | $('#package_date').on('close', function (event) { calcStage(); }); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5635 | $("#st_carb_min2").jqxTooltip({ content: 'Het minimum aanbevolen koolzuur volume voor deze bierstijl.'}); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5636 | $("#st_carb_min2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5637 | $("#st_carb_max2").jqxTooltip({ content: 'Het maximum aamnevolen koolzuur volume voor deze bierstijl.'}); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5638 | $("#st_carb_max2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5639 | $("#bottle_amount").jqxTooltip({ content: 'De totale hoeveelheid te bottelen bier.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5640 | $("#bottle_amount").jqxNumberInput( Spin1dec ); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5641 | $("#keg_amount").jqxTooltip({ content: 'De totale hoeveelheid op fust te zetten bier.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5642 | $("#keg_amount").jqxNumberInput( Spin1dec ); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5643 | $("#bottle_carbonation").jqxTooltip({ content: 'Het gewenste CO2 volume in de flessen.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5644 | $("#bottle_carbonation").jqxNumberInput( Spin2dec ); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5645 | $("#bottle_carbonation").jqxNumberInput({ max: 5 }); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5646 | $("#keg_carbonation").jqxTooltip({ content: 'Het gewenste CO2 volume door de suiker in de fusten.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5647 | $("#keg_carbonation").jqxNumberInput( Spin2dec ); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5648 | $("#keg_carbonation").jqxNumberInput({ max: 5 }); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5649 | $("#bottle_priming_sugar").jqxDropDownList({ |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5650 | theme: theme, |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5651 | source: PrimingSugarAdapter, |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5652 | valueMember: 'id', |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5653 | displayMember: 'nl', |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5654 | width: 180, |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5655 | height: 23, |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5656 | autoDropDownHeight: true |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5657 | }); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5658 | $("#keg_priming_sugar").jqxDropDownList({ |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5659 | theme: theme, |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5660 | source: PrimingSugarAdapter, |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5661 | valueMember: 'id', |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5662 | displayMember: 'nl', |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5663 | width: 180, |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5664 | height: 23, |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5665 | autoDropDownHeight: true |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5666 | }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5667 | $("#bottle_priming_amount").jqxNumberInput( Show1dec ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5668 | $("#keg_priming_amount").jqxNumberInput( Show1dec ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5669 | $("#bottle_priming_total").jqxNumberInput( Show1dec ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5670 | $("#keg_priming_total").jqxNumberInput( Show1dec ); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
162
diff
changeset
|
5671 | $("#keg_forced_carb").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
256
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5672 | $("#keg_pressure").jqxNumberInput( Show1dec ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5673 | $("#bottle_abv").jqxNumberInput( Show1dec ); |
4767a790d1f6
Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents:
255
diff
changeset
|
5674 | $("#keg_abv").jqxNumberInput( Show1dec ); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5675 | $("#bottle_carbonation_temp").jqxNumberInput( YeastT ); |
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5676 | $("#keg_carbonation_temp").jqxNumberInput( YeastT ); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
5677 | |
160
fea87a8d320b
Added more information on the brewday tab. Move almost all screen init widgets in the source so they are in the Tabs order. This should make searching for them easier.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
5678 | // Tab 12, Tasting |
162
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5679 | $("#taste_date").jqxTooltip({ content: 'De proef datum van dit bier.' }); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5680 | $("#taste_date").jqxDateTimeInput( Dateopts ); |
241
e95d2886f49f
Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents:
240
diff
changeset
|
5681 | $('#taste_date').on('close', function (event) { calcStage(); }); |
162
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5682 | $("#taste_rate").jqxTooltip({ content: 'Het cijfer voor dit bier van 1 tot 10.' }); |
245
3649c3d31d15
Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents:
244
diff
changeset
|
5683 | $("#taste_rate").jqxNumberInput( Spin1dec ); |
237
9337b5ff8698
Added calcStage function that will be used to increase the brew process stage.
Michiel Broek <mbroek@mbse.eu>
parents:
236
diff
changeset
|
5684 | $("#taste_rate").jqxNumberInput({ max: 10 }); |
162
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5685 | $("#taste_color").jqxTooltip({ content: 'De kleur van het bier.' }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5686 | $("#taste_color").jqxInput({ theme: theme, width: 320, height: 23 }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5687 | $("#taste_transparency").jqxTooltip({ content: 'De helderheid van het bier.' }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5688 | $("#taste_transparency").jqxInput({ theme: theme, width: 320, height: 23 }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5689 | $("#taste_head").jqxTooltip({ content: 'Het schuim op het bier.' }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5690 | $("#taste_head").jqxInput({ theme: theme, width: 320, height: 23 }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5691 | $("#taste_aroma").jqxTooltip({ content: 'Het aroma van het bier.' }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5692 | $("#taste_aroma").jqxInput({ theme: theme, width: 960, height: 23 }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5693 | $("#taste_taste").jqxTooltip({ content: 'De smaak van het bier.' }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5694 | $("#taste_taste").jqxInput({ theme: theme, width: 960, height: 23 }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5695 | $("#taste_aftertaste").jqxTooltip({ content: 'De nasmaak van het bier.' }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5696 | $("#taste_aftertaste").jqxInput({ theme: theme, width: 960, height: 23 }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5697 | $("#taste_mouthfeel").jqxTooltip({ content: 'Het mondgevoelvan het bier.' }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5698 | $("#taste_mouthfeel").jqxInput({ theme: theme, width: 960, height: 23 }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5699 | $("#taste_notes").jqxTooltip({ content: 'Het oordeel en opmerkingen over dit bier.' }); |
45248acb6252
Added contents on the Taste tab. Fixed a locked checkbox bug. Disable tabs depending on the project stage.
Michiel Broek <mbroek@mbse.eu>
parents:
161
diff
changeset
|
5700 | $("#taste_notes").jqxInput({ theme: theme, width: 960, height: 100 }); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
5701 | |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5702 | $('#jqxTabs').jqxTabs({ |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5703 | theme: theme, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5704 | width: 1280, |
283
879b81864e4e
The product and recipe editors disable the top menu so the user is forced to exit using the buttons on the first tab.
Michiel Broek <mbroek@mbse.eu>
parents:
282
diff
changeset
|
5705 | height: 660, |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5706 | autoHeight: false, |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5707 | position: 'top' |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5708 | }); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5709 | |
112
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5710 | // Buttons below |
177
325bd6425978
Added products beerxml export.
Michiel Broek <mbroek@mbse.eu>
parents:
172
diff
changeset
|
5711 | $("#Export").jqxButton({ template: "info", width: '80px', theme: theme }); |
316
82c3bb9a40c2
See if we can solve the sometimes not saved data.
Michiel Broek <mbroek@mbse.eu>
parents:
315
diff
changeset
|
5712 | $("#Export").bind('click', function () { |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
5713 | saveRecord(); |
302
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
301
diff
changeset
|
5714 | var url="prod_export.php?record=" + my_record + "&return=" + my_return + "&select=" + my_select + |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
301
diff
changeset
|
5715 | "&code=" + dataRecord.code + "&name=" + dataRecord.name; |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
301
diff
changeset
|
5716 | window.location.href = url; |
177
325bd6425978
Added products beerxml export.
Michiel Broek <mbroek@mbse.eu>
parents:
172
diff
changeset
|
5717 | }); |
325bd6425978
Added products beerxml export.
Michiel Broek <mbroek@mbse.eu>
parents:
172
diff
changeset
|
5718 | |
112
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5719 | $("#Delete").jqxButton({ template: "danger", width: '80px', theme: theme }); |
316
82c3bb9a40c2
See if we can solve the sometimes not saved data.
Michiel Broek <mbroek@mbse.eu>
parents:
315
diff
changeset
|
5720 | $("#Delete").bind('click', function () { |
112
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5721 | // Open a popup to confirm this action. |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5722 | $('#eventWindow').jqxWindow('open'); |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5723 | $("#delOk").click(function () { |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
5724 | var data = "delete=true&" + $.param({ uuid: dataRecord.uuid }); |
112
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5725 | $.ajax({ |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5726 | dataType: 'json', |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5727 | url: url, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5728 | cache: false, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5729 | data: data, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5730 | type: "POST", |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5731 | success: function (data, status, xhr) { |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5732 | // delete command is executed. |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5733 | window.location.href = my_return; |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5734 | }, |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5735 | error: function (jqXHR, textStatus, errorThrown) { |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5736 | } |
112
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5737 | }); |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5738 | }); |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5739 | }); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5740 | |
112
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5741 | $("#Cancel").jqxButton({ template: "primary", width: '80px', theme: theme }); |
316
82c3bb9a40c2
See if we can solve the sometimes not saved data.
Michiel Broek <mbroek@mbse.eu>
parents:
315
diff
changeset
|
5742 | $("#Cancel").bind('click', function () { |
112
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5743 | window.location.href = my_return; |
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5744 | }); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5745 | |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
5746 | $("#Save").jqxButton({ template: "success", width: '80px', theme: theme }); |
316
82c3bb9a40c2
See if we can solve the sometimes not saved data.
Michiel Broek <mbroek@mbse.eu>
parents:
315
diff
changeset
|
5747 | $("#Save").bind('click', function () { |
271
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
5748 | saveRecord(); |
af0270694d1e
Save data before printing or export to beerxml
Michiel Broek <mbroek@mbse.eu>
parents:
267
diff
changeset
|
5749 | window.location.href = my_return; |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
5750 | }); |
112
7ef48396f705
Added some buttons. Only allow product delete if it has no serious data.
Michiel Broek <mbroek@mbse.eu>
parents:
111
diff
changeset
|
5751 | createDelElements(); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5752 | }); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5753 |