Mon, 01 Apr 2019 19:52:34 +0200
Fixed color and IBU method display in recipe and product print pages.
www/prod_print.php | file | annotate | diff | comparison | revisions | |
www/rec_print.php | file | annotate | diff | comparison | revisions |
--- a/www/prod_print.php Sun Mar 31 20:14:34 2019 +0200 +++ b/www/prod_print.php Mon Apr 01 19:52:34 2019 +0200 @@ -404,6 +404,8 @@ global $cost_miscs; global $cost_yeasts; global $mashkg; + $colormethod = array( 'Morey', 'Mosher', 'Daniels' ); + $ibumethod = array( 'Tinseth', 'Rager', 'Daniels' ); /* 2 Columns */ $vul = $this->w - $this->rMargin - $this->lMargin - 170; $cMargin=$this->cMargin; @@ -461,7 +463,7 @@ $row['est_color'] = kw_to_ebc($row['color_method'], $colorw); $this->SetX($this->TableX); - $this->Cell(35,5,'Kleur ('.$row['color_method'].')',0,0,'L',true); + $this->Cell(35,5,'Kleur ('.$colormethod[$row['color_method']].')',0,0,'L',true); $beercolor = ebc_to_color($row['est_color']); if ($row['est_color'] > 30) $this->SetTextColor(250); @@ -471,7 +473,7 @@ $this->SetTextColor(0); $this->SetFillColor(210,245,255); $this->Cell($vul,5,'',0,0,'L',false); - $this->Cell(35,5,'Bitterheid ('.$row['ibu_method'].')',0,0,'L',true); + $this->Cell(35,5,'Bitterheid ('.$ibumethod[$row['ibu_method']].')',0,0,'L',true); $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true); $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true); $this->Ln();
--- a/www/rec_print.php Sun Mar 31 20:14:34 2019 +0200 +++ b/www/rec_print.php Mon Apr 01 19:52:34 2019 +0200 @@ -381,6 +381,8 @@ global $cost_hops; global $cost_miscs; global $cost_yeasts; + $colormethod = array( 'Morey', 'Mosher', 'Daniels' ); + $ibumethod = array( 'Tinseth', 'Rager', 'Daniels' ); /* 2 Columns */ $vul = $this->w - $this->rMargin - $this->lMargin - 170; $cMargin=$this->cMargin; @@ -420,7 +422,7 @@ $row['est_color'] = kw_to_ebc($row['color_method'], $colorw); $this->SetX($this->TableX); - $this->Cell(35,5,'Kleur ('.$row['color_method'].')',0,0,'L',true); + $this->Cell(35,5,'Kleur ('.$colormethod[$row['color_method']].')',0,0,'L',true); $beercolor = ebc_to_color($row['est_color']); if ($row['est_color'] > 30) $this->SetTextColor(250); @@ -430,7 +432,7 @@ $this->SetTextColor(0); $this->SetFillColor(210,245,255); $this->Cell($vul,5,'',0,0,'L',false); - $this->Cell(35,5,'Bitterheid ('.$row['ibu_method'].')',0,0,'L',true); + $this->Cell(35,5,'Bitterheid ('.$ibumethod[$row['ibu_method']].')',0,0,'L',true); $this->Cell(25,5,sprintf("%.0f",$row['est_ibu']).' IBU',0,0,'L',true); $this->Cell(25,5,'('.$row['st_ibu_min'].' - '.$row['st_ibu_max'].' IBU)',0,0,'L',true); $this->Ln();