diff -r 463d64cce768 -r 804800d8e885 www/prod_print.php --- a/www/prod_print.php Tue Jun 04 16:38:53 2019 +0200 +++ b/www/prod_print.php Tue Jun 04 19:50:06 2019 +0200 @@ -237,10 +237,10 @@ $total_hops += $amount; $moment = $hopuse[$item['h_useat']]; - if ($item['h_useat'] == 2) { // Boil - $moment = "Koken ".$time." min"; + if (($item['h_useat'] == 2) || ($item['h_useat'] == 4)) { // Boil or Whirlpool + $moment = $hopuse[$item['h_useat']].' '.$time." min"; } else if ($item['h_useat'] == 5) { // Dryhop - $moment = 'Koudhop '.sprintf("%.0f", $time / 1440).' dagen'; + $moment = $hopuse[$item['h_useat']].' '.sprintf("%.0f", $time / 1440).' dagen'; } $ibu = calc_IBU($item['h_useat'], $item['h_form'], $preboil_sg, floatval($row['batch_size']), $mass, $time, $alpha, $row['ibu_method']); $total_ibus += $ibu; @@ -734,9 +734,9 @@ $arr = json_decode($row['json_fermentables'], true); foreach($arr as $item) { if ($item['f_added'] == 0) { // to mash - $s = sprintf("%.3f",floatval($item['f_amount'])).' kg '; + $s = sprintf("%.3f",floatval($item['f_amount'])).' kg `'; $s .= iconv('UTF-8','windows-1252',$item['f_name']); - $s .= ' ('.iconv('UTF-8','windows-1252',$item['f_supplier']).')'; + $s .= '` ('.iconv('UTF-8','windows-1252',$item['f_supplier']).')'; $this->Checkline($s); } } @@ -769,8 +769,16 @@ $hops = json_decode($row['json_hops'], true); foreach($hops as $item2) { if ($item2['h_useat'] == 0) { - $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; - $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' toevoegen'; + $s = sprintf("%.1f",$item2['h_amount']*1000).' gr `'; + $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` toevoegen'; + $this->Checkline($s); + } + } + $miscs = json_decode($row['json_miscs'], true); + foreach($miscs as $item3) { + if ($item3['m_use_use'] == 1 && $item3['m_type'] != 4) { // Only if not a water agent + $s = sprintf("%.2f",$item3['m_amount']*1000).' gr `'; + $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` toevoegen'; $this->Checkline($s); } } @@ -827,8 +835,8 @@ $hops = json_decode($row['json_hops'], true); foreach($hops as $item2) { if ($item2['h_useat'] == 1) { - $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; - $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' toevoegen na het spoelen'; + $s = sprintf("%.1f",$item2['h_amount']*1000).' gr `'; + $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` toevoegen na het spoelen'; $this->Checkline($s); } } @@ -844,8 +852,8 @@ $ferms = json_decode($row['json_fermentables'], true); foreach($ferms as $item1) { if ($item1['f_added'] == 1) { - $s = sprintf("%.3f",$item1['f_amount']).' kg '; - $s .= iconv('UTF-8','windows-1252',$item1['f_name']).' bij 10 minuten voor einde koken'; + $s = sprintf("%.3f",$item1['f_amount']).' kg `'; + $s .= iconv('UTF-8','windows-1252',$item1['f_name']).'` bij 10 minuten voor einde koken'; $this->Checkline($s); } } @@ -855,8 +863,8 @@ $hops = json_decode($row['json_hops'], true); foreach($hops as $item2) { if (($item2['h_useat'] == 2 || $item2['h_useat'] == 3) && ($item2['h_time'] == $i)) { - $s = sprintf("%.1f",$item2['h_amount']*1000).' gr '; - $s .= iconv('UTF-8','windows-1252',$item2['h_name']).' bij '; + $s = sprintf("%.1f",$item2['h_amount']*1000).' gr `'; + $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` bij '; if ($i > 0) $s .= $i.' minuten voor einde koken'; else @@ -867,8 +875,8 @@ $miscs = json_decode($row['json_miscs'], true); foreach($miscs as $item3) { if ($item3['m_use_use'] == 2 && $item3['m_time'] == $i) { - $s = sprintf("%.1f",$item3['m_amount']*1000).' gr '; - $s .= iconv('UTF-8','windows-1252',$item3['m_name']).' bij '; + $s = sprintf("%.1f",$item3['m_amount']*1000).' gr `'; + $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` bij '; if ($i > 0) $s .= $i.' minuten voor einde koken'; else @@ -904,6 +912,15 @@ $s = 'Whirlpool voor '.$row['brew_whirlpool6'].' min. Temperatuur tussen 60 en 66 '.DEG.'C houden'; $this->Checkline($s); } + $hops = json_decode($row['json_hops'], true); + foreach($hops as $item2) { + if ($item2['h_useat'] == 4) { + $s = sprintf("%.1f",$item2['h_amount']*1000).' gr `'; + $s .= iconv('UTF-8','windows-1252',$item2['h_name']).'` voor '; + $s .= $item2['h_time'].' minuten in de whirlpool'; + $this->Checkline($s); + } + } $this->Checkline('koelen tot '.sprintf("%.1f",$row['brew_cooling_to']).' '.DEG.'C'); if ($row['brew_whirlpool2'] > 0) { $s = 'Whirlpool voor '.$row['brew_whirlpool2'].' min.';