www/prod_print.php

changeset 338
a51b858aacca
parent 319
60002c09f78a
child 357
74d56bed75b9
equal deleted inserted replaced
337:faedcfa0610f 338:a51b858aacca
402 global $cost_fermentables; 402 global $cost_fermentables;
403 global $cost_hops; 403 global $cost_hops;
404 global $cost_miscs; 404 global $cost_miscs;
405 global $cost_yeasts; 405 global $cost_yeasts;
406 global $mashkg; 406 global $mashkg;
407 $colormethod = array( 'Morey', 'Mosher', 'Daniels' );
408 $ibumethod = array( 'Tinseth', 'Rager', 'Daniels' );
407 /* 2 Columns */ 409 /* 2 Columns */
408 $vul = $this->w - $this->rMargin - $this->lMargin - 170; 410 $vul = $this->w - $this->rMargin - $this->lMargin - 170;
409 $cMargin=$this->cMargin; 411 $cMargin=$this->cMargin;
410 $this->cMargin=2; 412 $this->cMargin=2;
411 $this->TableX=$this->lMargin; 413 $this->TableX=$this->lMargin;
459 $this->Cell(25,5,'('.sprintf("%.1f",$row['st_carb_min']).' - '.sprintf("%.1f",$row['st_carb_max']).'%)',0,0,'L',true); 461 $this->Cell(25,5,'('.sprintf("%.1f",$row['st_carb_min']).' - '.sprintf("%.1f",$row['st_carb_max']).'%)',0,0,'L',true);
460 $this->Ln(); 462 $this->Ln();
461 463
462 $row['est_color'] = kw_to_ebc($row['color_method'], $colorw); 464 $row['est_color'] = kw_to_ebc($row['color_method'], $colorw);
463 $this->SetX($this->TableX); 465 $this->SetX($this->TableX);
464 $this->Cell(35,5,'Kleur ('.$row['color_method'].')',0,0,'L',true); 466 $this->Cell(35,5,'Kleur ('.$colormethod[$row['color_method']].')',0,0,'L',true);
465 $beercolor = ebc_to_color($row['est_color']); 467 $beercolor = ebc_to_color($row['est_color']);
466 if ($row['est_color'] > 30) 468 if ($row['est_color'] > 30)
467 $this->SetTextColor(250); 469 $this->SetTextColor(250);
468 $this->SetFillColor($beercolor[0],$beercolor[1],$beercolor[2]); 470 $this->SetFillColor($beercolor[0],$beercolor[1],$beercolor[2]);
469 $this->Cell(25,5,$row['est_color'].' EBC',0,0,'L',true); 471 $this->Cell(25,5,$row['est_color'].' EBC',0,0,'L',true);
470 $this->Cell(25,5,'('.$row['st_color_min'].' - '.$row['st_color_max'].' EBC)',0,0,'L',true); 472 $this->Cell(25,5,'('.$row['st_color_min'].' - '.$row['st_color_max'].' EBC)',0,0,'L',true);
471 $this->SetTextColor(0); 473 $this->SetTextColor(0);
472 $this->SetFillColor(210,245,255); 474 $this->SetFillColor(210,245,255);
473 $this->Cell($vul,5,'',0,0,'L',false); 475 $this->Cell($vul,5,'',0,0,'L',false);
474 $this->Cell(35,5,'Bitterheid ('.$row['ibu_method'].')',0,0,'L',true); 476 $this->Cell(35,5,'Bitterheid ('.$ibumethod[$row['ibu_method']].')',0,0,'L',true);
475 $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true); 477 $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true);
476 $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true); 478 $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true);
477 $this->Ln(); 479 $this->Ln();
478 480
479 $this->SetX($this->TableX); 481 $this->SetX($this->TableX);

mercurial