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