70 $this->SetFillColor(210,245,255); |
71 $this->SetFillColor(210,245,255); |
71 |
72 |
72 $this->SetX($this->TableX); |
73 $this->SetX($this->TableX); |
73 $this->Cell(35,5,'Type',0,0,'L',true); |
74 $this->Cell(35,5,'Type',0,0,'L',true); |
74 $this->Cell(25,5,$row['type'],0,0,'L',true); |
75 $this->Cell(25,5,$row['type'],0,0,'L',true); |
75 $this->Cell(25,5,'',0,0,'L',true); |
|
76 $this->Cell($vul,5,'',0,0,'L',false); |
76 $this->Cell($vul,5,'',0,0,'L',false); |
77 $this->Cell(35,5,'Batch grootte',0,0,'L',true); |
77 $this->Cell(35,5,'Batch grootte',0,0,'L',true); |
78 $this->Cell(25,5,$row['batch_size'].' liter',0,0,'L',true); |
78 $this->Cell(25,5,$row['batch_size'].' liter',0,0,'L',true); |
79 $this->Cell(25,5,'',0,0,'L',true); |
|
80 $this->Ln(); |
79 $this->Ln(); |
81 |
80 |
82 $this->SetX($this->TableX); |
81 $this->SetX($this->TableX); |
83 $this->Cell(35,5,'Kooktijd',0,0,'L',true); |
82 $this->Cell(35,5,'Kooktijd',0,0,'L',true); |
84 $this->Cell(25,5,$row['boil_time'].' minuten',0,0,'L',true); |
83 $this->Cell(25,5,$row['boil_time'].' minuten',0,0,'L',true); |
85 $this->Cell(25,5,'',0,0,'L',true); |
|
86 $this->Cell($vul,5,'',0,0,'L',false); |
84 $this->Cell($vul,5,'',0,0,'L',false); |
87 $this->Cell(35,5,'Brouwzaal rendement',0,0,'L',true); |
85 $this->Cell(35,5,'Brouwzaal rendement',0,0,'L',true); |
88 $this->Cell(25,5,$row['efficiency'].' %',0,0,'L',true); |
86 $this->Cell(25,5,$row['efficiency'].' %',0,0,'L',true); |
89 $this->Cell(25,5,'',0,0,'L',true); |
|
90 $this->Ln(10); |
87 $this->Ln(10); |
91 |
88 |
92 $this->cMargin=$cMargin; |
89 $this->cMargin=$cMargin; |
93 } |
90 } |
94 |
91 |
95 function TableFermentables($row) { |
92 function TableFermentables($row) { |
96 global $cost_fermentables; |
93 global $cost_fermentables; |
97 global $total_fermentables; |
94 global $total_fermentables; |
98 global $pSugar; |
95 global $pSugar; |
99 global $pCara; |
96 global $pCara; |
|
97 global $colorw; |
100 $vul = $this->w - $this->rMargin - $this->lMargin - 132; |
98 $vul = $this->w - $this->rMargin - $this->lMargin - 132; |
101 $this->AddCol($vul,'Grondstof','L'); |
99 $this->AddCol($vul,'Grondstof','L'); |
102 $this->AddCol(30,'Leverancier','L'); |
100 $this->AddCol(30,'Leverancier','L'); |
103 $this->AddCol(15,'EBC','R'); |
101 $this->AddCol(15,'EBC','R'); |
104 $this->AddCol(17,'Moment','L'); |
102 $this->AddCol(17,'Moment','L'); |
141 /* Calculate the amount of sugars */ |
139 /* Calculate the amount of sugars */ |
142 $d = $amount * ($yield / 100) * (1 - $moisture / 100); |
140 $d = $amount * ($yield / 100) * (1 - $moisture / 100); |
143 if ($added == "Mash") |
141 if ($added == "Mash") |
144 $d = floatval($row['efficiency']) / 100 * $d; |
142 $d = floatval($row['efficiency']) / 100 * $d; |
145 $sugf += $d; |
143 $sugf += $d; |
|
144 $colorw += ($amount * ebc_to_srm($color) / $row['batch_size']) * 8.34436; |
146 |
145 |
147 $this->Cell($vul,5,$name,0,0,'L',true); |
146 $this->Cell($vul,5,$name,0,0,'L',true); |
148 $this->Cell(30,5,$supplier,0,0,'L',true); |
147 $this->Cell(30,5,$supplier,0,0,'L',true); |
149 $this->Cell(15,5,sprintf("%.0f",$color),0,0,'R',true); |
148 $this->Cell(15,5,sprintf("%.0f",$color),0,0,'R',true); |
150 $this->Cell(17,5,added_type_names($added),0,0,'L',true); |
149 $this->Cell(17,5,added_type_names($added),0,0,'L',true); |
417 $this->Cell(35,5,'CO2',0,0,'L',true); |
417 $this->Cell(35,5,'CO2',0,0,'L',true); |
418 $this->Cell(25,5,sprintf("%.1f",$row['est_carb']).'%',0,0,'L',true); |
418 $this->Cell(25,5,sprintf("%.1f",$row['est_carb']).'%',0,0,'L',true); |
419 $this->Cell(25,5,'('.sprintf("%.1f",$row['st_carb_min']).' - '.sprintf("%.1f",$row['st_carb_max']).'%)',0,0,'L',true); |
419 $this->Cell(25,5,'('.sprintf("%.1f",$row['st_carb_min']).' - '.sprintf("%.1f",$row['st_carb_max']).'%)',0,0,'L',true); |
420 $this->Ln(); |
420 $this->Ln(); |
421 |
421 |
|
422 $row['est_color'] = kw_to_ebc($row['color_method'], $colorw); |
422 $this->SetX($this->TableX); |
423 $this->SetX($this->TableX); |
423 $this->Cell(35,5,'Kleur ('.$row['color_method'].')',0,0,'L',true); |
424 $this->Cell(35,5,'Kleur ('.$row['color_method'].')',0,0,'L',true); |
424 $beercolor = ebc_to_color($row['est_color']); |
425 $beercolor = ebc_to_color($row['est_color']); |
|
426 if ($row['est_color'] > 30) |
|
427 $this->SetTextColor(250); |
425 $this->SetFillColor($beercolor[0],$beercolor[1],$beercolor[2]); |
428 $this->SetFillColor($beercolor[0],$beercolor[1],$beercolor[2]); |
426 $this->Cell(25,5,$row['est_color'].' EBC',0,0,'L',true); |
429 $this->Cell(25,5,$row['est_color'].' EBC',0,0,'L',true); |
427 $this->Cell(25,5,'('.$row['st_color_min'].' - '.$row['st_color_max'].' EBC)',0,0,'L',true); |
430 $this->Cell(25,5,'('.$row['st_color_min'].' - '.$row['st_color_max'].' EBC)',0,0,'L',true); |
|
431 $this->SetTextColor(0); |
428 $this->SetFillColor(210,245,255); |
432 $this->SetFillColor(210,245,255); |
429 $this->Cell($vul,5,'',0,0,'L',false); |
433 $this->Cell($vul,5,'',0,0,'L',false); |
430 $this->Cell(35,5,'Bitterheid ('.$row['ibu_method'].')',0,0,'L',true); |
434 $this->Cell(35,5,'Bitterheid ('.$row['ibu_method'].')',0,0,'L',true); |
431 $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true); |
435 $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true); |
432 $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true); |
436 $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true); |