www/prod_print.php

changeset 391
a1bcebc61ddd
parent 357
74d56bed75b9
child 392
544d7d0183b2
equal deleted inserted replaced
390:1c52a6875960 391:a1bcebc61ddd
96 $this->Cell(35,5,'Bierstijl',0,0,'L',true); 96 $this->Cell(35,5,'Bierstijl',0,0,'L',true);
97 $this->Cell(45,5,$row['st_name'],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); 98 $this->Cell($vul,5,'',0,0,'L',false);
99 $this->Cell(35,5,'Installatie',0,0,'L',true); 99 $this->Cell(35,5,'Installatie',0,0,'L',true);
100 $this->Cell(45,5,$row['eq_name'],0,0,'L',true); 100 $this->Cell(45,5,$row['eq_name'],0,0,'L',true);
101 $this->Ln(10); 101 $this->Ln();
102 102
103 $this->cMargin=$cMargin; 103 $this->cMargin=$cMargin;
104 } 104 }
105 105
106 function TableFermentables($row) { 106 function TableFermentables($row) {
111 global $colorw; 111 global $colorw;
112 global $preboil_sg; 112 global $preboil_sg;
113 global $mashkg; 113 global $mashkg;
114 $added = array( 'Maischen', 'Koken', 'Vergisten', 'Nagisten/lageren', 'Bottelen' ); 114 $added = array( 'Maischen', 'Koken', 'Vergisten', 'Nagisten/lageren', 'Bottelen' );
115 $vul = $this->w - $this->rMargin - $this->lMargin - 132; 115 $vul = $this->w - $this->rMargin - $this->lMargin - 132;
116 $this->Ln();
116 $this->AddCol($vul,'Grondstof','L'); 117 $this->AddCol($vul,'Grondstof','L');
117 $this->AddCol(30,'Leverancier','L'); 118 $this->AddCol(30,'Leverancier','L');
118 $this->AddCol(15,'EBC','R'); 119 $this->AddCol(15,'EBC','R');
119 $this->AddCol(17,'Moment','L'); 120 $this->AddCol(17,'Moment','L');
120 $this->AddCol(20,'Kg','R'); 121 $this->AddCol(20,'Kg','R');
178 $this->SetFillColor(210,245,255); 179 $this->SetFillColor(210,245,255);
179 $this->Cell($vul+62,5,'',0,0,'L',false); 180 $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(20,5,sprintf("%8.3f",$total_fermentables),0,0,'R',true);
181 $this->Cell(30,5,'',0,0,'L',false); 182 $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->Cell(20,5,sprintf("%8.3f",$cost_fermentables).EURO,0,0,'R',true);
183 $this->Ln(10);
184 $this->ProcessingTable=false; 184 $this->ProcessingTable=false;
185 $this->cMargin=$cMargin; 185 $this->cMargin=$cMargin;
186 $this->aCols=array(); 186 $this->aCols=array();
187 $this->Ln();
187 } 188 }
188 189
189 function TableHops($row) { 190 function TableHops($row) {
190 global $total_hops; 191 global $total_hops;
191 global $total_ibus; 192 global $total_ibus;
192 global $cost_hops; 193 global $cost_hops;
193 global $preboil_sg; 194 global $preboil_sg;
194 $hopform = array( 'Pellets', 'Plugs', 'Bellen', 'Hop nat' ); 195 $hopform = array( 'Pellets', 'Plugs', 'Bellen', 'Hop nat' );
195 $hopuse = array( 'Maischen', 'First wort', 'Koken', 'Vlamuit', 'Whirlpool', 'Koudhop' ); 196 $hopuse = array( 'Maischen', 'First wort', 'Koken', 'Vlamuit', 'Whirlpool', 'Koudhop' );
196 $vul = $this->w - $this->rMargin - $this->lMargin - 135; 197 $vul = $this->w - $this->rMargin - $this->lMargin - 135;
198 $this->Ln();
197 $this->AddCol($vul,'Hop','L'); 199 $this->AddCol($vul,'Hop','L');
198 $this->AddCol(35,'Land','L'); 200 $this->AddCol(35,'Land','L');
199 $this->AddCol(15,'Soort','L'); 201 $this->AddCol(15,'Soort','L');
200 $this->AddCol(20,'Moment','L'); 202 $this->AddCol(20,'Moment','L');
201 $this->AddCol(15,'Alpha','R'); 203 $this->AddCol(15,'Alpha','R');
247 $this->SetFillColor(210,245,255); 249 $this->SetFillColor(210,245,255);
248 $this->Cell($vul+85,5,'',0,0,'L',false); 250 $this->Cell($vul+85,5,'',0,0,'L',false);
249 $this->Cell(12,5,sprintf("%.1f",$total_ibus),0,0,'R',true); 251 $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); 252 $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); 253 $this->Cell(20,5,sprintf("%8.3f",$cost_hops).EURO,0,0,'R',true);
252 $this->Ln(10);
253 $this->ProcessingTable=false; 254 $this->ProcessingTable=false;
254 $this->cMargin=$cMargin; 255 $this->cMargin=$cMargin;
255 $this->aCols=array(); 256 $this->aCols=array();
257 $this->Ln();
256 } 258 }
257 259
258 function TableYeasts($row) { 260 function TableYeasts($row) {
259 global $cost_yeasts; 261 global $cost_yeasts;
260 global $svg; 262 global $svg;
261 $yeastform = array( 'Vloeibaar', 'Droog', 'Schuine buis', 'Slurry', 'Ingevroren', 'Depot' ); 263 $yeastform = array( 'Vloeibaar', 'Droog', 'Schuine buis', 'Slurry', 'Ingevroren', 'Depot' );
262 $yeastuse = array( 'Hoofdgisting', 'Nagisting', 'Lagering', 'Bottelen' ); 264 $yeastuse = array( 'Hoofdgisting', 'Nagisting', 'Lagering', 'Bottelen' );
263 $vul = $this->w - $this->rMargin - $this->lMargin - 140; 265 $vul = $this->w - $this->rMargin - $this->lMargin - 140;
266 $this->Ln();
264 $this->AddCol(27,'Laboratorium','L'); 267 $this->AddCol(27,'Laboratorium','L');
265 $this->AddCol(18,'Product','L'); 268 $this->AddCol(18,'Product','L');
266 $this->AddCol($vul,'Gist','L'); 269 $this->AddCol($vul,'Gist','L');
267 $this->AddCol(20,'Gebruik','L'); 270 $this->AddCol(20,'Gebruik','L');
268 $this->AddCol(15,'Attn','R'); 271 $this->AddCol(15,'Attn','R');
319 } 322 }
320 323
321 $this->SetFillColor(210,245,255); 324 $this->SetFillColor(210,245,255);
322 $this->Cell($vul+120,5,'',0,0,'L',false); 325 $this->Cell($vul+120,5,'',0,0,'L',false);
323 $this->Cell(20,5,sprintf("%8.3f",$cost_yeasts).EURO,0,0,'R',true); 326 $this->Cell(20,5,sprintf("%8.3f",$cost_yeasts).EURO,0,0,'R',true);
324 $this->Ln(10);
325 $this->ProcessingTable=false; 327 $this->ProcessingTable=false;
326 $this->cMargin=$cMargin; 328 $this->cMargin=$cMargin;
327 $this->aCols=array(); 329 $this->aCols=array();
330 $this->Ln();
328 } 331 }
329 332
330 function TableMiscs($row) { 333 function TableMiscs($row) {
331 global $cost_miscs; 334 global $cost_miscs;
332 $misctype = array( 'Specerij', 'Kruid', 'Smaakstof', 'Klaringsmiddel', 'Brouwzout', 'Gistvoeding', 'Anders' ); 335 $misctype = array( 'Specerij', 'Kruid', 'Smaakstof', 'Klaringsmiddel', 'Brouwzout', 'Gistvoeding', 'Anders' );
333 $miscuse = array( 'Starter', 'Maischen', 'Koken', 'Hoofdvergisting', 'Nagisting/lagering', 'Bottelen' ); 336 $miscuse = array( 'Starter', 'Maischen', 'Koken', 'Hoofdvergisting', 'Nagisting/lagering', 'Bottelen' );
334 $vul = $this->w - $this->rMargin - $this->lMargin - 100; 337 $vul = $this->w - $this->rMargin - $this->lMargin - 100;
335 $this->AddCol($vul,'Naam','L'); 338 if ($this->GetY() > 200)
339 $this->AddPage();
340 else
341 $this->Ln();
342 $this->AddCol($vul,'Diversen naam','L');
336 $this->AddCol(30,'Soort','L'); 343 $this->AddCol(30,'Soort','L');
337 $this->AddCol(30,'Gebruik','L'); 344 $this->AddCol(30,'Gebruik','L');
338 $this->AddCol(20,'Hoeveel','R'); 345 $this->AddCol(20,'Hoeveel','R');
339 $this->AddCol(20,'Prijs','R'); 346 $this->AddCol(20,'Prijs','R');
340 347
383 } 390 }
384 391
385 $this->SetFillColor(210,245,255); 392 $this->SetFillColor(210,245,255);
386 $this->Cell($vul+80,5,'',0,0,'L',false); 393 $this->Cell($vul+80,5,'',0,0,'L',false);
387 $this->Cell(20,5,sprintf("%8.3f",$cost_miscs).EURO,0,0,'R',true); 394 $this->Cell(20,5,sprintf("%8.3f",$cost_miscs).EURO,0,0,'R',true);
388 $this->Ln(10);
389 395
390 $this->ProcessingTable=false; 396 $this->ProcessingTable=false;
391 $this->cMargin=$cMargin; 397 $this->cMargin=$cMargin;
392 $this->aCols=array(); 398 $this->aCols=array();
399 $this->Ln();
400 }
401
402 function TableMashs($row) {
403 global $cost_yeasts;
404 global $svg;
405 global $mashkg;
406 $mashtype = array( 'Infusie', 'Verwarming', 'Decoctie' );
407 $vul = $this->w - $this->rMargin - $this->lMargin - 137;
408 if ($this->GetY() > 250)
409 $this->AddPage();
410 else
411 $this->Ln();
412 $this->AddCol($vul,'Maisch stap naam','L');
413 $this->AddCol(25,'Stap type','L');
414 $this->AddCol(18,'Start '.DEG.'C','R');
415 $this->AddCol(18,'Eind '.DEG.'C','R');
416 $this->AddCol(18,'Rust min','R');
417 $this->AddCol(18,'Stap min','R');
418 $this->AddCol(20,'L/Kg','R');
419 $this->AddCol(20,'Infusie L','R');
420
421 $cMargin=$this->cMargin;
422 $this->cMargin=2;
423 $this->TableX=$this->lMargin;
424 $this->TableHeader();
425 $this->ProcessingTable=true;
426
427 $this->SetFont('Helvetica','',9);
428 $this->SetFillColor(175, 175, 255);
429
430 $vol = 0;
431 $arr = json_decode($row['json_mashs'], true);
432 foreach($arr as $item) { //foreach element in $arr
433
434 if ($item['step_type'] == 0)
435 $vol += $item['step_infuse_amount'];
436 if ($mashkg > 0)
437 $thick = $vol / $mashkg;
438 else
439 $thick = 0;
440 $this->Cell($vul,5,$item['step_name'],0,0,'L',true);
441 $this->Cell(25,5,$mashtype[$item['step_type']],0,0,'L',true);
442 $this->Cell(18,5,sprintf("%.1f",$item['step_temp']),0,0,'R',true);
443 $this->Cell(18,5,sprintf("%.1f",$item['end_temp']),0,0,'R',true);
444 $this->Cell(18,5,sprintf("%.0f",$item['step_time']),0,0,'R',true);
445 $this->Cell(18,5,sprintf("%.0f",$item['ramp_time']),0,0,'R',true);
446 $this->Cell(20,5,sprintf("%.2f",$thick),0,0,'R',true);
447 $this->Cell(20,5,sprintf("%.1f",$item['step_infuse_amount']),0,0,'R',true);
448 $this->Ln();
449 }
450 $this->ProcessingTable=false;
451 $this->cMargin=$cMargin;
452 $this->aCols=array();
453 $this->Ln();
393 } 454 }
394 455
395 // Watercolor $this->SetFillColor(120,255,250); 456 // Watercolor $this->SetFillColor(120,255,250);
396 457
397 function TableSummary($row) { 458 function TableSummary($row) {
405 global $cost_yeasts; 466 global $cost_yeasts;
406 global $mashkg; 467 global $mashkg;
407 $colormethod = array( 'Morey', 'Mosher', 'Daniels' ); 468 $colormethod = array( 'Morey', 'Mosher', 'Daniels' );
408 $ibumethod = array( 'Tinseth', 'Rager', 'Daniels' ); 469 $ibumethod = array( 'Tinseth', 'Rager', 'Daniels' );
409 /* 2 Columns */ 470 /* 2 Columns */
471 if ($this->GetY() > 200)
472 $this->AddPage();
473 else
474 $this->Ln();
410 $vul = $this->w - $this->rMargin - $this->lMargin - 170; 475 $vul = $this->w - $this->rMargin - $this->lMargin - 170;
411 $cMargin=$this->cMargin; 476 $cMargin=$this->cMargin;
412 $this->cMargin=2; 477 $this->cMargin=2;
413 $this->TableX=$this->lMargin; 478 $this->TableX=$this->lMargin;
414 $this->SetFont('Helvetica','B',9); 479 $this->SetFont('Helvetica','B',9);
481 $this->SetX($this->TableX); 546 $this->SetX($this->TableX);
482 $cost_total = $cost_fermentables + $cost_hops + $cost_miscs + $cost_yeasts; 547 $cost_total = $cost_fermentables + $cost_hops + $cost_miscs + $cost_yeasts;
483 $this->Cell(35,5,'Kosten',0,0,'L',true); 548 $this->Cell(35,5,'Kosten',0,0,'L',true);
484 $this->Cell(25,5,sprintf("%.2f",$cost_total).EURO,0,0,'L',true); 549 $this->Cell(25,5,sprintf("%.2f",$cost_total).EURO,0,0,'L',true);
485 $this->Cell(25,5,sprintf("%.2f",$cost_total/$row['batch_size']).EURO.' / liter',0,0,'L',true); 550 $this->Cell(25,5,sprintf("%.2f",$cost_total/$row['batch_size']).EURO.' / liter',0,0,'L',true);
486 $this->Ln(10); 551
487 552 // calorieen
488 553 $this->ProcessingTable=false;
489 // Kostprijs per liter, calorieren 554 $this->cMargin=$cMargin;
490 $this->cMargin=$cMargin; 555 $this->aCols=array();
556 $this->Ln();
491 } 557 }
492 558
493 function Checkheader($text) { 559 function Checkheader($text) {
494 $this->SetFont('Arial','B',10); 560 $this->SetFont('Arial','B',10);
495 $this->Cell(0, 4,$text,0,0,'L',true); 561 $this->Cell(0, 4,$text,0,0,'L',true);
496 $this->SetFont('Arial','',10); 562 $this->SetFont('Arial','',10);
497 $this->Ln(6); 563 $this->Ln(6);
498 } 564 }
499 565
500 function Checkline($text) { 566 function Checkline($text) {
501 // $this->SetX(5);
502 $this->Cell(2, 4,' ',0,0,'L',true); 567 $this->Cell(2, 4,' ',0,0,'L',true);
503 $this->Cell(4, 4,' ',1,0,'L',true); 568 $this->Cell(4, 4,' ',1,0,'L',true);
504 // $this->Rect(10,$this->GetY(),4,4);
505 // $this->SetX(15);
506 $this->Cell(0, 4,' '.$text,0,1,'L',true); 569 $this->Cell(0, 4,' '.$text,0,1,'L',true);
507 $this->Ln(1); 570 $this->Ln(1);
508 } 571 }
509 572
510 function Checklist($row) { 573 function Checklist($row) {
832 // 'Toevoegingen tijdens nagisting/lagering' 895 // 'Toevoegingen tijdens nagisting/lagering'
833 // fermentables & hops & miscs verdelen over primary/secondary/teriary 896 // fermentables & hops & miscs verdelen over primary/secondary/teriary
834 897
835 // 'Toevoegingen tijdens bottelen/op fust zetten' 898 // 'Toevoegingen tijdens bottelen/op fust zetten'
836 } 899 }
900
901 function Brewday($row) {
902
903 global $my_brix_correction;
904 global $my_grain_absorbtion;
905
906 if ($this->GetY() > 180)
907 $this->AddPage();
908 else
909 $this->Ln(10);
910
911 $vul = $this->w - $this->rMargin - $this->lMargin - 170;
912 $cMargin=$this->cMargin;
913 $this->cMargin=2;
914 $this->TableX=$this->lMargin;
915 $this->SetFont('Helvetica','B',9);
916 $this->SetX($this->TableX);
917 $this->SetFillColor(255,150,100);
918 $this->Cell(0, 5, 'Brouwdag gegevens',0,0,'C',true);
919 $this->Ln();
920
921 $this->SetFont('Helvetica','',9);
922 $this->SetFillColor(210,245,255);
923
924 $this->SetX($this->TableX);
925 $this->Cell(35,5,'Datum start',0,0,'L',true);
926 $this->Cell(50,5,$row['brew_date_start'],0,0,'L',true);
927 $this->Cell($vul,5,'',0,0,'L',false);
928 $this->Cell(35,5,'Maisch zuurgraad',0,0,'L',true);
929 $this->Cell(50,5,sprintf("%.1f", $row['brew_mash_ph']).' pH',0,0,'L',true);
930 $this->Ln();
931
932 $this->SetX($this->TableX);
933 $this->Cell(35,5,'Datum eind',0,0,'L',true);
934 $this->Cell(50,5,$row['brew_date_end'],0,0,'L',true);
935 $this->Cell($vul,5,'',0,0,'L',false);
936 $this->Cell(35,5,'Maisch densiteit',0,0,'L',true);
937 $plato = sg_to_plato(floatval($row['brew_mash_sg']));
938 $brix = $plato * $my_brix_correction;
939 $this->Cell(50,5,sprintf("%.3f", floatval($row['brew_mash_sg']))." SG ".sprintf("%.1f",$brix).DEG.'Brix '.sprintf("%.1f",$plato).DEG.'P',0,0,'L',true);
940 $this->Ln();
941
942 $infuse = $mvol = floatval($row['w1_amount']) + floatval($row['w2_amount']);
943 $msugars = 0;
944 $bsugars = 0;
945 $mashkg = 0;
946 $ferms = json_decode($row['json_fermentables'], true);
947 foreach($ferms as $item) {
948 if ($item['f_added'] == 0) { // Mash
949 $msugars += floatval($item['f_amount']) * (floatval($item['f_yield']) / 100) * (1 - floatval($item['f_moisture']) / 100);
950 $mvol += floatval($item['f_amount']) * floatval($item['f_moisture']) / 100;
951 $mashkg += floatval($item['f_amount']);
952 }
953 if ($item['f_added'] == 1) { // Boil
954 $bsugars += floatval($item['f_amount']) * (floatval($item['f_yield']) / 100) * (1 - floatval($item['f_moisture']) / 100);
955 }
956 }
957 $sugardensity = 1.611;
958 $v = $msugars / $sugardensity + $mvol;
959 $plato = 1000 * $msugars / ($v * 10);
960 if ($plato > 0.5)
961 $e = 100 * sg_to_plato(floatval($row['brew_mash_sg'])) / $plato;
962 else
963 $e = 0;
964 $this->SetX($this->TableX);
965 $this->Cell(85+$vul,5,'',0,0,'L',false);
966 $this->Cell(35,5,'Maisch rendement',0,0,'L',true);
967 $this->Cell(50,5,sprintf("%.1f", $e)."%",0,0,'L',true);
968 $this->Ln(7);
969
970 $this->SetX($this->TableX);
971 $this->Cell(35,5,'Voor koken zuurgraad',0,0,'L',true);
972 $this->Cell(50,5,sprintf("%.1f", $row['brew_preboil_ph'])." pH",0,0,'L',true);
973 $this->Cell($vul,5,'',0,0,'L',false);
974 $this->Cell(35,5,'Na koken zuurgraad',0,0,'L',true);
975 $this->Cell(50,5,sprintf("%.1f", $row['brew_aboil_ph'])." pH",0,0,'L',true);
976 $this->Ln();
977
978 $this->SetX($this->TableX);
979 $this->Cell(35,5,'Voor koken densiteit',0,0,'L',true);
980 $plato = sg_to_plato(floatval($row['brew_preboil_sg']));
981 $brix = $plato * $my_brix_correction;
982 $this->Cell(50,5,sprintf("%.3f", floatval($row['brew_preboil_sg']))." SG ".sprintf("%.1f",$brix).DEG.'Brix '.sprintf("%.1f",$plato).DEG.'P',0,0,'L',true);
983 $this->Cell($vul,5,'',0,0,'L',false);
984 $this->Cell(35,5,'Na koken densiteit',0,0,'L',true);
985 $plato = sg_to_plato(floatval($row['brew_aboil_sg']));
986 $brix = $plato * $my_brix_correction;
987 $this->Cell(50,5,sprintf("%.3f", floatval($row['brew_aboil_sg']))." SG ".sprintf("%.1f",$brix).DEG.'Brix '.sprintf("%.1f",$plato).DEG.'P',0,0,'L',true);
988 $this->Ln();
989
990 $this->SetX($this->TableX);
991 $this->Cell(35,5,'Voor koken volume',0,0,'L',true);
992 $this->Cell(50,5,sprintf("%.1f", $row['brew_preboil_volume'])." liter",0,0,'L',true);
993 $this->Cell($vul,5,'',0,0,'L',false);
994 $this->Cell(35,5,'Na koken volume',0,0,'L',true);
995 $this->Cell(50,5,sprintf("%.1f", $row['brew_aboil_volume'])." liter",0,0,'L',true);
996 $this->Ln();
997
998 $this->SetX($this->TableX);
999 $this->Cell(35,5,'Voor koken rendement',0,0,'L',true);
1000 $tot = sg_to_plato(floatval($row['brew_preboil_sg'])) * (floatval($row['brew_preboil_volume']) / 1.04) * floatval($row['brew_preboil_sg']) * 10 / 1000;
1001 $result = 0;
1002 if ($msugars > 0)
1003 $result = (($tot / $msugars * 100) * 10) / 10;
1004 if ($result < 0)
1005 $result = 0;
1006 $this->Cell(50,5,sprintf("%.1f", $result)."%",0,0,'L',true);
1007 $this->Cell($vul,5,'',0,0,'L',false);
1008 $this->Cell(35,5,'Na koken rendement',0,0,'L',true);
1009 $tot = sg_to_plato(floatval($row['brew_aboil_sg'])) * (floatval($row['brew_aboil_volume']) / 1.04) * floatval($row['brew_aboil_sg']) * 10 / 1000;
1010 $tot -= $bsugars;
1011 $result = 0;
1012 if ($msugars > 0)
1013 $result = (($tot / $msugars * 100) * 10) / 10;
1014 if ($result < 0)
1015 $result = 0;
1016 $this->Cell(50,5,sprintf("%.1f", $result)."%",0,0,'L',true);
1017 $this->Ln(7);
1018
1019 $coolingtype = array( '-', 'Dompelkoeler', 'Tegenstroomkoeler', 'Au bain marie', 'Laten afkoelen' );
1020 $this->SetX($this->TableX);
1021 $this->Cell(35,5,'Spoelwater temperatuur',0,0,'L',true);
1022 $this->Cell(50,5,sprintf("%.1f", $row['brew_sparge_temperature']).DEG.'C',0,0,'L',true);
1023 $this->Cell($vul,5,'',0,0,'L',false);
1024 $this->Cell(35,5,'Koel methode',0,0,'L',true);
1025 $this->Cell(50,5,$coolingtype[$row['brew_cooling_method']],0,0,'L',true);
1026 $this->Ln();
1027
1028 $spoelw = (floatval($row['boil_size']) - $infuse + ($mashkg * $my_grain_absorbtion) + floatval($row['eq_lauter_deadspace'])) * 1.03;
1029 $this->SetX($this->TableX);
1030 $this->Cell(35,5,'Spoelwater volume',0,0,'L',true);
1031 $this->Cell(50,5,sprintf("%.1f", $spoelw).' liter',0,0,'L',true);
1032 $this->Cell($vul,5,'',0,0,'L',false);
1033 $this->Cell(35,5,'Koel temperatuur',0,0,'L',true);
1034 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_cooling_to'])).DEG.'C',0,0,'L',true);
1035 $this->Ln();
1036
1037 $this->SetX($this->TableX);
1038 $this->Cell(35,5,'Spoelwater zuurgraad',0,0,'L',true);
1039 $this->Cell(50,5,sprintf("%.1f", $row['brew_sparge_ph']).' pH',0,0,'L',true);
1040 $this->Cell($vul,5,'',0,0,'L',false);
1041 $this->Cell(35,5,'Koel tijdsduur',0,0,'L',true);
1042 $this->Cell(50,5,sprintf("%.0f", floatval($row['brew_cooling_time'])).' minuten',0,0,'L',true);
1043 $this->Ln(7);
1044
1045 $this->SetX($this->TableX);
1046 $this->Cell(35,5,'Whirlpool +85'.DEG.'C',0,0,'L',true);
1047 $this->Cell(50,5,sprintf("%.0f", $row['brew_whirlpool9']).' minuten',0,0,'L',true);
1048 $this->Cell($vul,5,'',0,0,'L',false);
1049 $this->Cell(35,5,'Koeler & trub verlies',0,0,'L',true);
1050 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_fermenter_tcloss'])).' liter',0,0,'L',true);
1051 $this->Ln();
1052
1053 $this->SetX($this->TableX);
1054 $this->Cell(35,5,'Whirlpool 72..79'.DEG.'C',0,0,'L',true);
1055 $this->Cell(50,5,sprintf("%.0f", $row['brew_whirlpool7']).' minuten',0,0,'L',true);
1056 $this->Cell($vul,5,'',0,0,'L',false);
1057 $this->Cell(35,5,'Extra water in gistvat',0,0,'L',true);
1058 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_fermenter_extrawater'])).' liter',0,0,'L',true);
1059 $this->Ln();
1060
1061 $this->SetX($this->TableX);
1062 $this->Cell(35,5,'Whirlpool 60..66'.DEG.'C',0,0,'L',true);
1063 $this->Cell(50,5,sprintf("%.0f", $row['brew_whirlpool6']).' minuten',0,0,'L',true);
1064 $this->Cell($vul,5,'',0,0,'L',false);
1065 $this->Cell(35,5,'Volume naar gistvat',0,0,'L',true);
1066 $this->Cell(50,5,sprintf("%.1f", floatval($row['brew_fermenter_volume'])).' liter',0,0,'L',true);
1067 $this->Ln();
1068
1069 $this->SetX($this->TableX);
1070 $this->Cell(35,5,'Whirlpool koud',0,0,'L',true);
1071 $this->Cell(50,5,sprintf("%.0f", $row['brew_whirlpool2']).' minuten',0,0,'L',true);
1072 $this->Cell($vul,5,'',0,0,'L',false);
1073 $this->Cell(35,5,'Densiteit in gistvat',0,0,'L',true);
1074 $this->Cell(50,5,sprintf("%.3f", floatval($row['brew_fermenter_sg'])).' SG',0,0,'L',true);
1075 $this->Ln(7);
1076
1077 $aerationtype = array( 'Geen', 'Lucht', 'Zuurstof' );
1078 $this->SetX($this->TableX);
1079 $this->Cell(35,5,'Beluchten met',0,0,'L',true);
1080 $this->Cell(50,5,$aerationtype[$row['brew_aeration_type']],0,0,'L',true);
1081 $this->Cell($vul,5,'',0,0,'L',false);
1082 $this->Cell(35,5,'Kleur in gistvat',0,0,'L',true);
1083 $this->Cell(50,5,sprintf("%.0f", floatval($row['brew_fermenter_color'])).' EBC',0,0,'L',true);
1084 $this->Ln();
1085
1086 $this->SetX($this->TableX);
1087 $this->Cell(35,5,'Beluchten snelheid/tijd',0,0,'L',true);
1088 $this->Cell(50,5,$row['brew_aeration_speed'].'/'.$row['brew_aeration_time'],0,0,'L',true);
1089 $this->Cell($vul,5,'',0,0,'L',false);
1090 $this->Cell(35,5,'Bitterheid in gistvat',0,0,'L',true);
1091 $this->Cell(50,5,sprintf("%.0f", floatval($row['brew_fermenter_ibu'])).' IBU',0,0,'L',true);
1092 $this->Ln();
1093 }
837 } 1094 }
838 1095
839 1096
840 1097
841 class PDF extends PDF_MySQL_Table { 1098 class PDF extends PDF_MySQL_Table {
874 $pdf->TableGlobal($row); 1131 $pdf->TableGlobal($row);
875 $pdf->TableFermentables($row); 1132 $pdf->TableFermentables($row);
876 $pdf->TableHops($row); 1133 $pdf->TableHops($row);
877 $pdf->TableYeasts($row); 1134 $pdf->TableYeasts($row);
878 $pdf->TableMiscs($row); 1135 $pdf->TableMiscs($row);
1136 $pdf->TableMashs($row);
879 $pdf->TableSummary($row); 1137 $pdf->TableSummary($row);
880 if (strlen($row['notes'])) { 1138 if (strlen($row['notes'])) {
1139 if ($pdf->GetY() > 200)
1140 $pdf->AddPage();
1141 else
1142 $pdf->Ln(10);
881 $pdf->SetFillColor(255,150,100); 1143 $pdf->SetFillColor(255,150,100);
1144 $pdf->SetFont('Helvetica','B',9);
882 $pdf->Cell(0, 5, 'Recept opmerkingen',0,0,'C',true); 1145 $pdf->Cell(0, 5, 'Recept opmerkingen',0,0,'C',true);
883 $pdf->Ln(); 1146 $pdf->Ln();
1147 $pdf->SetFont('Helvetica','',9);
884 $pdf->SetFillColor(210,245,255); 1148 $pdf->SetFillColor(210,245,255);
885 $pdf->MultiCell(0,4,$row['notes'],0,'L',true); 1149 $pdf->MultiCell(0,4,$row['notes'],0,'L',true);
886 } 1150 }
887 1151
888 if ($row['stage'] == 1 || $row['stage'] == 2) { 1152 if ($row['stage'] > 2) {
889 // Checklist 1153 $pdf->Brewday($row);
890 $pdf->Checklist($row);
891 } 1154 }
892 if ($row['stage'] > 2) { 1155
893 // Brouw rapport
894 }
895 if ($row['stage'] > 3) { 1156 if ($row['stage'] > 3) {
896 // Vergisting gegevens 1157 // Vergisting gegevens
897 } 1158 }
898 if ($row['stage'] > 6) { 1159 if ($row['stage'] > 6) {
899 // Package report 1160 // Package report
900 } 1161 }
901 if ($row['stage'] > 9) { 1162 if ($row['stage'] > 9) {
902 // Taste notes 1163 // Taste notes
903 } 1164 }
1165 if ($row['stage'] == 1 || $row['stage'] == 2) {
1166 $pdf->Checklist($row);
1167 }
904 1168
905 1169
906 $pdf->Output(); 1170 $pdf->Output();

mercurial