Sat, 10 Nov 2018 17:23:53 +0100
Added recipe print yeasts section.
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | <?php |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
3 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | require_once($_SERVER['DOCUMENT_ROOT'].'/fpdf/fpdf.php'); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
8 | if (! $link) { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
9 | die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
10 | } |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
11 | if (! mysqli_set_charset($link, "utf8" )) { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
12 | echo "error"; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
13 | return 1; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
14 | } |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
15 | |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | setlocale ( LC_ALL, 'nl_NL.UTF-8'); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | $record = $_GET["record"]; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | $result = mysqli_query($link, "SELECT * FROM recipes WHERE record='".$record."'"); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | $row = mysqli_fetch_array($result); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
21 | $total_fermentables = 0.0; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
22 | $cost_fermentables = 0.0; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
23 | $total_hops = 0.0; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
24 | $cost_hops = 0.0; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
25 | $cost_yeasts = 0.0; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
26 | $cost_miscs = 0.0; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
27 | |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
28 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
29 | class PDF_MySQL_Table extends FPDF |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | { |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | protected $ProcessingTable=false; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | protected $aCols=array(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
33 | protected $TableX; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
34 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
35 | function Header() { |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
36 | // Print the table header if necessary |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
37 | if ($this->ProcessingTable) |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
38 | $this->TableHeader(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
39 | } |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
40 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
41 | function TableHeader() { |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
42 | $this->SetFont('Helvetica','B',9); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
43 | $this->SetX($this->TableX); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
44 | $this->SetFillColor(255,150,100); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
45 | foreach($this->aCols as $col) |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
46 | $this->Cell($col['w'],5,$col['c'],0,0,$col['a'],true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
47 | $this->Ln(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
48 | } |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
49 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
50 | function AddCol($width=-1, $caption='', $align='L') { |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
51 | $this->aCols[]=array('c'=>$caption,'w'=>$width,'a'=>$align); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
52 | } |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
53 | |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
54 | function TableGlobal($row) { |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
55 | /* 2 Columns */ |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
56 | $vul = $this->w - $this->rMargin - $this->lMargin - 170; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
57 | $cMargin=$this->cMargin; |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
58 | $this->cMargin=2; |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
59 | $this->TableX=$this->lMargin; |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
60 | $this->SetFont('Helvetica','B',9); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
61 | $this->SetX($this->TableX); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
62 | $this->SetFillColor(255,150,100); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
63 | $this->Cell(0, 5, 'Recept overzicht',0,0,'C',true); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
64 | $this->Ln(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
65 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
66 | $this->SetFont('Helvetica','',9); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
67 | $this->SetFillColor(210,245,255); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
68 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
69 | $this->SetX($this->TableX); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
70 | $this->Cell(35,5,'Type',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
71 | $this->Cell(25,5,$row['type'],0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
72 | $this->Cell(25,5,'',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
73 | $this->Cell($vul,5,'',0,0,'L',false); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
74 | $this->Cell(35,5,'Batch grootte',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
75 | $this->Cell(25,5,$row['batch_size'].' liter',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
76 | $this->Cell(25,5,'',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
77 | $this->Ln(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
78 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
79 | $this->SetX($this->TableX); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
80 | $this->Cell(35,5,'Kooktijd',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
81 | $this->Cell(25,5,$row['boil_time'].' minuten',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
82 | $this->Cell(25,5,'',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
83 | $this->Cell($vul,5,'',0,0,'L',false); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
84 | $this->Cell(35,5,'Brouwzaal rendement',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
85 | $this->Cell(25,5,$row['efficiency'].' %',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
86 | $this->Cell(25,5,'',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
87 | $this->Ln(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
88 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
89 | $this->SetX($this->TableX); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
90 | $this->Cell(35,5,'Start SG',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
91 | $this->Cell(25,5,sprintf("%.3f",$row['est_og']),0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
92 | $this->Cell(25,5,'('.sprintf("%.3f",$row['st_og_min']).' - '.sprintf("%.3f",$row['st_og_max']).')',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
93 | $this->Cell($vul,5,'',0,0,'L',false); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
94 | $this->Cell(35,5,'Eind SG',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
95 | $this->Cell(25,5,sprintf("%.3f",$row['est_fg']),0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
96 | $this->Cell(25,5,'('.sprintf("%.3f",$row['st_fg_min']).' - '.sprintf("%.3f",$row['st_fg_max']).')',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
97 | $this->Ln(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
98 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
99 | $this->SetX($this->TableX); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
100 | $this->Cell(35,5,'Geschat alcohol',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
101 | $this->Cell(25,5,sprintf("%.1f",$row['est_abv']).'%',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
102 | $this->Cell(25,5,'('.sprintf("%.1f",$row['st_abv_min']).' - '.sprintf("%.1f",$row['st_abv_max']).'%)',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
103 | $this->Cell($vul,5,'',0,0,'L',false); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
104 | $this->Cell(35,5,'CO2',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
105 | $this->Cell(25,5,sprintf("%.1f",$row['est_carb']).'%',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
106 | $this->Cell(25,5,'('.sprintf("%.1f",$row['st_carb_min']).' - '.sprintf("%.1f",$row['st_carb_max']).'%)',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
107 | $this->Ln(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
108 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
109 | $this->SetX($this->TableX); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
110 | $this->Cell(35,5,'Kleur ('.$row['color_method'].')',0,0,'L',true); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
111 | $beercolor = ebc_to_color($row['est_color']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
112 | $this->SetFillColor($beercolor[0],$beercolor[1],$beercolor[2]); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
113 | $this->Cell(25,5,$row['est_color'].' EBC',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
114 | $this->Cell(25,5,'('.$row['st_color_min'].' - '.$row['st_color_max'].' EBC)',0,0,'L',true); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
115 | $this->SetFillColor(210,245,255); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
116 | $this->Cell($vul,5,'',0,0,'L',false); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
117 | $this->Cell(35,5,'Bitterheid ('.$row['ibu_method'].')',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
118 | $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
119 | $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
120 | $this->Ln(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
121 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
122 | $this->cMargin=$cMargin; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
123 | } |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
124 | |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
125 | function TableFermentables($row) { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
126 | global $cost_fermentables; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
127 | global $total_fermentables; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
128 | $vul = $this->w - $this->rMargin - $this->lMargin - 130; |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
129 | $this->AddCol($vul,'Grondstof','L'); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
130 | $this->AddCol(30,'Leverancier','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
131 | $this->AddCol(15,'EBC','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
132 | $this->AddCol(15,'Moment','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
133 | $this->AddCol(20,'Kg','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
134 | $this->AddCol(15,'Procent','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
135 | $this->AddCol(15,'Opbr.','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
136 | $this->AddCol(20,'Prijs','R'); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
137 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
138 | $cMargin=$this->cMargin; |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
139 | $this->cMargin=2; |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
140 | $this->TableX=$this->lMargin; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
141 | $this->TableHeader(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
142 | $this->ProcessingTable=true; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
143 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
144 | $this->SetFont('Helvetica','',9); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
145 | $this->SetFillColor(250, 195, 65); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
146 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
147 | $arr = json_decode($row['json_fermentables'], true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
148 | foreach($arr as $item) { //foreach element in $arr |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
149 | $name = iconv('UTF-8','windows-1252',$item['f_name']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
150 | $supplier = iconv('UTF-8','windows-1252',$item['f_supplier']); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
151 | $amount = floatval($item['f_amount']); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
152 | $costkg = floatval($item['f_cost']); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
153 | $yield = floatval($item['f_yield']); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
154 | $color = floatval($item['f_color']); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
155 | $percent = floatval($item['f_percentage']); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
156 | if ($item['f_added'] == "Boil") |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
157 | $add = "Koken"; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
158 | else if ($item['f_added'] == "Mash") |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
159 | $add = "Maisch"; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
160 | else |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
161 | $add = $item['f_added']; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
162 | $cost = $amount * $costkg; |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
163 | $cost_fermentables += $cost; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
164 | $total_fermentables += $amount; |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
165 | $this->Cell($vul,5,$name,0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
166 | $this->Cell(30,5,$supplier,0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
167 | $this->Cell(15,5,sprintf("%.0f",$color),0,0,'R',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
168 | $this->Cell(15,5,$add,0,0,'L',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
169 | $this->Cell(20,5,sprintf("%8.3f",$amount),0,0,'R',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
170 | $this->Cell(15,5,sprintf("%.1f%%",$percent),0,0,'R',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
171 | $this->Cell(15,5,sprintf("%.1f%%",$yield),0,0,'R',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
172 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
173 | $this->Ln(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
174 | } |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
175 | |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
176 | $this->SetFillColor(210,245,255); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
177 | $this->Cell($vul+60,5,'',0,0,'L',false); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
178 | $this->Cell(20,5,sprintf("%8.3f",$total_fermentables),0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
179 | $this->Cell(30,5,'',0,0,'L',false); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
180 | $this->Cell(20,5,sprintf("%8.3f",$cost_fermentables).EURO,0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
181 | $this->Ln(); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
182 | $this->ProcessingTable=false; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
183 | $this->cMargin=$cMargin; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
184 | $this->aCols=array(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
185 | } |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
186 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
187 | function TableHops($row) { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
188 | global $total_hops; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
189 | global $cost_hops; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
190 | $vul = $this->w - $this->rMargin - $this->lMargin - 135; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
191 | $this->AddCol($vul,'Hop','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
192 | $this->AddCol(35,'Land','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
193 | $this->AddCol(15,'Soort','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
194 | $this->AddCol(20,'Moment','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
195 | $this->AddCol(15,'Alpha','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
196 | $this->AddCol(12,'IBU','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
197 | $this->AddCol(18,'Gram','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
198 | $this->AddCol(20,'Prijs','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
199 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
200 | $cMargin=$this->cMargin; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
201 | $this->cMargin=2; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
202 | $this->TableX=$this->lMargin; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
203 | $this->TableHeader(); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
204 | $this->ProcessingTable=true; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
205 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
206 | $this->SetFont('Helvetica','',9); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
207 | $this->SetFillColor(100, 250, 65); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
208 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
209 | $arr = json_decode($row['json_hops'], true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
210 | foreach($arr as $item) { //foreach element in $arr |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
211 | $name = iconv('UTF-8','windows-1252',$item['h_name']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
212 | $origin = iconv('UTF-8','windows-1252',$item['h_origin']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
213 | $useat = iconv('UTF-8','windows-1252',$item['h_useat']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
214 | $form = iconv('UTF-8','windows-1252',$item['h_form']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
215 | $amount = floatval($item['h_amount']) * 1000; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
216 | $mass = $amount; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
217 | $costkg = floatval($item['h_cost']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
218 | $time = floatval($item['h_time']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
219 | $alpha = floatval($item['h_alpha']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
220 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
221 | $cost = ($amount * $costkg) / 1000; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
222 | $cost_hops += $cost; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
223 | $total_hops += $amount; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
224 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
225 | $fmoment = 1.0; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
226 | $moment = "Kook@".$time; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
227 | if (($useat == "Dry Hop") || ($useat == "Dry hop")) { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
228 | $fmoment = 0.0; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
229 | $moment = "Dry-hop"; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
230 | } else if ($useat == "Whirlpool") { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
231 | $fmoment = 0.0; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
232 | $moment = "Whirlpool"; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
233 | } else if ($useat == "Mash") { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
234 | $fmoment = 0.7; // Brouwhulp |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
235 | $moment = "Maischen"; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
236 | } else if (($useat == "First Wort") || ($useat == "First wort")) { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
237 | $fmoment = 1.1; // Brouwhulp, Louis, Ozzie |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
238 | $moment = "First wort"; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
239 | } else if ($useat == "Aroma") { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
240 | $fmoment = 0.0; // Brouwhulp 1.0 redeneert vlamuit. |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
241 | $moment = "Vlamuit"; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
242 | } |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
243 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
244 | $pfactor = 1.0; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
245 | if ($form == "Pellet") { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
246 | $pfactor = 1.1; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
247 | } |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
248 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
249 | /* Tinseth only for now */ |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
250 | $AddedAlphaAcids = (($alpha / 100) * $mass * 1000) / floatval($row['batch_size']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
251 | $Bigness_factor = 1.65 * pow( 0.000125, floatval($row['est_og']) - 1); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
252 | $BoilTime_factor = ((1 - exp(-0.04 * $time)) / 4.15); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
253 | $utiisation = $Bigness_factor * $BoilTime_factor; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
254 | $ibu = (round($utiisation * $AddedAlphaAcids * $fmoment * $pfactor * 10) / 10.0); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
255 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
256 | $this->Cell($vul,5,$name,0,0,'L',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
257 | $this->Cell(35,5,$origin,0,0,'L',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
258 | $this->Cell(15,5,$form,0,0,'L',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
259 | $this->Cell(20,5,$moment,0,0,'L',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
260 | $this->Cell(15,5,sprintf("%.1f%%",$alpha),0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
261 | $this->Cell(12,5,sprintf("%.1f",$ibu),0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
262 | $this->Cell(18,5,sprintf("%.1f",$amount),0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
263 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
264 | $this->Ln(); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
265 | } |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
266 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
267 | $this->SetFillColor(210,245,255); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
268 | $this->Cell($vul+97,5,'',0,0,'L',false); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
269 | $this->Cell(18,5,sprintf("%.1f",$total_hops),0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
270 | $this->Cell(20,5,sprintf("%8.3f",$cost_hops).EURO,0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
271 | $this->Ln(); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
272 | $this->ProcessingTable=false; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
273 | $this->cMargin=$cMargin; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
274 | $this->aCols=array(); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
275 | } |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
276 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
277 | function TableYeasts($row) { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
278 | global $cost_yeasts; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
279 | $vul = $this->w - $this->rMargin - $this->lMargin - 140; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
280 | $this->AddCol(27,'Laboratorium','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
281 | $this->AddCol(18,'Product','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
282 | $this->AddCol($vul,'Gist','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
283 | $this->AddCol(20,'Gebruik','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
284 | $this->AddCol(15,'Attn','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
285 | $this->AddCol(22,'Vorm','L'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
286 | $this->AddCol(18,'Gram','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
287 | $this->AddCol(20,'Prijs','R'); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
288 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
289 | $cMargin=$this->cMargin; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
290 | $this->cMargin=2; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
291 | $this->TableX=$this->lMargin; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
292 | $this->TableHeader(); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
293 | $this->ProcessingTable=true; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
294 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
295 | $this->SetFont('Helvetica','',9); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
296 | $this->SetFillColor(175, 175, 255); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
297 | $svg = 70; /* Conservative SVG% as default */ |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
298 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
299 | $arr = json_decode($row['json_yeasts'], true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
300 | foreach($arr as $item) { //foreach element in $arr |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
301 | $name = iconv('UTF-8','windows-1252',$item['y_name']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
302 | $laboratory = iconv('UTF-8','windows-1252',$item['y_laboratory']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
303 | $product_id = iconv('UTF-8','windows-1252',$item['y_product_id']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
304 | $form = iconv('UTF-8','windows-1252',$item['y_form']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
305 | $use = iconv('UTF-8','windows-1252',$item['y_use']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
306 | $amount = floatval($item['y_amount']) * 1000; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
307 | $costg = floatval($item['y_cost']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
308 | $attenuation = floatval($item['y_attenuation']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
309 | $cost = $amount * $costg; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
310 | $cost_yeasts += $cost; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
311 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
312 | if ($use == "Primary") { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
313 | $svg = $attenuation; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
314 | $gebruik = 'Hoofdgist'; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
315 | } else if ($use == "Bottle") |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
316 | $gebruik = 'Bottelgist'; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
317 | else |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
318 | $gebruik = $use; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
319 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
320 | if ($form == "Liquid") |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
321 | $vorm = 'Vloeibaar'; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
322 | else if ($form == "Dry") |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
323 | $vorm = 'Droog'; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
324 | else if ($form == "Slant") |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
325 | $vorm = 'Schuine buis'; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
326 | else if ($form == "Culture") |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
327 | $vorm = 'Slurry'; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
328 | else if ($form == "Frozen") |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
329 | $vorm = 'Ingevroren'; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
330 | else if ($form == "Bottel") |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
331 | $vorm = 'Depot'; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
332 | else |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
333 | $vorm = $form; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
334 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
335 | $this->Cell(27,5,$laboratory,0,0,'L',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
336 | $this->Cell(18,5,$product_id,0,0,'L',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
337 | $this->Cell($vul,5,$name,0,0,'L',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
338 | $this->Cell(20,5,$gebruik,0,0,'L',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
339 | $this->Cell(15,5,sprintf("%.1f%%",$attenuation),0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
340 | $this->Cell(22,5,$vorm,0,0,'L',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
341 | $this->Cell(18,5,sprintf("%.1f",$amount),0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
342 | $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
343 | $this->Ln(); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
344 | } |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
345 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
346 | $this->SetFillColor(210,245,255); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
347 | $this->Cell($vul+120,5,'',0,0,'L',false); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
348 | $this->Cell(20,5,sprintf("%8.3f",$cost_yeasts).EURO,0,0,'R',true); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
349 | $this->Ln(); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
350 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
351 | $og = floatval($row['est_og']); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
352 | $fg = $og - ($svg * ($og - 1.0)) / 100; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
353 | $this->Cell(0,5,'FG: '.sprintf("%5.3f",$fg),0,0,'L',false); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
354 | $this->Ln(); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
355 | $this->ProcessingTable=false; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
356 | $this->cMargin=$cMargin; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
357 | $this->aCols=array(); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
358 | } |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
359 | |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
360 | /* |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
361 | MiscColor:= RGBtoColor(240, 250, 65); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
362 | WaterAgentColor:= RGBtoColor(240, 140, 130); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
363 | FiningColor:= RGBtoColor(95, 180, 25); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
364 | WaterColor:= RGBtoColor(120, 255, 250); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
365 | */ |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
366 | function TableMiscs($row) { |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
367 | global $cost_miscs; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
368 | $vul = $this->w - $this->rMargin - $this->lMargin - 135; |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
369 | } |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
370 | } |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
371 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
372 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
373 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
374 | class PDF extends PDF_MySQL_Table { |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
375 | function Header() { |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
376 | global $row; |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
377 | $this->Image('images/logo.png',10,6,30); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
378 | // Title |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
379 | $this->SetFont('Helvetica','B',18); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
380 | $this->SetX(45); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
381 | $this->Cell(0,8,$row['name'],1,1,'L'); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
382 | $this->Ln(20); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
383 | // Ensure table header is printed |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
384 | parent::Header(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
385 | } |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
386 | } |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
387 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
388 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
389 | /* |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
390 | * Generate PDF from recipe data |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
391 | */ |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
392 | $pdf = new PDF(); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
393 | $pdf->AddPage(); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
394 | $pdf->TableGlobal($row); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
395 | $pdf->Ln(10); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
396 | $pdf->TableFermentables($row); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
397 | $pdf->Ln(10); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
398 | $pdf->TableHops($row); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
399 | $pdf->Ln(10); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
400 | $pdf->TableYeasts($row); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
401 | $pdf->Ln(10); |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
402 | $pdf->TableMiscs($row); |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
403 | |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
404 | //$pdf->SetFont('Helvetica','',10); |
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
405 | //$pdf->Cell(0,10,'Receptje '.$record,0,1,'C'); |
83
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
406 | // Disclaimer toeveogen dat dit alleen recept ontwikkeling is. |
85521c6e0022
Added recipe print yeasts section.
Michiel Broek <mbroek@mbse.eu>
parents:
80
diff
changeset
|
407 | // Footer sectie met berekende/geschatte uitkomsten zoals FG, ABV, kostprijs per liter enz. |
80
75b9227fb98c
Added beginning of recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
408 | $pdf->Output(); |