www/includes/db_product.php

changeset 726
872a3635e4ef
parent 715
8fb922c00a2d
child 738
11e6bd8d8107
--- a/www/includes/db_product.php	Fri Apr 09 14:45:18 2021 +0200
+++ b/www/includes/db_product.php	Sat Apr 10 14:46:06 2021 +0200
@@ -452,6 +452,10 @@
 			$yeast .= ',"y_pitch_temperature":' . $item['y_pitch_temperature'];
 			$yeast .= ',"y_pofpos":' . $item['y_pofpos'];
 			$yeast .= ',"y_zymocide":' . $item['y_zymocide'];
+			$yeast .= ',"y_gr_hl_lo":' . $item['y_gr_hl_lo'];
+			$yeast .= ',"y_sg_lo":' . $item['y_sg_lo'];
+			$yeast .= ',"y_gr_hl_hi":' . $item['y_gr_hl_hi'];
+			$yeast .= ',"y_sg_hi":' . $item['y_sg_hi'];
 			$yeast .= ',"y_cost":' . $item['y_cost'] . '}';
 			//syslog(LOG_NOTICE, $yeast);
 			$yeasts .= $yeast;
@@ -958,7 +962,7 @@
 				$yeasts[$i]['y_avail'] = 0;       // Ingredient not in db
 				if (! isset($yeasts[$i]['y_tolerance']))
                                         $yeasts[$i]['y_tolerance'] = 0;
-				$sql2 = "SELECT inventory,tolerance,sta1,bacteria,harvest_top,harvest_time,pitch_temperature,pofpos,zymocide ";
+				$sql2 = "SELECT inventory,tolerance,sta1,bacteria,harvest_top,harvest_time,pitch_temperature,pofpos,zymocide,gr_hl_lo,sg_lo,gr_hl_hi,sg_hi ";
 				$sql2 .= "FROM inventory_yeasts ";
 				$sql2 .= "WHERE name='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_name'])."' AND";
 				$sql2 .= " form='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_form'])."' AND";
@@ -985,6 +989,14 @@
                                                         $yeasts[$i]['y_pofpos'] = intval($obj->pofpos);
 						if (! isset($yeasts[$i]['y_zymocide']))
                                                         $yeasts[$i]['y_zymocide'] = intval($obj->zymocide);
+						if (! isset($yeasts[$i]['y_gr_hl_lo']))
+							$yeasts[$i]['y_gr_hl_lo'] = intval($obj->gr_hl_lo);
+						if (! isset($yeasts[$i]['y_sg_lo']))
+							$yeasts[$i]['y_sg_lo'] = floatval($obj->sg_lo);
+						if (! isset($yeasts[$i]['y_gr_hl_hi']))
+							$yeasts[$i]['y_gr_hl_hi'] = intval($obj->gr_hl_hi);
+						if (! isset($yeasts[$i]['y_sg_hi']))
+							$yeasts[$i]['y_sg_hi'] = floatval($obj->sg_hi);
 					} else {
                                                 if (! isset($yeasts[$i]['y_sta1']))
                                                         $yeasts[$i]['y_sta1'] = 0;

mercurial