In the checklist misc ingredients shows liquid or weight. In forum output whirlpool hops show the time in minutes.

Wed, 05 Jun 2019 15:39:37 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 05 Jun 2019 15:39:37 +0200
changeset 399
6f1cde4215d3
parent 398
7e8f1a7ddeeb
child 400
6d07c51e7540

In the checklist misc ingredients shows liquid or weight. In forum output whirlpool hops show the time in minutes.

www/prod_checklist.php file | annotate | diff | comparison | revisions
www/prod_forum.php file | annotate | diff | comparison | revisions
www/rec_forum.php file | annotate | diff | comparison | revisions
--- a/www/prod_checklist.php	Wed Jun 05 15:12:14 2019 +0200
+++ b/www/prod_checklist.php	Wed Jun 05 15:39:37 2019 +0200
@@ -110,7 +110,7 @@
 		}
 		foreach($miscs as $item) {
 			if ($item['m_type'] == 4) {	// Only the water agents
-				$unit = ($item['m_amount_is_weight']) ? " gram ":" ml ";
+				$unit = ($item['m_amount_is_weight']) ? " gr ":" ml ";
 				$this->Checkline(sprintf("%.1f",floatval($item['m_amount'] * 1000)).$unit.$item['m_name']);
 				$numsalts++;
 			}
@@ -161,7 +161,8 @@
 					}
 					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 `';
+							$unit = ($item3['m_amount_is_weight']) ? " gr ":" ml ";
+							$s = sprintf("%.2f",$item3['m_amount']*1000).$unit.'`';
 							$s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` toevoegen';
 							$this->Checkline($s);
 						}
@@ -254,7 +255,8 @@
 			}
 			foreach($miscs as $item3) {
 				if ($item3['m_use_use'] == 2 && $item3['m_time'] == $i) {
-					$s = sprintf("%.1f",$item3['m_amount']*1000).' gr `';
+					$unit = ($item3['m_amount_is_weight']) ? " gr ":" ml ";
+					$s = sprintf("%.1f",$item3['m_amount']*1000).$unit.'`';
 					$s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` bij ';
 					if ($i > 0)
 						$s .= $i.' minuten voor einde koken';
@@ -388,7 +390,8 @@
                 }
                 foreach($miscs as $item3) {
                         if ($item3['m_use_use'] == 3) {
-				$s = sprintf("%.1f",$item3['m_amount']*1000).' gr `';
+				$unit = ($item3['m_amount_is_weight']) ? " gr ":" ml ";
+				$s = sprintf("%.1f",$item3['m_amount']*1000).$unit.'`';
                                 $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` op dag 3 of 4 toevoegen';
                                 $this->Checkline($s);
 			}
@@ -482,7 +485,8 @@
                 }
 		foreach($miscs as $item3) {
                         if ($item3['m_use_use'] == 4) {
-                                $s = sprintf("%.1f",$item3['m_amount']*1000).' gr `';
+				$unit = ($item3['m_amount_is_weight']) ? " gr ":" ml ";
+                                $s = sprintf("%.1f",$item3['m_amount']*1000).$unit.'`';
                                 $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` voor ';
 				$s .= sprintf("%.0f",$item3['m_time']/1440).' dagen toevoegen';
                                 $this->Checkline($s);
@@ -536,7 +540,8 @@
                 }
 		foreach($miscs as $item3) {
                         if ($item3['m_use_use'] == 5) {
-                                $s = sprintf("%.1f",$item3['m_amount']*1000).' gr `';
+				$unit = ($item3['m_amount_is_weight']) ? " gr ":" ml ";
+                                $s = sprintf("%.1f",$item3['m_amount']*1000).$unit.'`';
                                 $s .= iconv('UTF-8','windows-1252',$item3['m_name']).'` bij bottelen toevoegen';
                                 $this->Checkline($s);
                         }
--- a/www/prod_forum.php	Wed Jun 05 15:12:14 2019 +0200
+++ b/www/prod_forum.php	Wed Jun 05 15:39:37 2019 +0200
@@ -141,10 +141,10 @@
         $alpha  = floatval($item['h_alpha']);
 	$ibu    = calc_IBU($item['h_useat'], $item['h_form'], $preboil_sg, floatval($row['batch_size']), $amount, $time, $alpha, $row['ibu_method']);
 	$moment = $hopuse[$item['h_useat']];
-        if ($item['h_useat'] == 2) {    // Boil
-        	$moment = "Koken ".$time." minuten";
+        if (($item['h_useat'] == 2) || ($item['h_useat'] == 4)) {    // Boil or Whirlpool
+        	$moment = $hopuse[$item['h_useat']].' '.$time." minuten";
 	} else if ($item['h_useat'] == 5) {	// Dryhop
-		$moment   = 'Koudhop '.sprintf("%.0f", $time / 1440).' dagen';
+		$moment = $hopuse[$item['h_useat']].' '.sprintf("%.0f", $time / 1440).' dagen';
         }
 
 	echo sprintf("%s %-7s %5.1f %5.1f %6.1f %-20s", $name, $hopform[$item['h_form']], $alpha, $ibu, $amount, $moment);
--- a/www/rec_forum.php	Wed Jun 05 15:12:14 2019 +0200
+++ b/www/rec_forum.php	Wed Jun 05 15:39:37 2019 +0200
@@ -141,10 +141,10 @@
         $alpha  = floatval($item['h_alpha']);
 	$ibu    = calc_IBU($item['h_useat'], $item['h_form'], $preboil_sg, floatval($row['batch_size']), $amount, $time, $alpha, $row['ibu_method']);
 	$moment = $hopuse[$item['h_useat']];
-        if ($item['h_useat'] == 2) {    // Boil
-        	$moment = "Koken ".$time." minuten";
+        if (($item['h_useat'] == 2) || ($item['h_useat'] == 4)) {    // Boil or Whirlpool
+        	$moment = $hopuse[$item['h_useat']].' '.$time." minuten";
 	} else if ($item['h_useat'] == 5) {	// Dryhop
-		$moment   = 'Koudhop '.sprintf("%.0f", $time / 1440).' dagen';
+		$moment = $hopuse[$item['h_useat']].' '.sprintf("%.0f", $time / 1440).' dagen';
         }
 
 	echo sprintf("%s %-7s %5.1f %5.1f %6.1f %-20s", $name, $hopform[$item['h_form']], $alpha, $ibu, $amount, $moment);

mercurial