166 $this->aCols=array(); |
167 $this->aCols=array(); |
167 } |
168 } |
168 |
169 |
169 function TableHops($row) { |
170 function TableHops($row) { |
170 global $total_hops; |
171 global $total_hops; |
|
172 global $total_ibus; |
171 global $cost_hops; |
173 global $cost_hops; |
172 $vul = $this->w - $this->rMargin - $this->lMargin - 135; |
174 $vul = $this->w - $this->rMargin - $this->lMargin - 135; |
173 $this->AddCol($vul,'Hop','L'); |
175 $this->AddCol($vul,'Hop','L'); |
174 $this->AddCol(35,'Land','L'); |
176 $this->AddCol(35,'Land','L'); |
175 $this->AddCol(15,'Soort','L'); |
177 $this->AddCol(15,'Soort','L'); |
207 $moment = hop_useat_names($useat); |
209 $moment = hop_useat_names($useat); |
208 if ($useat == "Boil") { |
210 if ($useat == "Boil") { |
209 $moment = "Kook@".$time; |
211 $moment = "Kook@".$time; |
210 } |
212 } |
211 $ibu = calc_IBU($useat, $form, floatval($row['est_og']), floatval($row['batch_size']), $mass, $time, $alpha, $row['ibu_method']); |
213 $ibu = calc_IBU($useat, $form, floatval($row['est_og']), floatval($row['batch_size']), $mass, $time, $alpha, $row['ibu_method']); |
|
214 $total_ibus += $ibu; |
212 |
215 |
213 $this->Cell($vul,5,$name,0,0,'L',true); |
216 $this->Cell($vul,5,$name,0,0,'L',true); |
214 $this->Cell(35,5,$origin,0,0,'L',true); |
217 $this->Cell(35,5,$origin,0,0,'L',true); |
215 $this->Cell(15,5,hop_form_names($form),0,0,'L',true); |
218 $this->Cell(15,5,hop_form_names($form),0,0,'L',true); |
216 $this->Cell(20,5,$moment,0,0,'L',true); |
219 $this->Cell(20,5,$moment,0,0,'L',true); |
220 $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); |
223 $this->Cell(20,5,sprintf("%8.3f",$cost).EURO,0,0,'R',true); |
221 $this->Ln(); |
224 $this->Ln(); |
222 } |
225 } |
223 |
226 |
224 $this->SetFillColor(210,245,255); |
227 $this->SetFillColor(210,245,255); |
225 $this->Cell($vul+97,5,'',0,0,'L',false); |
228 $this->Cell($vul+85,5,'',0,0,'L',false); |
|
229 $this->Cell(12,5,sprintf("%.1f",$total_ibus),0,0,'R',true); |
226 $this->Cell(18,5,sprintf("%.1f",$total_hops),0,0,'R',true); |
230 $this->Cell(18,5,sprintf("%.1f",$total_hops),0,0,'R',true); |
227 $this->Cell(20,5,sprintf("%8.3f",$cost_hops).EURO,0,0,'R',true); |
231 $this->Cell(20,5,sprintf("%8.3f",$cost_hops).EURO,0,0,'R',true); |
228 $this->Ln(10); |
232 $this->Ln(10); |
229 $this->ProcessingTable=false; |
233 $this->ProcessingTable=false; |
230 $this->cMargin=$cMargin; |
234 $this->cMargin=$cMargin; |
409 $this->SetFillColor(210,245,255); |
417 $this->SetFillColor(210,245,255); |
410 $this->Cell($vul,5,'',0,0,'L',false); |
418 $this->Cell($vul,5,'',0,0,'L',false); |
411 $this->Cell(35,5,'Bitterheid ('.$row['ibu_method'].')',0,0,'L',true); |
419 $this->Cell(35,5,'Bitterheid ('.$row['ibu_method'].')',0,0,'L',true); |
412 $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true); |
420 $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true); |
413 $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true); |
421 $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true); |
414 $this->Ln(10); |
422 $this->Ln(); |
|
423 |
|
424 $this->SetX($this->TableX); |
|
425 $cost_total = $cost_fermentables + $cost_hops + $cost_miscs + $cost_yeasts; |
|
426 $this->Cell(35,5,'Kosten',0,0,'L',true); |
|
427 $this->Cell(25,5,sprintf("%.2f",$cost_total).EURO,0,0,'L',true); |
|
428 $this->Cell(25,5,sprintf("%.2f",$cost_total/$row['batch_size']).EURO.' / liter',0,0,'L',true); |
|
429 $this->Ln(10); |
|
430 |
|
431 |
415 // Kostprijs per liter, calorieren |
432 // Kostprijs per liter, calorieren |
416 $this->cMargin=$cMargin; |
433 $this->cMargin=$cMargin; |
417 } |
434 } |
418 } |
435 } |
419 |
436 |