www/import/from_brouwhulp.php

changeset 100
08c92cb740b9
parent 99
f433193f7bb6
child 102
679ddf512b65
--- a/www/import/from_brouwhulp.php	Sat Nov 17 15:58:13 2018 +0100
+++ b/www/import/from_brouwhulp.php	Sat Nov 17 19:44:39 2018 +0100
@@ -574,10 +574,13 @@
 				$fermentables .= ',"f_yield":' . $fyield;
 				if ($fermentable->COLOR) {
 					$srm = floatval($fermentable->COLOR);
-					$colorw += ($famount * $srm / $batch_size) * 8.34436;	/* Kleurwerking */
 					$ebc = srm_to_ebc($srm);
-					$fermentables .= ',"f_color":' . $ebc;
+				} else {
+					$srm = 0;
+					$ebc = 0;
 				}
+				$colorw += ($famount * $srm / $batch_size) * 8.34436;	/* Kleurwerking */
+				$fermentables .= ',"f_color":' . $ebc;
 				if ($fermentable->COARSE_FINE_DIFF)
 					$fermentables .= ',"f_coarse_fine_diff":' . floatval($fermentable->COARSE_FINE_DIFF);
 				else

mercurial