diff -r fb1e88f1c643 -r 08c824a5ffd8 www/prod_print.php --- a/www/prod_print.php Thu Feb 14 14:42:52 2019 +0100 +++ b/www/prod_print.php Thu Feb 14 16:11:29 2019 +0100 @@ -486,9 +486,12 @@ } function Checkline($text) { - $this->Rect(10,$this->GetY(),4,4); - $this->SetX(15); - $this->Cell(0, 4,$text,0,1,'L',true); + // $this->SetX(5); + $this->Cell(2, 4,' ',0,0,'L',true); + $this->Cell(4, 4,' ',1,0,'L',true); + // $this->Rect(10,$this->GetY(),4,4); + // $this->SetX(15); + $this->Cell(0, 4,' '.$text,0,1,'L',true); $this->Ln(1); } @@ -513,7 +516,8 @@ $arr = json_decode($row['json_miscs'], true); foreach($arr as $item) { if ($item['m_type'] == 4) { // Only the water agents - $this->Checkline(sprintf("%.1f",floatval($item['m_amount'] * 1000)).' gram '.$item['m_name']); + $unit = ($item['m_amount_is_weight']) ? " gram ":" ml "; + $this->Checkline(sprintf("%.1f",floatval($item['m_amount'] * 1000)).$unit.$item['m_name']); $numsalts++; } } @@ -712,14 +716,42 @@ $this->Ln(5); $this->Checkheader('Gist enten'); - // 'wort beluchten' - // 'evt. giststarter afgieten' - // 'gist hydrateren in ' ' ml gedesinfecteerd water van ' - // '15 minuten laten staan bij ' - // 'gistmengsel voorzichtig roeren' - // 'langzaam laten afkoelen tot ' 'temperatuur wort' - // 'gist toevoegen' - // ' water toevoegen in gistvat' (topupwater) + + $dry = 0; + $yeasts = json_decode($row['json_yeasts'], true); + foreach ($yeasts as $item) { + if ($item['y_use'] == 0) { // primary + if ($item['y_form'] == 0) { // Liquid + $this->Checkline($item['y_amount'].' pak '.$item['y_product_id'].', '.$item['y_name'].' gist'); + } else if ($item['y_form'] == 1) { // Dry + $s = sprintf("%.1f",$item['y_amount']*1000).' gram '.$item['y_product_id'].', '.$item['y_name']; + $s .= ' gist'; + $dry += $item['y_amount']*10000; + $this->Checkline($s); + } else { // Slant/Culture/Frozen/Bottle + $s = sprintf("%.0f",$item['y_amount']*1000).' ml '.$item['y_product_id'].', '.$item['y_name'].' gist'; + $this->Checkline($s); + } + } + } + if ($dry > 0) { + $this->Checkline(' gist hydrateren in '.$dry.' ml gedesinfecteerd water van 32 '.DEG.'C'); + $this->Checkline(' 15 minuten laten staan bij 32 '.DEG.'C'); + $this->Checkline(' gistmengsel voorzichtig roeren en laten afkoelen tot temperatuur wort'); + $this->Checkline(' gist toevoegen'); + $this->Checkline('Of'); + $this->Checkline(' gist rechtstreeks over het wort strooien'); + } else { + $this->Checkline('eventueel giststarter afgieten'); + $this->Checkline('gist toevoegen'); + } + if ($row['brew_fermenter_extrawater'] > 0) + $this->Checkline(sprintf("%.1f", $row['brew_fermenter_extrawater']).' liter water toevoegen in gistvat'); + if ($row['brew_aeration_type'] > 0) { + $s = 'wort '.$row['brew_aeration_time'].' minuten beluchten met '; + $s .= ($row['brew_aeration_type'] == 1) ? "lucht":"zuurstof"; + $this->Checkline($s); + } if ($this->GetY() > 200) $this->AddPage(); else