Thu, 28 Feb 2019 22:50:58 +0100
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
165 | 1 | <?php |
2 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); | |
3 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); | |
4 | require_once($_SERVER['DOCUMENT_ROOT'].'/fpdf/fpdf.php'); | |
5 | ||
6 | ||
7 | $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); | |
8 | if (! $link) { | |
9 | die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); | |
10 | } | |
11 | if (! mysqli_set_charset($link, "utf8" )) { | |
12 | echo "error"; | |
13 | return 1; | |
14 | } | |
15 | ||
16 | setlocale ( LC_ALL, 'nl_NL.UTF-8'); | |
17 | $record = $_GET["record"]; | |
18 | $result = mysqli_query($link, "SELECT * FROM products WHERE record='".$record."'"); | |
19 | $row = mysqli_fetch_array($result); | |
20 | ||
21 | $total_fermentables = 0.0; | |
22 | $cost_fermentables = 0.0; | |
23 | $total_hops = 0.0; | |
24 | $cost_hops = 0.0; | |
25 | $cost_yeasts = 0.0; | |
26 | $cost_miscs = 0.0; | |
27 | $pSugar = 0; | |
28 | $pCara = 0; | |
29 | $svg = 77; | |
30 | $colorw = 0; | |
31 | $total_ibus = 0; | |
32 | $preboil_sg = 0; | |
275
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
33 | $mashkg = 0; |
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:
165
diff
changeset
|
34 | date_default_timezone_set('Europe/Amsterdam'); |
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:
165
diff
changeset
|
35 | $prdate = date(DATE_RFC2822); |
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:
165
diff
changeset
|
36 | |
165 | 37 | |
38 | class PDF_MySQL_Table extends FPDF | |
39 | { | |
40 | protected $ProcessingTable=false; | |
41 | protected $aCols=array(); | |
42 | protected $TableX; | |
43 | ||
44 | function Header() { | |
45 | // Print the table header if necessary | |
46 | if ($this->ProcessingTable) | |
47 | $this->TableHeader(); | |
48 | } | |
49 | ||
50 | function TableHeader() { | |
51 | $this->SetFont('Helvetica','B',9); | |
52 | $this->SetX($this->TableX); | |
53 | $this->SetFillColor(255,150,100); | |
54 | foreach($this->aCols as $col) | |
55 | $this->Cell($col['w'],5,$col['c'],0,0,$col['a'],true); | |
56 | $this->Ln(); | |
57 | } | |
58 | ||
59 | function AddCol($width=-1, $caption='', $align='L') { | |
60 | $this->aCols[]=array('c'=>$caption,'w'=>$width,'a'=>$align); | |
61 | } | |
62 | ||
63 | function TableGlobal($row) { | |
64 | /* 2 Columns */ | |
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:
165
diff
changeset
|
65 | $recipetype = array( 'Extract', 'Deelmaisch', 'Mout' ); |
165 | 66 | $vul = $this->w - $this->rMargin - $this->lMargin - 160; |
67 | $cMargin=$this->cMargin; | |
68 | $this->cMargin=2; | |
69 | $this->TableX=$this->lMargin; | |
70 | $this->SetFont('Helvetica','B',9); | |
71 | $this->SetX($this->TableX); | |
72 | $this->SetFillColor(255,150,100); | |
73 | $this->Cell(0, 5, 'Recept overzicht',0,0,'C',true); | |
74 | $this->Ln(); | |
75 | ||
76 | $this->SetFont('Helvetica','',9); | |
77 | $this->SetFillColor(210,245,255); | |
78 | ||
79 | $this->SetX($this->TableX); | |
80 | $this->Cell(35,5,'Type',0,0,'L',true); | |
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:
165
diff
changeset
|
81 | $this->Cell(45,5,$recipetype[$row['type']],0,0,'L',true); |
165 | 82 | $this->Cell($vul,5,'',0,0,'L',false); |
83 | $this->Cell(35,5,'Batch grootte',0,0,'L',true); | |
84 | $this->Cell(45,5,$row['batch_size'].' liter',0,0,'L',true); | |
85 | $this->Ln(); | |
86 | ||
87 | $this->SetX($this->TableX); | |
88 | $this->Cell(35,5,'Kooktijd',0,0,'L',true); | |
89 | $this->Cell(45,5,$row['boil_time'].' minuten',0,0,'L',true); | |
90 | $this->Cell($vul,5,'',0,0,'L',false); | |
91 | $this->Cell(35,5,'Brouwzaal rendement',0,0,'L',true); | |
92 | $this->Cell(45,5,$row['efficiency'].' %',0,0,'L',true); | |
93 | $this->Ln(); | |
94 | ||
95 | $this->SetX($this->TableX); | |
96 | $this->Cell(35,5,'Bierstijl',0,0,'L',true); | |
97 | $this->Cell(45,5,$row['st_name'],0,0,'L',true); | |
98 | $this->Cell($vul,5,'',0,0,'L',false); | |
99 | $this->Cell(35,5,'Installatie',0,0,'L',true); | |
100 | $this->Cell(45,5,$row['eq_name'],0,0,'L',true); | |
101 | $this->Ln(10); | |
102 | ||
103 | $this->cMargin=$cMargin; | |
104 | } | |
105 | ||
106 | function TableFermentables($row) { | |
107 | global $cost_fermentables; | |
108 | global $total_fermentables; | |
109 | global $pSugar; | |
110 | global $pCara; | |
111 | global $colorw; | |
112 | global $preboil_sg; | |
275
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
113 | global $mashkg; |
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:
165
diff
changeset
|
114 | $added = array( 'Maischen', 'Koken', 'Vergisten', 'Nagisten/lageren', 'Bottelen' ); |
165 | 115 | $vul = $this->w - $this->rMargin - $this->lMargin - 132; |
116 | $this->AddCol($vul,'Grondstof','L'); | |
117 | $this->AddCol(30,'Leverancier','L'); | |
118 | $this->AddCol(15,'EBC','R'); | |
119 | $this->AddCol(17,'Moment','L'); | |
120 | $this->AddCol(20,'Kg','R'); | |
121 | $this->AddCol(15,'Procent','R'); | |
122 | $this->AddCol(15,'Opbr.','R'); | |
123 | $this->AddCol(20,'Prijs','R'); | |
124 | ||
125 | $cMargin=$this->cMargin; | |
126 | $this->cMargin=2; | |
127 | $this->TableX=$this->lMargin; | |
128 | $this->TableHeader(); | |
129 | $this->ProcessingTable=true; | |
130 | ||
131 | $sugarsf = 0; | |
132 | $sugarsm = 0; | |
275
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
133 | $mashkg = 0; |
165 | 134 | $this->SetFont('Helvetica','',9); |
135 | $this->SetFillColor(250, 195, 65); | |
136 | $arr = json_decode($row['json_fermentables'], true); | |
137 | foreach($arr as $item) { //foreach element in $arr | |
138 | $name = iconv('UTF-8','windows-1252',$item['f_name']); | |
139 | $supplier = iconv('UTF-8','windows-1252',$item['f_supplier']); | |
140 | $amount = floatval($item['f_amount']); | |
141 | $costkg = floatval($item['f_cost']); | |
142 | $yield = floatval($item['f_yield']); | |
143 | $moisture = floatval($item['f_moisture']); | |
144 | $color = floatval($item['f_color']); | |
145 | $percent = floatval($item['f_percentage']); | |
146 | ||
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:
165
diff
changeset
|
147 | if ($item['f_type'] == 1) // Sugar |
165 | 148 | $pSugar += $percent; |
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:
165
diff
changeset
|
149 | if ($item['f_graintype'] == 2) // Crystal |
165 | 150 | $pCara += $percent; |
151 | ||
152 | $cost = $amount * $costkg; | |
153 | $cost_fermentables += $cost; | |
154 | $total_fermentables += $amount; | |
155 | /* Calculate the amount of sugars */ | |
156 | $d = $amount * ($yield / 100) * (1 - $moisture / 100); | |
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:
165
diff
changeset
|
157 | if ($item['f_added'] == 0) { |
165 | 158 | $d = floatval($row['efficiency']) / 100 * $d; |
159 | $sugarsm += $d; | |
275
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
160 | $mashkg += $amount; |
165 | 161 | } |
162 | $sugarsf += $d; | |
163 | $colorw += ($amount * ebc_to_srm($color) / $row['batch_size']) * 8.34436; | |
164 | ||
165 | $this->Cell($vul,5,$name,0,0,'L',true); | |
166 | $this->Cell(30,5,$supplier,0,0,'L',true); | |
167 | $this->Cell(15,5,sprintf("%.0f",$color),0,0,'R',true); | |
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:
165
diff
changeset
|
168 | $this->Cell(17,5,$added[$item['f_added']],0,0,'L',true); |
165 | 169 | $this->Cell(20,5,sprintf("%8.3f",$amount),0,0,'R',true); |
170 | $this->Cell(15,5,sprintf("%.1f%%",$percent),0,0,'R',true); | |
171 | $this->Cell(15,5,sprintf("%.1f%%",$yield),0,0,'R',true); | |
172 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); | |
173 | $this->Ln(); | |
174 | } | |
175 | ||
176 | $row['est_og'] = estimate_sg($sugarsf, floatval($row['batch_size'])); | |
177 | $preboil_sg = estimate_sg($sugarsm, floatval($row['boil_size'])); | |
178 | $this->SetFillColor(210,245,255); | |
179 | $this->Cell($vul+62,5,'',0,0,'L',false); | |
180 | $this->Cell(20,5,sprintf("%8.3f",$total_fermentables),0,0,'R',true); | |
181 | $this->Cell(30,5,'',0,0,'L',false); | |
182 | $this->Cell(20,5,sprintf("%8.3f",$cost_fermentables).EURO,0,0,'R',true); | |
183 | $this->Ln(10); | |
184 | $this->ProcessingTable=false; | |
185 | $this->cMargin=$cMargin; | |
186 | $this->aCols=array(); | |
187 | } | |
188 | ||
189 | function TableHops($row) { | |
190 | global $total_hops; | |
191 | global $total_ibus; | |
192 | global $cost_hops; | |
193 | global $preboil_sg; | |
289
4082c41f45e9
Added the use and calculation of wet hops. Assume 5.5 times more hops needed by weight.
Michiel Broek <mbroek@mbse.eu>
parents:
279
diff
changeset
|
194 | $hopform = array( 'Pellets', 'Plugs', 'Bellen', 'Hop nat' ); |
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:
165
diff
changeset
|
195 | $hopuse = array( 'Maischen', 'First wort', 'Koken', 'Vlamuit', 'Whirlpool', 'Koudhop' ); |
165 | 196 | $vul = $this->w - $this->rMargin - $this->lMargin - 135; |
197 | $this->AddCol($vul,'Hop','L'); | |
198 | $this->AddCol(35,'Land','L'); | |
199 | $this->AddCol(15,'Soort','L'); | |
200 | $this->AddCol(20,'Moment','L'); | |
201 | $this->AddCol(15,'Alpha','R'); | |
202 | $this->AddCol(12,'IBU','R'); | |
203 | $this->AddCol(18,'Gram','R'); | |
204 | $this->AddCol(20,'Prijs','R'); | |
205 | ||
206 | $cMargin=$this->cMargin; | |
207 | $this->cMargin=2; | |
208 | $this->TableX=$this->lMargin; | |
209 | $this->TableHeader(); | |
210 | $this->ProcessingTable=true; | |
211 | ||
212 | $this->SetFont('Helvetica','',9); | |
213 | $this->SetFillColor(100, 250, 65); | |
214 | ||
215 | $arr = json_decode($row['json_hops'], true); | |
216 | foreach($arr as $item) { //foreach element in $arr | |
217 | $name = iconv('UTF-8','windows-1252',$item['h_name']); | |
218 | $origin = iconv('UTF-8','windows-1252',$item['h_origin']); | |
219 | $amount = floatval($item['h_amount']) * 1000; | |
220 | $mass = $amount; | |
221 | $costkg = floatval($item['h_cost']); | |
222 | $time = floatval($item['h_time']); | |
223 | $alpha = floatval($item['h_alpha']); | |
224 | ||
225 | $cost = ($amount * $costkg) / 1000; | |
226 | $cost_hops += $cost; | |
227 | $total_hops += $amount; | |
228 | ||
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:
165
diff
changeset
|
229 | $moment = $hopuse[$item['h_useat']]; |
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:
165
diff
changeset
|
230 | if ($item['h_useat'] == 2) { // Boil |
165 | 231 | $moment = "Kook@".$time; |
232 | } | |
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:
165
diff
changeset
|
233 | $ibu = calc_IBU($item['h_useat'], $item['h_form'], $preboil_sg, floatval($row['batch_size']), $mass, $time, $alpha, $row['ibu_method']); |
165 | 234 | $total_ibus += $ibu; |
235 | ||
236 | $this->Cell($vul,5,$name,0,0,'L',true); | |
237 | $this->Cell(35,5,$origin,0,0,'L',true); | |
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:
165
diff
changeset
|
238 | $this->Cell(15,5,$hopform[$item['h_form']],0,0,'L',true); |
165 | 239 | $this->Cell(20,5,$moment,0,0,'L',true); |
240 | $this->Cell(15,5,sprintf("%.1f%%",$alpha),0,0,'R',true); | |
241 | $this->Cell(12,5,sprintf("%.1f",$ibu),0,0,'R',true); | |
242 | $this->Cell(18,5,sprintf("%.1f",$amount),0,0,'R',true); | |
243 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); | |
244 | $this->Ln(); | |
245 | } | |
246 | ||
247 | $this->SetFillColor(210,245,255); | |
248 | $this->Cell($vul+85,5,'',0,0,'L',false); | |
249 | $this->Cell(12,5,sprintf("%.1f",$total_ibus),0,0,'R',true); | |
250 | $this->Cell(18,5,sprintf("%.1f",$total_hops),0,0,'R',true); | |
251 | $this->Cell(20,5,sprintf("%8.3f",$cost_hops).EURO,0,0,'R',true); | |
252 | $this->Ln(10); | |
253 | $this->ProcessingTable=false; | |
254 | $this->cMargin=$cMargin; | |
255 | $this->aCols=array(); | |
256 | } | |
257 | ||
258 | function TableYeasts($row) { | |
259 | global $cost_yeasts; | |
260 | global $svg; | |
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:
165
diff
changeset
|
261 | $yeastform = array( 'Vloeibaar', 'Droog', 'Schuine buis', 'Slurry', 'Ingevroren', 'Depot' ); |
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:
165
diff
changeset
|
262 | $yeastuse = array( 'Hoofdgisting', 'Nagisting', 'Lagering', 'Bottelen' ); |
165 | 263 | $vul = $this->w - $this->rMargin - $this->lMargin - 140; |
264 | $this->AddCol(27,'Laboratorium','L'); | |
265 | $this->AddCol(18,'Product','L'); | |
266 | $this->AddCol($vul,'Gist','L'); | |
267 | $this->AddCol(20,'Gebruik','L'); | |
268 | $this->AddCol(15,'Attn','R'); | |
269 | $this->AddCol(22,'Vorm','L'); | |
270 | $this->AddCol(18,'Gram','R'); | |
271 | $this->AddCol(20,'Prijs','R'); | |
272 | ||
273 | $cMargin=$this->cMargin; | |
274 | $this->cMargin=2; | |
275 | $this->TableX=$this->lMargin; | |
276 | $this->TableHeader(); | |
277 | $this->ProcessingTable=true; | |
278 | ||
279 | $this->SetFont('Helvetica','',9); | |
280 | $this->SetFillColor(175, 175, 255); | |
281 | ||
282 | $arr = json_decode($row['json_yeasts'], true); | |
283 | foreach($arr as $item) { //foreach element in $arr | |
284 | $name = iconv('UTF-8','windows-1252',$item['y_name']); | |
285 | $laboratory = iconv('UTF-8','windows-1252',$item['y_laboratory']); | |
286 | $product_id = iconv('UTF-8','windows-1252',$item['y_product_id']); | |
287 | $attenuation = floatval($item['y_attenuation']); | |
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:
165
diff
changeset
|
288 | $cost = floatval($item['y_amount']) * floatval($item['y_cost']); |
165 | 289 | $cost_yeasts += $cost; |
290 | ||
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:
165
diff
changeset
|
291 | if ($item['y_use'] == 0) // Primary |
165 | 292 | $svg = $attenuation; |
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:
165
diff
changeset
|
293 | if ($item['y_form'] == 0) // Liquid |
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:
165
diff
changeset
|
294 | $amount = sprintf("%.0f",floatval($item['y_amount']))." pak"; |
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:
165
diff
changeset
|
295 | else if ($item['y_form'] == 1) // Dry |
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:
165
diff
changeset
|
296 | $amount = sprintf("%.1f",floatval($item['y_amount'])*1000)." gr"; |
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:
165
diff
changeset
|
297 | 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:
165
diff
changeset
|
298 | $amount = sprintf("%.0f",floatval($item['y_amount'])*1000)." ml"; |
165 | 299 | |
300 | $this->Cell(27,5,$laboratory,0,0,'L',true); | |
301 | $this->Cell(18,5,$product_id,0,0,'L',true); | |
302 | $this->Cell($vul,5,$name,0,0,'L',true); | |
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:
165
diff
changeset
|
303 | $this->Cell(20,5,$yeastuse[$item['y_use']],0,0,'L',true); |
165 | 304 | $this->Cell(15,5,sprintf("%.1f%%",$attenuation),0,0,'R',true); |
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:
165
diff
changeset
|
305 | $this->Cell(22,5,$yeastform[$item['y_form']],0,0,'L',true); |
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:
165
diff
changeset
|
306 | $this->Cell(18,5,$amount,0,0,'R',true); |
165 | 307 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); |
308 | $this->Ln(); | |
309 | } | |
293
db898ec73277
Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents:
289
diff
changeset
|
310 | if ($row['starter_enable']) { |
db898ec73277
Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents:
289
diff
changeset
|
311 | $v = floatval($row['prop1_volume']) + floatval($row['prop2_volume']) + floatval($row['prop3_volume']) + floatval($row['prop4_volume']); |
db898ec73277
Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents:
289
diff
changeset
|
312 | if ($v) { |
db898ec73277
Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents:
289
diff
changeset
|
313 | $this->Cell(45,5,'',0,0,'L',true); |
db898ec73277
Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents:
289
diff
changeset
|
314 | $this->Cell($vul,5,"Giststarter ".sprintf("%.2f",$v)." liter",0,0,'L',true); |
db898ec73277
Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents:
289
diff
changeset
|
315 | $this->Cell(20,5,"Tevoren",0,0,'L',true); |
db898ec73277
Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents:
289
diff
changeset
|
316 | $this->Cell(75,5,'',0,0,'L',true); |
db898ec73277
Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents:
289
diff
changeset
|
317 | $this->Ln(); |
db898ec73277
Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents:
289
diff
changeset
|
318 | } |
db898ec73277
Show yeast starter on printed page
Michiel Broek <mbroek@mbse.eu>
parents:
289
diff
changeset
|
319 | } |
165 | 320 | |
321 | $this->SetFillColor(210,245,255); | |
322 | $this->Cell($vul+120,5,'',0,0,'L',false); | |
323 | $this->Cell(20,5,sprintf("%8.3f",$cost_yeasts).EURO,0,0,'R',true); | |
324 | $this->Ln(10); | |
325 | $this->ProcessingTable=false; | |
326 | $this->cMargin=$cMargin; | |
327 | $this->aCols=array(); | |
328 | } | |
329 | ||
330 | function TableMiscs($row) { | |
331 | global $cost_miscs; | |
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:
165
diff
changeset
|
332 | $misctype = array( 'Specerij', 'Kruid', 'Smaakstof', 'Klaringsmiddel', 'Brouwzout', 'Gistvoeding', 'Anders' ); |
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:
165
diff
changeset
|
333 | $miscuse = array( 'Starter', 'Maischen', 'Koken', 'Hoofdvergisting', 'Nagisting/lagering', 'Bottelen' ); |
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:
165
diff
changeset
|
334 | $vul = $this->w - $this->rMargin - $this->lMargin - 100; |
165 | 335 | $this->AddCol($vul,'Naam','L'); |
336 | $this->AddCol(30,'Soort','L'); | |
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:
165
diff
changeset
|
337 | $this->AddCol(30,'Gebruik','L'); |
165 | 338 | $this->AddCol(20,'Hoeveel','R'); |
339 | $this->AddCol(20,'Prijs','R'); | |
340 | ||
341 | $cMargin=$this->cMargin; | |
342 | $this->cMargin=2; | |
343 | $this->TableX=$this->lMargin; | |
344 | $this->TableHeader(); | |
345 | $this->ProcessingTable=true; | |
346 | ||
347 | $this->SetFont('Helvetica','',9); | |
348 | $this->SetFillColor(175, 175, 255); | |
349 | ||
350 | $arr = json_decode($row['json_miscs'], true); | |
351 | foreach($arr as $item) { | |
352 | $name = iconv('UTF-8','windows-1252',$item['m_name']); | |
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:
165
diff
changeset
|
353 | $type = $item['m_type']; |
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:
165
diff
changeset
|
354 | $use_use = $item['m_use_use']; |
165 | 355 | $amount = floatval($item['m_amount']) * 1000; |
356 | $costg = floatval($item['m_cost']) / 1000; | |
357 | $time = floatval($item['m_time']); | |
358 | $aiw = $item['m_amount_is_weight']; | |
359 | $cost = $amount * $costg; | |
360 | $cost_miscs += $cost; | |
361 | ||
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:
165
diff
changeset
|
362 | if ($type == 4) // Water agent |
165 | 363 | $this->SetFillColor(240,140,130); |
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:
165
diff
changeset
|
364 | else if ($type == 3) // Fining |
165 | 365 | $this->SetFillColor(95,180,25); |
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:
165
diff
changeset
|
366 | else if (($type == 0) || ($type == 1) || ($type == 2) || ($type == 5)) // Spice, Herb, Flavour, Yeast nutrient |
165 | 367 | $this->SetFillColor(240,250,65); |
368 | else | |
369 | $this->SetFillColor(210,245,255); | |
370 | ||
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:
165
diff
changeset
|
371 | if ($use_use == 2) // Boil |
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:
165
diff
changeset
|
372 | $gebruik = sprintf("%s %d min",$miscuse[$use_use],$time); |
165 | 373 | else |
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:
165
diff
changeset
|
374 | $gebruik = $miscuse[$use_use]; |
165 | 375 | |
376 | $hoeveel = sprintf("%.1f %s",$amount,$aiw ? "gr":"ml"); | |
377 | $this->Cell($vul,5,$name,0,0,'L',true); | |
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:
165
diff
changeset
|
378 | $this->Cell(30,5,$misctype[$type],0,0,'L',true); |
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:
165
diff
changeset
|
379 | $this->Cell(30,5,$gebruik,0,0,'L',true); |
165 | 380 | $this->Cell(20,5,$hoeveel,0,0,'R',true); |
381 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); | |
382 | $this->Ln(); | |
383 | } | |
384 | ||
385 | $this->SetFillColor(210,245,255); | |
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
|
386 | $this->Cell($vul+80,5,'',0,0,'L',false); |
165 | 387 | $this->Cell(20,5,sprintf("%8.3f",$cost_miscs).EURO,0,0,'R',true); |
388 | $this->Ln(10); | |
389 | ||
390 | $this->ProcessingTable=false; | |
391 | $this->cMargin=$cMargin; | |
392 | $this->aCols=array(); | |
393 | } | |
394 | ||
395 | // Watercolor $this->SetFillColor(120,255,250); | |
396 | ||
397 | function TableSummary($row) { | |
398 | global $pSugar; | |
399 | global $pCara; | |
400 | global $svg; | |
401 | global $colorw; | |
402 | global $cost_fermentables; | |
403 | global $cost_hops; | |
404 | global $cost_miscs; | |
405 | global $cost_yeasts; | |
275
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
406 | global $mashkg; |
165 | 407 | /* 2 Columns */ |
408 | $vul = $this->w - $this->rMargin - $this->lMargin - 170; | |
409 | $cMargin=$this->cMargin; | |
410 | $this->cMargin=2; | |
411 | $this->TableX=$this->lMargin; | |
412 | $this->SetFont('Helvetica','B',9); | |
413 | $this->SetX($this->TableX); | |
414 | $this->SetFillColor(255,150,100); | |
415 | $this->Cell(0, 5, 'Recept samenvatting',0,0,'C',true); | |
416 | $this->Ln(); | |
417 | ||
418 | $this->SetFont('Helvetica','',9); | |
419 | $this->SetFillColor(210,245,255); | |
420 | ||
275
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
421 | $mashtime = 0; |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
422 | $mashtemp = 0; |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
423 | $mash_infuse = 0; |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
424 | $arr = json_decode($row['json_mashs'], true); |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
425 | foreach($arr as $item) { |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
426 | if ($item['step_type'] == 0) { // infusion |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
427 | $mash_infuse += floatval($item['step_infuse_amount']); |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
428 | } |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
429 | if ($item['step_temp'] < 75) { // ignore mashout temps |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
430 | $mashtime += floatval($item['step_time']); |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
431 | $mashtemp += floatval($item['step_time']) * floatval($item['step_temp']); |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
432 | } |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
433 | } |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
434 | $mashtemp = $mashtemp / $mashtime; |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
435 | if (($mashkg > 0) && ($mash_infuse > 0) && ($mashtime > 0) && ($mashtemp > 0)) { |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
436 | $row['est_fg'] = estimate_fg($pSugar, $pCara, $mash_infuse / $mashkg, $mashtime, $mashtemp, $svg, $row['est_og']); |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
437 | } else { |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
438 | $row['est_fg'] = estimate_fg($pSugar, $pCara, 0, 0, 0, $svg, $row['est_og']); |
fb1e88f1c643
Better fg estimation in product print.
Michiel Broek <mbroek@mbse.eu>
parents:
247
diff
changeset
|
439 | } |
165 | 440 | |
441 | $this->SetX($this->TableX); | |
442 | $this->Cell(35,5,'Start SG',0,0,'L',true); | |
443 | $this->Cell(25,5,sprintf("%.3f",$row['est_og']),0,0,'L',true); | |
444 | $this->Cell(25,5,'('.sprintf("%.3f",$row['st_og_min']).' - '.sprintf("%.3f",$row['st_og_max']).')',0,0,'L',true); | |
445 | $this->Cell($vul,5,'',0,0,'L',false); | |
446 | $this->Cell(35,5,'Eind SG',0,0,'L',true); | |
447 | $this->Cell(25,5,sprintf("%.3f",$row['est_fg']),0,0,'L',true); | |
448 | $this->Cell(25,5,'('.sprintf("%.3f",$row['st_fg_min']).' - '.sprintf("%.3f",$row['st_fg_max']).')',0,0,'L',true); | |
449 | $this->Ln(); | |
450 | ||
451 | $row['est_abv'] = abvol($row['est_og'], $row['est_fg']); | |
452 | $this->SetX($this->TableX); | |
453 | $this->Cell(35,5,'Geschat alcohol',0,0,'L',true); | |
454 | $this->Cell(25,5,sprintf("%.1f",$row['est_abv']).'%',0,0,'L',true); | |
455 | $this->Cell(25,5,'('.sprintf("%.1f",$row['st_abv_min']).' - '.sprintf("%.1f",$row['st_abv_max']).'%)',0,0,'L',true); | |
456 | $this->Cell($vul,5,'',0,0,'L',false); | |
457 | $this->Cell(35,5,'CO2',0,0,'L',true); | |
458 | $this->Cell(25,5,sprintf("%.1f",$row['est_carb']).'%',0,0,'L',true); | |
459 | $this->Cell(25,5,'('.sprintf("%.1f",$row['st_carb_min']).' - '.sprintf("%.1f",$row['st_carb_max']).'%)',0,0,'L',true); | |
460 | $this->Ln(); | |
461 | ||
462 | $row['est_color'] = kw_to_ebc($row['color_method'], $colorw); | |
463 | $this->SetX($this->TableX); | |
464 | $this->Cell(35,5,'Kleur ('.$row['color_method'].')',0,0,'L',true); | |
465 | $beercolor = ebc_to_color($row['est_color']); | |
466 | if ($row['est_color'] > 30) | |
467 | $this->SetTextColor(250); | |
468 | $this->SetFillColor($beercolor[0],$beercolor[1],$beercolor[2]); | |
469 | $this->Cell(25,5,$row['est_color'].' EBC',0,0,'L',true); | |
470 | $this->Cell(25,5,'('.$row['st_color_min'].' - '.$row['st_color_max'].' EBC)',0,0,'L',true); | |
471 | $this->SetTextColor(0); | |
472 | $this->SetFillColor(210,245,255); | |
473 | $this->Cell($vul,5,'',0,0,'L',false); | |
474 | $this->Cell(35,5,'Bitterheid ('.$row['ibu_method'].')',0,0,'L',true); | |
475 | $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true); | |
476 | $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true); | |
477 | $this->Ln(); | |
478 | ||
479 | $this->SetX($this->TableX); | |
480 | $cost_total = $cost_fermentables + $cost_hops + $cost_miscs + $cost_yeasts; | |
481 | $this->Cell(35,5,'Kosten',0,0,'L',true); | |
482 | $this->Cell(25,5,sprintf("%.2f",$cost_total).EURO,0,0,'L',true); | |
483 | $this->Cell(25,5,sprintf("%.2f",$cost_total/$row['batch_size']).EURO.' / liter',0,0,'L',true); | |
484 | $this->Ln(10); | |
485 | ||
486 | ||
487 | // Kostprijs per liter, calorieren | |
488 | $this->cMargin=$cMargin; | |
489 | } | |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
490 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
491 | function Checkheader($text) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
492 | $this->SetFont('Arial','B',10); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
493 | $this->Cell(0, 4,$text,0,0,'L',true); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
494 | $this->SetFont('Arial','',10); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
495 | $this->Ln(6); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
496 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
497 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
498 | function Checkline($text) { |
276
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
499 | // $this->SetX(5); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
500 | $this->Cell(2, 4,' ',0,0,'L',true); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
501 | $this->Cell(4, 4,' ',1,0,'L',true); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
502 | // $this->Rect(10,$this->GetY(),4,4); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
503 | // $this->SetX(15); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
504 | $this->Cell(0, 4,' '.$text,0,1,'L',true); |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
505 | $this->Ln(1); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
506 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
507 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
508 | function Checklist($row) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
509 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
510 | global $my_grain_absorbtion; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
511 | global $my_brix_correction; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
512 | $mashwater = 0; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
513 | $numsalts = 0; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
514 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
515 | $this->AddPage(); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
516 | $this->SetFillColor(255,255,255); |
279
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
517 | |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
518 | if ($row['starter_enable'] && $row['prop1_volume']) { |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
519 | $this->Checkheader('Giststarter maken'); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
520 | $days = 0; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
521 | $last = 0; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
522 | for ($i = 1; $i < 5; $i++) { |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
523 | $pt = "prop".$i."_type"; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
524 | $pv = "prop".$i."_volume"; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
525 | if (floatval($row[$pv])) { |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
526 | $last = $i; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
527 | if ($row[$pt] == 0) |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
528 | $days += 2; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
529 | else if ($row[$pt] == 1) |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
530 | $days += 4; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
531 | else |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
532 | $days += 6; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
533 | } |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
534 | } |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
535 | $this->Checkline("begin ongeveer ".$days." dagen voor de brouwdag met de giststarter"); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
536 | for ($i = 1; $i < 5; $i++) { |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
537 | $pt = "prop".$i."_type"; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
538 | $pv = "prop".$i."_volume"; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
539 | if (floatval($row[$pv])) { |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
540 | $s = "Starter stap ".$i.", van ".sprintf("%.3f",floatval($row[$pv])); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
541 | $s .= " liter maken met SG ".sprintf("%.3f",floatval($row['starter_sg'])); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
542 | $this->Checkline($s); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
543 | if ($row[$pt] == 0) { |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
544 | $s = "ongeveer 24 uur op een magneetroerder"; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
545 | } else if ($row[$pt] == 1) { |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
546 | $s = "enkele dagen regelmatig schudden"; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
547 | } else { |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
548 | $s = "bijna een week rustig laten staan"; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
549 | } |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
550 | $s .= " tot er voldoende gist is"; |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
551 | $this->Checkline($s); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
552 | if ($i < $last) { |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
553 | $this->Checkline("starter minstens 24 uur in de koeling laten uitzakken"); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
554 | $this->Checkline("starter uit de koelkast halen en afgieten"); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
555 | } else { |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
556 | $this->Checkline("starter in de koeling zetten tot de brouwdag"); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
557 | $this->Checkline("starter op de brouwdag uit de koelkast halen en afgieten"); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
558 | } |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
559 | } |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
560 | } |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
561 | $this->Ln(5); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
562 | } |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
563 | |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
564 | $this->Checkheader('Water en -behandeling'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
565 | if ($row['w1_name']) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
566 | $this->Checkline(sprintf("%.1f",floatval($row['w1_amount'])).' liter water '.$row['w1_name']); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
567 | $mashwater += floatval($row['w1_amount']); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
568 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
569 | if ($row['w2_name']) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
570 | $this->Checkline(sprintf("%.1f",floatval($row['w2_amount'])).' liter water '.$row['w2_name']); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
571 | $mashwater += floatval($row['w2_amount']); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
572 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
573 | $arr = json_decode($row['json_miscs'], true); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
574 | foreach($arr as $item) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
575 | if ($item['m_type'] == 4) { // Only the water agents |
276
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
576 | $unit = ($item['m_amount_is_weight']) ? " gram ":" ml "; |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
577 | $this->Checkline(sprintf("%.1f",floatval($item['m_amount'] * 1000)).$unit.$item['m_name']); |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
578 | $numsalts++; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
579 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
580 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
581 | $this->Ln(5); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
582 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
583 | $this->Checkheader('Mout afwegen en schroten'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
584 | $arr = json_decode($row['json_fermentables'], true); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
585 | foreach($arr as $item) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
586 | if ($item['f_added'] == 0) { // to mash |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
587 | $s = sprintf("%.3f",floatval($item['f_amount'])).' kg '; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
588 | $s .= iconv('UTF-8','windows-1252',$item['f_name']); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
589 | $s .= ' ('.iconv('UTF-8','windows-1252',$item['f_supplier']).')'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
590 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
591 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
592 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
593 | $this->Checkline('mout schroten'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
594 | $this->Ln(5); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
595 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
596 | $this->Checkheader('Maischen'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
597 | $mvol = 0; |
247
792b5ba77a1f
The checklist now shows the pre-boil gravity.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
598 | $msugars = 0; // mash sugars |
279
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
599 | $grainabsorbtion = 0; |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
600 | $arr = json_decode($row['json_mashs'], true); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
601 | if (count($arr) > 0) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
602 | $loop = 0; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
603 | foreach($arr as $item) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
604 | if ($item['step_type'] == 0) |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
605 | $mvol += $item['step_infuse_amount']; // We need this later. |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
606 | if ($loop == 0) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
607 | $s = sprintf("%.1f",$mashwater).' liter water opwarmen tot '; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
608 | $s .= sprintf("%.1f",$item['step_temp']).' '.DEG.'C ('; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
609 | $s .= sprintf("%.1f",kettle_cm($mashwater,$row['eq_tun_volume'],$row['eq_tun_height'])); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
610 | $s .= ' cm onder de rand)'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
611 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
612 | if ($numsalts > 0) |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
613 | $this->Checkline('brouwzouten en -zuren toevoegen'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
614 | $this->Checkline('mout storten en inmaischen'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
615 | $hops = json_decode($row['json_hops'], true); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
616 | foreach($hops as $item2) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
617 | if ($item2['h_useat'] == 0) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
618 | $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
619 | $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' toevoegen'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
620 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
621 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
622 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
623 | $this->Checkline($item['step_time'].' min. bij '.$item['step_temp'].' '.DEG.'C'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
624 | $this->Checkline('pH meten en bijstellen (doel pH beslag: '.sprintf("%.1f",$row['mash_ph']).' pH)'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
625 | } else { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
626 | if ($item['step_type'] == 0) { // Infusion |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
627 | $s = 'toevoegen '.$item['step_infuse_amount'].' liter water van xx '.DEG.'C'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
628 | } else if ($item['step_type'] == 1) { // Direct heat |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
629 | $s = 'opwarmen tot '.$item['step_temp'].' '.DEG.'C'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
630 | } else { // Decoction |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
631 | $s = 'uitnemen, opwarmen, koken en terugstorten van '.$item['step_infuse_amount'].' liter deelbeslag'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
632 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
633 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
634 | $this->Checkline($item['step_time'].' min. bij '.$item['step_temp'].' '.DEG.'C'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
635 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
636 | $loop++; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
637 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
638 | $est_mash_sg = 0; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
639 | $ferms = json_decode($row['json_fermentables'], true); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
640 | foreach($ferms as $item) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
641 | if ($item['f_added'] == 0) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
642 | $d = $item['f_amount'] * ($item['f_yield'] / 100) * (1 - $item['f_moisture'] / 100); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
643 | $mvol += $item['f_amount'] * $item['f_moisture'] / 100; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
644 | $grainabsorbtion += $my_grain_absorbtion * $item['f_amount']; |
247
792b5ba77a1f
The checklist now shows the pre-boil gravity.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
645 | $msugars += $d; |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
646 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
647 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
648 | $sugardensity = 1.611; |
247
792b5ba77a1f
The checklist now shows the pre-boil gravity.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
649 | $v = $msugars / $sugardensity + $mvol; |
792b5ba77a1f
The checklist now shows the pre-boil gravity.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
650 | $plato = 1000 * $msugars / ($v * 10); // deg. Plato |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
651 | $mash_sg = plato_to_sg($plato); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
652 | $brix = $plato * $my_brix_correction; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
653 | $s = 'doel sg eind maischen: '.sprintf("%.3f",$mash_sg); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
654 | $s .= ' SG ('.sprintf("%.1f",$brix).' '.DEG.'Brix, '.sprintf("%.1f",$plato).' '.DEG.'P)'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
655 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
656 | } |
279
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
657 | if ($this->GetY() > 200) |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
658 | $this->AddPage(); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
659 | else |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
660 | $this->Ln(5); |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
661 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
662 | $acidtype = array( 'Melkzuur', 'Zoutzuur', 'Fosforzuur', 'Zwavelzuur' ); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
663 | $this->Checkheader('Filteren en spoelen'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
664 | $s = sprintf("%.1f",$row['sparge_volume']).' liter spoelwater opwarmen tot '.sprintf("%.1f",$row['sparge_temp']).' '.DEG.'C'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
665 | $this->Checkline($s); |
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:
243
diff
changeset
|
666 | $s = 'spoelwater aanzuren tot pH <= '.sprintf("%.1f",$row['sparge_ph']).' met '; |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
667 | $s .= sprintf("%.1f",$row['sparge_acid_amount']*1000).' ml. '.$acidtype[$row['sparge_acid_type']]; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
668 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
669 | $spoelw = ($row['boil_size'] - $mashwater + $grainabsorbtion + $row['eq_lauter_deadspace']) * 1.03; // A small heat correction |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
670 | $this->Checkline('spoelen met ongeveer '.sprintf("%.1f",$spoelw).' liter spoelwater'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
671 | $s = 'doelvolume in kookketel: '.sprintf("%.1f",$row['boil_size'] * 1.04).' liter ('; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
672 | $s .= sprintf("%.1f",kettle_cm($row['boil_size'] * 1.04,$row['eq_kettle_volume'],$row['eq_kettle_height'])).' cm onder de rand)'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
673 | $this->Checkline($s); |
247
792b5ba77a1f
The checklist now shows the pre-boil gravity.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
674 | $pre_sg = estimate_sg($msugars * floatval($row['efficiency']) / 100,floatval($row['boil_size'])); |
792b5ba77a1f
The checklist now shows the pre-boil gravity.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
675 | $plato = sg_to_plato($pre_sg); |
792b5ba77a1f
The checklist now shows the pre-boil gravity.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
676 | $brix = $plato * $my_brix_correction; |
792b5ba77a1f
The checklist now shows the pre-boil gravity.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
677 | $s = 'doel SG in kookketel: '.sprintf("%.3f",$pre_sg).' SG ('.sprintf("%.1f",$brix).' '.DEG.'Brix, '.sprintf("%.1f",$plato).' '.DEG.'P)'; |
792b5ba77a1f
The checklist now shows the pre-boil gravity.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
678 | $this->Checkline($s); |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
679 | $hops = json_decode($row['json_hops'], true); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
680 | foreach($hops as $item2) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
681 | if ($item2['h_useat'] == 1) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
682 | $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
683 | $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' toevoegen na het spoelen'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
684 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
685 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
686 | } |
279
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
687 | if ($this->GetY() > 200) |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
688 | $this->AddPage(); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
689 | else |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
690 | $this->Ln(5); |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
691 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
692 | $this->Checkheader('Koken'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
693 | $this->Checkline('totale kooktijd: '.$row['boil_time'].' min.'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
694 | for ($i = $row['boil_time']; $i >= 0; $i--) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
695 | if ($i == 10) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
696 | $ferms = json_decode($row['json_fermentables'], true); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
697 | foreach($ferms as $item1) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
698 | if ($item1['f_added'] == 1) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
699 | $s = sprintf("%.3f",$item1['f_amount']).' kg '; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
700 | $s .= iconv('UTF-8','windows-1252',$item1['f_name']).' bij 10 minuten voor einde koken'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
701 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
702 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
703 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
704 | if ($row['brew_cooling_method'] == 1) |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
705 | $this->Checkline('Plaats dompelkoeler bij 10 minuten voor einde koken'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
706 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
707 | $hops = json_decode($row['json_hops'], true); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
708 | foreach($hops as $item2) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
709 | if (($item2['h_useat'] == 2 || $item2['h_useat'] == 3) && ($item2['h_time'] == $i)) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
710 | $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
711 | $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' bij '; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
712 | if ($i > 0) |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
713 | $s .= $i.' minuten voor einde koken'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
714 | else |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
715 | $s .= 'vlamuit'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
716 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
717 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
718 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
719 | $miscs = json_decode($row['json_miscs'], true); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
720 | foreach($miscs as $item3) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
721 | if ($item3['m_use_use'] == 2 && $item3['m_time'] == $i) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
722 | $s = sprintf("%.1f",$item3['m_amount']*1000).' gr '; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
723 | $s .= iconv('UTF-8','windows-1252',$item3['m_name']).' bij '; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
724 | if ($i > 0) |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
725 | $s .= $i.' minuten voor einde koken'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
726 | else |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
727 | $s .= 'vlamuit'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
728 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
729 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
730 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
731 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
732 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
733 | $s = 'doelvolume einde koken: '.sprintf("%.1f",$row['batch_size']*1.04).' liter ('; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
734 | $s .= sprintf("%.1f",kettle_cm($row['batch_size']*1.04,$row['eq_kettle_volume'],$row['eq_kettle_height'])); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
735 | $s .= ' cm onder de rand)'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
736 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
737 | $plato = sg_to_plato($row['est_og']); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
738 | $brix = $plato * $my_brix_correction; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
739 | $s = 'doel SG einde koken: '.sprintf("%.3f",$row['est_og']).' SG ('; |
247
792b5ba77a1f
The checklist now shows the pre-boil gravity.
Michiel Broek <mbroek@mbse.eu>
parents:
245
diff
changeset
|
740 | $s .= sprintf("%.1f",$brix).' '.DEG.'Brix, '.sprintf("%.1f",$plato).' '.DEG.'P)'; |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
741 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
742 | if ($this->GetY() > 200) |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
743 | $this->AddPage(); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
744 | else |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
745 | $this->Ln(5); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
746 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
747 | if (($row['brew_whirlpool9'] + $row['brew_whirlpool7'] + $row['brew_whirlpool6'] + $row['brew_whirlpool2']) > 0) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
748 | $this->Checkheader('Whirlpool en koelen'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
749 | if ($row['brew_whirlpool9'] > 0) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
750 | $s = 'Whirlpool voor '.$row['brew_whirlpool9'].' min. Temperatuur boven 85 '.DEG.'C houden'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
751 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
752 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
753 | if ($row['brew_whirlpool7'] > 0) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
754 | $this->Checkline('koelen tot 79 '.DEG.'C'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
755 | $s = 'Whirlpool voor '.$row['brew_whirlpool7'].' min. Temperatuur tussen 72 en 79 '.DEG.'C houden'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
756 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
757 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
758 | if ($row['brew_whirlpool6'] > 0) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
759 | $this->Checkline('koelen tot 66 '.DEG.'C'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
760 | $s = 'Whirlpool voor '.$row['brew_whirlpool6'].' min. Temperatuur tussen 60 en 66 '.DEG.'C houden'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
761 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
762 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
763 | $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).' '.DEG.'C'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
764 | if ($row['brew_whirlpool2'] > 0) { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
765 | $s = 'Whirlpool voor '.$row['brew_whirlpool2'].' min.'; |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
766 | $this->Checkline($s); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
767 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
768 | } else { |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
769 | $this->Checkheader('Koelen'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
770 | $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).' '.DEG.'C'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
771 | } |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
772 | $this->Checkline('gistvat ontsmetten en evt. pomp en slangen ontsmetten'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
773 | $this->Checkline('wort naar gistvat overbrengen'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
774 | if ($this->GetY() > 200) |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
775 | $this->AddPage(); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
776 | else |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
777 | $this->Ln(5); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
778 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
779 | $this->Checkheader('Gist enten'); |
276
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
780 | $dry = 0; |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
781 | $yeasts = json_decode($row['json_yeasts'], true); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
782 | foreach ($yeasts as $item) { |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
783 | if ($item['y_use'] == 0) { // primary |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
784 | if ($item['y_form'] == 0) { // Liquid |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
785 | $this->Checkline($item['y_amount'].' pak '.$item['y_product_id'].', '.$item['y_name'].' gist'); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
786 | } else if ($item['y_form'] == 1) { // Dry |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
787 | $s = sprintf("%.1f",$item['y_amount']*1000).' gram '.$item['y_product_id'].', '.$item['y_name']; |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
788 | $s .= ' gist'; |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
789 | $dry += $item['y_amount']*10000; |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
790 | $this->Checkline($s); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
791 | } else { // Slant/Culture/Frozen/Bottle |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
792 | $s = sprintf("%.0f",$item['y_amount']*1000).' ml '.$item['y_product_id'].', '.$item['y_name'].' gist'; |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
793 | $this->Checkline($s); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
794 | } |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
795 | } |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
796 | } |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
797 | if ($dry > 0) { |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
798 | $this->Checkline(' gist hydrateren in '.$dry.' ml gedesinfecteerd water van 32 '.DEG.'C'); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
799 | $this->Checkline(' 15 minuten laten staan bij 32 '.DEG.'C'); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
800 | $this->Checkline(' gistmengsel voorzichtig roeren en laten afkoelen tot temperatuur wort'); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
801 | $this->Checkline(' gist toevoegen'); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
802 | $this->Checkline('Of'); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
803 | $this->Checkline(' gist rechtstreeks over het wort strooien'); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
804 | } else { |
279
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
805 | if ($row['starter_enable'] && $row['prop1_volume']) |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
806 | $this->Checkline('giststarter toevoegen'); |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
807 | else |
60d56f39e63e
Added yeast starter instructions to the printed checklist
Michiel Broek <mbroek@mbse.eu>
parents:
277
diff
changeset
|
808 | $this->Checkline('gist toevoegen'); |
276
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
809 | } |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
810 | if ($row['brew_fermenter_extrawater'] > 0) |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
811 | $this->Checkline(sprintf("%.1f", $row['brew_fermenter_extrawater']).' liter water toevoegen in gistvat'); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
812 | if ($row['brew_aeration_type'] > 0) { |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
813 | $s = 'wort '.$row['brew_aeration_time'].' minuten beluchten met '; |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
814 | $s .= ($row['brew_aeration_type'] == 1) ? "lucht":"zuurstof"; |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
815 | $this->Checkline($s); |
08c824a5ffd8
Product print added yeast section.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
816 | } |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
817 | if ($this->GetY() > 200) |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
818 | $this->AddPage(); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
819 | else |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
820 | $this->Ln(5); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
821 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
822 | $this->Checkheader('Vergisting starten'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
823 | $this->Checkline('klimaatkast instellen op '.sprintf("%.1f",$row['brew_cooling_to']).' '.DEG.'C'); |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
824 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
825 | // 'Toevoegingen tijdens vergisting' |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
826 | // 'Toevoegingen tijdens nagisting/lagering' |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
827 | // fermentables & hops & miscs verdelen over primary/secondary/teriary |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
828 | |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
829 | // 'Toevoegingen tijdens bottelen/op fust zetten' |
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
830 | } |
165 | 831 | } |
832 | ||
833 | ||
834 | ||
835 | class PDF extends PDF_MySQL_Table { | |
836 | function Header() { | |
837 | global $row; | |
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:
165
diff
changeset
|
838 | global $prdate; |
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:
165
diff
changeset
|
839 | $stage = array( 'Plan', 'Wacht', 'Brouwen', 'Hoofdgisting', 'Nagisting', 'Lagering', 'Afvullen', 'Hergisten', 'Rijpen', 'Proeven', 'Gereed', 'Afgesloten' ); |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
840 | $this->Image('images/logo.png',10,10,30); |
165 | 841 | // Title |
842 | $this->SetFont('Helvetica','B',18); | |
843 | $this->SetX(45); | |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
844 | $this->Cell(0,8,$row['code'].' '.$row['name'],0,1,'L'); |
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:
165
diff
changeset
|
845 | $this->Ln(1); |
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:
165
diff
changeset
|
846 | $this->SetFont('Helvetica','',10); |
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:
165
diff
changeset
|
847 | $this->SetX(45); |
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:
165
diff
changeset
|
848 | $this->Cell(17,5,'Datum:',0,0,'L'); |
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:
165
diff
changeset
|
849 | $this->Cell(0,5,$prdate,0,1,'L'); |
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:
165
diff
changeset
|
850 | $this->SetX(45); |
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:
165
diff
changeset
|
851 | $this->Cell(17,5,'Stijl:',0,0,'L'); |
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:
165
diff
changeset
|
852 | $this->Cell(0,5,$row['st_name'],0,1,'L'); |
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:
165
diff
changeset
|
853 | $this->SetX(45); |
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:
165
diff
changeset
|
854 | $this->Cell(17,5,'Fase:',0,0,'L'); |
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:
165
diff
changeset
|
855 | $this->Cell(0,5,$stage[$row['stage']],0,1,'L'); |
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:
165
diff
changeset
|
856 | $this->Ln(6); |
165 | 857 | // Ensure table header is printed |
858 | parent::Header(); | |
859 | } | |
860 | } | |
861 | ||
862 | ||
863 | /* | |
864 | * Generate PDF from recipe data | |
865 | */ | |
866 | $pdf = new PDF(); | |
867 | $pdf->AddPage(); | |
868 | $pdf->TableGlobal($row); | |
869 | $pdf->TableFermentables($row); | |
870 | $pdf->TableHops($row); | |
871 | $pdf->TableYeasts($row); | |
872 | $pdf->TableMiscs($row); | |
873 | $pdf->TableSummary($row); | |
874 | if (strlen($row['notes'])) { | |
875 | $pdf->SetFillColor(255,150,100); | |
876 | $pdf->Cell(0, 5, 'Recept opmerkingen',0,0,'C',true); | |
877 | $pdf->Ln(); | |
878 | $pdf->SetFillColor(210,245,255); | |
879 | $pdf->MultiCell(0,4,$row['notes'],0,'L',true); | |
880 | } | |
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:
165
diff
changeset
|
881 | |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
882 | if ($row['stage'] == 1 || $row['stage'] == 2) { |
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:
165
diff
changeset
|
883 | // Checklist |
243
b43214d218c0
In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents:
241
diff
changeset
|
884 | $pdf->Checklist($row); |
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:
165
diff
changeset
|
885 | } |
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:
165
diff
changeset
|
886 | if ($row['stage'] > 2) { |
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:
165
diff
changeset
|
887 | // Brouw rapport |
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:
165
diff
changeset
|
888 | } |
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:
165
diff
changeset
|
889 | if ($row['stage'] > 3) { |
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:
165
diff
changeset
|
890 | // Vergisting gegevens |
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:
165
diff
changeset
|
891 | } |
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:
165
diff
changeset
|
892 | if ($row['stage'] > 6) { |
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:
165
diff
changeset
|
893 | // Package report |
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:
165
diff
changeset
|
894 | } |
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:
165
diff
changeset
|
895 | if ($row['stage'] > 9) { |
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:
165
diff
changeset
|
896 | // Taste notes |
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:
165
diff
changeset
|
897 | } |
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:
165
diff
changeset
|
898 | |
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:
165
diff
changeset
|
899 | |
165 | 900 | $pdf->Output(); |