www/import/from_brouwhulp.php

changeset 163
4a4cc3497a57
parent 154
ef298b5aa994
child 175
da16371538c3
--- a/www/import/from_brouwhulp.php	Tue Jan 01 16:24:17 2019 +0100
+++ b/www/import/from_brouwhulp.php	Wed Jan 02 14:49:17 2019 +0100
@@ -1290,6 +1290,9 @@
 			$sql .= "', brew_date_end='" . $date_end;
 		}
 
+		$sql .= "', og='" . floatval($recipe->OG);
+		$sql .= "', fg='" . floatval($recipe->FG);
+
 		if ($recipe->PRIMARY_AGE && ($stageno >= 3)) {
 			/* PRIMARY_TEMP is the average of START_TEMP_PRIMARY MAX_TEMP_PRIMARY END_TEMP_PRIMARY */
 			$pdate = new DateTime($brewdate);
@@ -1343,19 +1346,36 @@
 			if ($recipe->AMOUNT_BOTTLING && $recipe->AMOUNT_PRIMING) {
 				$sql .= "', bottle_amount='" . floatval($recipe->AMOUNT_BOTTLING);
 				$sql .= "', bottle_carbonation='" . floatval($recipe->CARBONATION);
-				$sql .= "', bottle_priming_sugar='" . mysqli_real_escape_string($db, $recipe->PRIMING_SUGAR_BOTTLES);
+				if ($recipe->PRIMING_SUGAR_BOTTLES == "Saccharose")
+					$sql .= "', bottle_priming_sugar='Kristalsuiker";
+				else if ($recipe->PRIMING_SUGAR_BOTTLES == "Glucose or dextrose")
+					$sql .= "', bottle_priming_sugar='Glucose/dextrose";
+				else if ($recipe->PRIMING_SUGAR_BOTTLES == "Honey")
+					$sql .= "', bottle_priming_sugar='Honing";
+				else if ($recipe->PRIMING_SUGAR_BOTTLES == "DME")
+					$sql .= "', bottle_priming_sugar='Moutextract";
+				else if ($recipe->PRIMING_SUGAR_BOTTLES == "Molassis")
+					$sql .= "', bottle_priming_sugar='Melasse";
 				$sql .= "', bottle_priming_amount='" . floatval($recipe->AMOUNT_PRIMING);
 				$sql .= "', bottle_carbonation_temp='" . floatval($recipe->CARBONATION_TEMP);
 			}
 			if ($recipe->AMOUNT_KEGGED && $recipe->AMOUNT_PRIMING_KEGS) {
 				$sql .= "', keg_amount='" . floatval($recipe->AMOUNT_KEGGED);
 				$sql .= "', keg_carbonation='" . floatval($recipe->CARBONATION); // Lijkt wel hetzelfde als bottles
-				$sql .= "', keg_priming_sugar='" . mysqli_real_escape_string($db, $recipe->PRIMING_SUGAR_KEGS);
+				if ($recipe->PRIMING_SUGAR_BOTTLES == "Saccharose")
+					$sql .= "', keg_priming_sugar='Kristalsuiker";
+				else if ($recipe->PRIMING_SUGAR_BOTTLES == "Glucose or dextrose")
+					$sql .= "', keg_priming_sugar='Glucose/dextrose";
+				else if ($recipe->PRIMING_SUGAR_BOTTLES == "Honey")
+					$sql .= "', keg_priming_sugar='Honing";
+				else if ($recipe->PRIMING_SUGAR_BOTTLES == "DME")
+					$sql .= "', keg_priming_sugar='Moutextract";
+				else if ($recipe->PRIMING_SUGAR_BOTTLES == "Molassis")
+					$sql .= "', keg_priming_sugar='Melasse";
 				$sql .= "', keg_priming_amount='" . floatval($recipe->AMOUNT_PRIMING_KEGS);
 				$sql .= "', keg_carbonation_temp='" . floatval($recipe->KEG_CARB_TEMP);
 				($recipe->FORCED_CARB_KEGS == 'TRUE') ? $sql .= "', keg_forced_carb='1" : $sql .= "', keg_forced_carb='0";
 				$sql .= "', keg_pressure='" . floatval($recipe->KEG_PRESSURE);
-				$sql .= "', keg_priming_factor='" . floatval($recipe->KEG_PRIMING_FACTOR);
 			}
 		}
 

mercurial