www/prod_checklist.php

changeset 782
622e31e000c6
parent 755
509510586665
equal deleted inserted replaced
781:4bb28e67f2b7 782:622e31e000c6
38 $this->Cell(0, 4,' '.$text,0,1,'L',true); 38 $this->Cell(0, 4,' '.$text,0,1,'L',true);
39 $this->Ln(1); 39 $this->Ln(1);
40 } 40 }
41 41
42 function CheckInput($text, $prompt) { 42 function CheckInput($text, $prompt) {
43 $this->Cell(2, 4,' ',0,0,'L',true); 43 if (strlen($text)) {
44 $this->Cell(4, 4,' ',1,0,'L',true); 44 $this->Cell(2, 4,' ',0,0,'L',true);
45 $this->Cell(130, 4,' '.$text,0,0,'L',true); 45 $this->Cell(4, 4,' ',1,0,'L',true);
46 $this->Cell(130, 4,' '.$text,0,0,'L',true);
47 } else {
48 $this->Cell(136, 4,' ',0,0,'L',true);
49 }
46 $this->Cell(0, 4, 'Gemeten: _________ '.$prompt,0,1,'L',true); 50 $this->Cell(0, 4, 'Gemeten: _________ '.$prompt,0,1,'L',true);
47 $this->Ln(1); 51 $this->Ln(1);
48 } 52 }
49 53
50 function Checksplit($moment, $row) { 54 function Checksplit($moment, $row) {
167 if ($item['step_type'] == 0) 171 if ($item['step_type'] == 0)
168 $l = $item['step_infuse_amount'] * $factor; 172 $l = $item['step_infuse_amount'] * $factor;
169 else 173 else
170 $l = $mashwater; 174 $l = $mashwater;
171 $s = sprintf("%.1f",$l).' liter water opwarmen tot '; 175 $s = sprintf("%.1f",$l).' liter water opwarmen tot ';
172 $s .= sprintf("%.1f",$item['step_infuse_temp']).' '.DEG.'C ('; 176 $s .= sprintf("%.1f",$item['step_infuse_temp']).DEG.'C (';
173 $s .= sprintf("%.1f",kettle_cm($l,$row['eq_tun_volume'],$row['eq_tun_height'])); 177 $s .= sprintf("%.1f",kettle_cm($l,$row['eq_tun_volume'],$row['eq_tun_height']));
174 $s .= ' cm onder de rand)'; 178 $s .= ' cm onder de rand)';
175 $this->Checkline($s); 179 $this->Checkline($s);
176 if ($numsalts > 0) 180 if ($numsalts > 0)
177 $this->Checkline('brouwzouten en -zuren toevoegen'); 181 $this->Checkline('brouwzouten en -zuren toevoegen');
189 $s = sprintf("%.2f",$item3['m_amount']*1000 * $factor).$unit.'`'; 193 $s = sprintf("%.2f",$item3['m_amount']*1000 * $factor).$unit.'`';
190 $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` toevoegen'; 194 $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` toevoegen';
191 $this->Checkline($s); 195 $this->Checkline($s);
192 } 196 }
193 } 197 }
194 $this->CheckInput($item['step_time'].' min. bij '.$item['step_temp'].' '.DEG.'C', 'Brix'); 198 if ($item['step_temp'] != $item['end_temp']) {
199 $this->CheckInput($item['step_time'].' minuten bij '.$item['step_temp'].DEG.'C'.' tot '.$item['end_temp'].DEG.'C', 'Brix');
200 } else {
201 $this->CheckInput($item['step_time'].' minuten bij '.$item['step_temp'].DEG.'C', 'Brix');
202 }
195 $this->CheckInput('pH meten en bijstellen (doel pH beslag: '.sprintf("%.1f",$row['mash_ph']).' pH)', 'pH'); 203 $this->CheckInput('pH meten en bijstellen (doel pH beslag: '.sprintf("%.1f",$row['mash_ph']).' pH)', 'pH');
196 } else { 204 } else {
197 if ($item['step_type'] == 0) { // Infusion 205 if ($item['step_type'] == 0) { // Infusion
198 $s = 'toevoegen '.sprintf("%.1f",$item['step_infuse_amount'] * $factor).' liter water van '; 206 $s = 'toevoegen '.sprintf("%.1f",$item['step_infuse_amount'] * $factor).' liter water van ';
199 $s .= $item['step_infuse_temp'].' '.DEG.'C'; 207 $s .= $item['step_infuse_temp'].DEG.'C';
200 } else if ($item['step_type'] == 1) { // Direct heat 208 } else if ($item['step_type'] == 1) { // Direct heat
201 $s = 'opwarmen tot '.$item['step_temp'].' '.DEG.'C'; 209 $s = 'opwarmen tot '.$item['step_temp'].DEG.'C';
202 } else { // Decoction 210 } else { // Decoction
203 $s = 'uitnemen, opwarmen, koken en terugstorten van '.sprintf("%.1f",$item['step_infuse_amount']*$factor); 211 $s = 'uitnemen, opwarmen, koken en terugstorten van '.sprintf("%.1f",$item['step_infuse_amount']*$factor);
204 $s .= ' liter deelbeslag'; 212 $s .= ' liter deelbeslag';
205 } 213 }
206 $this->Checkline($s); 214 $this->Checkline($s);
207 $this->CheckInput($item['step_time'].' min. bij '.$item['step_temp'].' '.DEG.'C', 'Brix'); 215 if ($item['step_temp'] != $item['end_temp']) {
216 $this->CheckInput($item['step_time'].' minuten bij '.$item['step_temp'].DEG.'C'.' tot '.$item['end_temp'].DEG.'C', 'Brix');
217 } else {
218 $this->CheckInput($item['step_time'].' minuten bij '.$item['step_temp'].DEG.'C', 'Brix');
219 }
208 } 220 }
209 $loop++; 221 $loop++;
210 } 222 }
211 $est_mash_sg = 0; 223 $est_mash_sg = 0;
212 foreach($ferms as $item) { 224 foreach($ferms as $item) {
219 } 231 }
220 $sugardensity = 1.611; 232 $sugardensity = 1.611;
221 $v = $msugars / $sugardensity + $mvol; 233 $v = $msugars / $sugardensity + $mvol;
222 $plato = 1000 * $msugars / ($v * 10); // deg. Plato 234 $plato = 1000 * $msugars / ($v * 10); // deg. Plato
223 $mash_sg = plato_to_sg($plato); 235 $mash_sg = plato_to_sg($plato);
224 $this->CheckInput('doel SG eind maischen: '.density_str($mash_sg), 'Brix'); 236 $this->CheckInput('doel SG eind maischen: '.density_str($mash_sg), 'SG');
225 } 237 }
226 if ($this->GetY() > 200) 238 if ($this->GetY() > 200)
227 $this->AddPage(); 239 $this->AddPage();
228 else 240 else
229 $this->Ln(5); 241 $this->Ln(5);
230 242
231 $this->Checkheader('Filteren en spoelen'); 243 $this->Checkheader('Filteren en spoelen');
232 $s = sprintf("%.1f",$row['sparge_volume'] * $factor).' liter spoelwater opwarmen tot '.sprintf("%.1f",$row['sparge_temp']).' '.DEG.'C'; 244 $s = sprintf("%.1f",$row['sparge_volume'] * $factor).' liter spoelwater opwarmen tot '.sprintf("%.1f",$row['sparge_temp']).DEG.'C';
233 $this->Checkline($s); 245 $this->Checkline($s);
234 $s = 'spoelwater aanzuren tot pH <= '.sprintf("%.1f",$row['sparge_ph']).' met '; 246 $s = 'spoelwater aanzuren tot pH <= '.sprintf("%.1f",$row['sparge_ph']).' met ';
235 $s .= sprintf("%.2f",$row['sparge_acid_amount']*1000*$factor).' ml. '.$acidtype[$row['sparge_acid_type']]; 247 $s .= sprintf("%.2f",$row['sparge_acid_amount']*1000*$factor).' ml. '.$acidtype[$row['sparge_acid_type']];
236 $this->CheckInput($s, 'pH'); 248 $this->CheckInput($s, 'pH');
237 $spoelw = (($row['boil_size']*$factor) - $mashwater + $grainabsorbtion + $row['eq_lauter_deadspace']) * 1.03; // A small heat correction 249 $spoelw = (($row['boil_size']*$factor) - $mashwater + $grainabsorbtion + $row['eq_lauter_deadspace']) * 1.03; // A small heat correction
238 $this->Checkline('spoelen met ongeveer '.sprintf("%.1f",$spoelw).' liter spoelwater'); 250 $this->Checkline('spoelen met ongeveer '.sprintf("%.1f",$spoelw).' liter spoelwater');
239 $s = 'doelvolume in kookketel: '.sprintf("%.1f",$row['boil_size'] * $factor * 1.04).' liter ('; 251 $s = 'doelvolume in kookketel: '.sprintf("%.1f",$row['boil_size'] * $factor * 1.04).' liter (';
240 $s .= sprintf("%.1f",kettle_cm($row['boil_size'] * $factor * 1.04,$row['eq_kettle_volume'],$row['eq_kettle_height'])).' cm onder de rand)'; 252 $s .= sprintf("%.1f",kettle_cm($row['boil_size'] * $factor * 1.04,$row['eq_kettle_volume'],$row['eq_kettle_height'])).' cm onder de rand)';
241 $this->CheckInput($s, 'cm'); 253 $this->CheckInput($s, 'cm');
242 $pre_sg = estimate_sg($msugars * floatval($row['efficiency']) / 100,floatval($row['boil_size'] * $factor)); 254 $pre_sg = estimate_sg($msugars * floatval($row['efficiency']) / 100,floatval($row['boil_size'] * $factor));
243 $this->CheckInput('doel SG in kookketel: '.density_str($pre_sg), 'Brix'); 255 $this->CheckInput('doel SG in kookketel: '.density_str($pre_sg), 'SG');
256 $this->CheckInput('', 'pH');
244 foreach($hops as $item2) { 257 foreach($hops as $item2) {
245 if ($item2['h_useat'] == 1) { 258 if ($item2['h_useat'] == 1) {
246 $s = sprintf("%.1f",$item2['h_amount']*1000*$factor).' gr `'; 259 $s = sprintf("%.1f",$item2['h_amount']*1000*$factor).' gr `';
247 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` toevoegen na het spoelen'; 260 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` toevoegen na het spoelen';
248 $this->Checkline($s); 261 $this->Checkline($s);
299 } 312 }
300 $s = 'doelvolume einde koken: '.sprintf("%.1f",$row['batch_size']*$factor*1.04).' liter ('; 313 $s = 'doelvolume einde koken: '.sprintf("%.1f",$row['batch_size']*$factor*1.04).' liter (';
301 $s .= sprintf("%.1f",kettle_cm($row['batch_size']*$factor*1.04,$row['eq_kettle_volume'],$row['eq_kettle_height'])); 314 $s .= sprintf("%.1f",kettle_cm($row['batch_size']*$factor*1.04,$row['eq_kettle_volume'],$row['eq_kettle_height']));
302 $s .= ' cm onder de rand)'; 315 $s .= ' cm onder de rand)';
303 $this->CheckInput($s, 'cm'); 316 $this->CheckInput($s, 'cm');
304 $this->CheckInput('doel SG einde koken: '.density_str($row['est_og3']), 'Brix'); 317 $this->CheckInput('doel SG einde koken: '.density_str($row['est_og3']), 'SG');
318 $this->CheckInput('', 'pH');
305 if ($this->Checksplit(2, $row)) 319 if ($this->Checksplit(2, $row))
306 $factor = 1; 320 $factor = 1;
307 } else { 321 } else {
308 $this->Checkline('Dit is een `no-boil\' recept'); 322 $this->Checkline('Dit is een `no-boil\' recept');
309 } 323 }
313 $this->Ln(5); 327 $this->Ln(5);
314 328
315 if (($row['brew_whirlpool9'] + $row['brew_whirlpool7'] + $row['brew_whirlpool6'] + $row['brew_whirlpool2']) > 0) { 329 if (($row['brew_whirlpool9'] + $row['brew_whirlpool7'] + $row['brew_whirlpool6'] + $row['brew_whirlpool2']) > 0) {
316 $this->Checkheader('Whirlpool en koelen'); 330 $this->Checkheader('Whirlpool en koelen');
317 if ($row['brew_whirlpool9'] > 0) { 331 if ($row['brew_whirlpool9'] > 0) {
318 $s = 'Whirlpool voor '.$row['brew_whirlpool9'].' min. Temperatuur boven 85 '.DEG.'C houden'; 332 $s = 'Whirlpool voor '.$row['brew_whirlpool9'].' min. Temperatuur boven 85'.DEG.'C houden';
319 $this->Checkline($s); 333 $this->Checkline($s);
320 } 334 }
321 if ($row['brew_whirlpool7'] > 0) { 335 if ($row['brew_whirlpool7'] > 0) {
322 $this->Checkline('koelen tot 79 '.DEG.'C'); 336 $this->Checkline('koelen tot 79'.DEG.'C');
323 $s = 'Whirlpool voor '.$row['brew_whirlpool7'].' min. Temperatuur tussen 72 en 79 '.DEG.'C houden'; 337 $s = 'Whirlpool voor '.$row['brew_whirlpool7'].' min. Temperatuur tussen 72 en 79'.DEG.'C houden';
324 $this->Checkline($s); 338 $this->Checkline($s);
325 } 339 }
326 if ($row['brew_whirlpool6'] > 0) { 340 if ($row['brew_whirlpool6'] > 0) {
327 $this->Checkline('koelen tot 66 '.DEG.'C'); 341 $this->Checkline('koelen tot 66'.DEG.'C');
328 $s = 'Whirlpool voor '.$row['brew_whirlpool6'].' min. Temperatuur tussen 60 en 66 '.DEG.'C houden'; 342 $s = 'Whirlpool voor '.$row['brew_whirlpool6'].' min. Temperatuur tussen 60 en 66'.DEG.'C houden';
329 $this->Checkline($s); 343 $this->Checkline($s);
330 } 344 }
331 foreach($hops as $item2) { 345 foreach($hops as $item2) {
332 if ($item2['h_useat'] == 4) { 346 if ($item2['h_useat'] == 4) {
333 $s = sprintf("%.1f",$item2['h_amount']*1000*$factor).' gr `'; 347 $s = sprintf("%.1f",$item2['h_amount']*1000*$factor).' gr `';
334 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` voor '; 348 $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` voor ';
335 $s .= $item2['h_time'].' minuten in de whirlpool'; 349 $s .= $item2['h_time'].' minuten in de whirlpool';
336 $this->Checkline($s); 350 $this->Checkline($s);
337 } 351 }
338 } 352 }
339 $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).' '.DEG.'C'); 353 $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).DEG.'C');
340 if ($row['brew_whirlpool2'] > 0) { 354 if ($row['brew_whirlpool2'] > 0) {
341 $s = 'Whirlpool voor '.$row['brew_whirlpool2'].' min.'; 355 $s = 'Whirlpool voor '.$row['brew_whirlpool2'].' min.';
342 $this->Checkline($s); 356 $this->Checkline($s);
343 } 357 }
344 } else { 358 } else {
345 $this->Checkheader('Koelen'); 359 $this->Checkheader('Koelen');
346 $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).' '.DEG.'C'); 360 $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).DEG.'C');
347 } 361 }
348 $this->Checkline('gistvat ontsmetten en evt. pomp en slangen ontsmetten'); 362 $this->Checkline('gistvat ontsmetten en evt. pomp en slangen ontsmetten');
349 $this->Checkline('wort naar gistvat overbrengen'); 363 $this->CheckInput('wort naar gistvat overbrengen', 'Liter');
350 if ($this->Checksplit(3, $row)) 364 if ($this->Checksplit(3, $row))
351 $factor = 1; 365 $factor = 1;
352 if ($this->GetY() > 240) 366 if ($this->GetY() > 240)
353 $this->AddPage(); 367 $this->AddPage();
354 else 368 else
372 } else { // Slant/Culture/Frozen/Bottle 386 } else { // Slant/Culture/Frozen/Bottle
373 $s = sprintf("%.0f",$item['y_amount']*$factor*1000).' ml '.$product_id.', '.$name.' gist'; 387 $s = sprintf("%.0f",$item['y_amount']*$factor*1000).' ml '.$product_id.', '.$name.' gist';
374 $this->Checkline($s); 388 $this->Checkline($s);
375 } 389 }
376 if ($item['y_type'] == 6 && floatval($item['y_pitch_temperature']) > 0) { 390 if ($item['y_type'] == 6 && floatval($item['y_pitch_temperature']) > 0) {
377 $s = 'Gist enten bij ' . sprintf("%.1f",floatval($item['y_pitch_temperature'])) . DEG . 'C'; 391 $s = 'Gist enten bij ' . sprintf("%.1f",floatval($item['y_pitch_temperature'])).DEG.'C';
378 $this->Checkline($s); 392 $this->Checkline($s);
379 $climate = $item['y_pitch_temperature']; 393 $climate = $item['y_pitch_temperature'];
380 } 394 }
381 } 395 }
382 } 396 }
399 $this->AddPage(); 413 $this->AddPage();
400 else 414 else
401 $this->Ln(5); 415 $this->Ln(5);
402 416
403 $this->Checkheader('Vergisting starten'); 417 $this->Checkheader('Vergisting starten');
404 $this->Checkline('klimaatkast instellen op '.sprintf("%.1f",$climate).' '.DEG.'C'); 418 $this->Checkline('klimaatkast instellen op '.sprintf("%.1f",$climate).DEG.'C');
405 419
406 /* 420 /*
407 * During primary fermentation: fermentables, misc 421 * During primary fermentation: fermentables, misc
408 */ 422 */
409 $lines = 0; 423 $lines = 0;

mercurial