450 $yeast .= ',"y_harvest_top":' . $item['y_harvest_top']; |
450 $yeast .= ',"y_harvest_top":' . $item['y_harvest_top']; |
451 $yeast .= ',"y_harvest_time":' . $item['y_harvest_time']; |
451 $yeast .= ',"y_harvest_time":' . $item['y_harvest_time']; |
452 $yeast .= ',"y_pitch_temperature":' . $item['y_pitch_temperature']; |
452 $yeast .= ',"y_pitch_temperature":' . $item['y_pitch_temperature']; |
453 $yeast .= ',"y_pofpos":' . $item['y_pofpos']; |
453 $yeast .= ',"y_pofpos":' . $item['y_pofpos']; |
454 $yeast .= ',"y_zymocide":' . $item['y_zymocide']; |
454 $yeast .= ',"y_zymocide":' . $item['y_zymocide']; |
|
455 $yeast .= ',"y_gr_hl_lo":' . $item['y_gr_hl_lo']; |
|
456 $yeast .= ',"y_sg_lo":' . $item['y_sg_lo']; |
|
457 $yeast .= ',"y_gr_hl_hi":' . $item['y_gr_hl_hi']; |
|
458 $yeast .= ',"y_sg_hi":' . $item['y_sg_hi']; |
455 $yeast .= ',"y_cost":' . $item['y_cost'] . '}'; |
459 $yeast .= ',"y_cost":' . $item['y_cost'] . '}'; |
456 //syslog(LOG_NOTICE, $yeast); |
460 //syslog(LOG_NOTICE, $yeast); |
457 $yeasts .= $yeast; |
461 $yeasts .= $yeast; |
458 } |
462 } |
459 } |
463 } |
956 for ($i = 0; $i < count($yeasts); $i++) { |
960 for ($i = 0; $i < count($yeasts); $i++) { |
957 $yeasts[$i]['y_inventory'] = 0; // Not in stock |
961 $yeasts[$i]['y_inventory'] = 0; // Not in stock |
958 $yeasts[$i]['y_avail'] = 0; // Ingredient not in db |
962 $yeasts[$i]['y_avail'] = 0; // Ingredient not in db |
959 if (! isset($yeasts[$i]['y_tolerance'])) |
963 if (! isset($yeasts[$i]['y_tolerance'])) |
960 $yeasts[$i]['y_tolerance'] = 0; |
964 $yeasts[$i]['y_tolerance'] = 0; |
961 $sql2 = "SELECT inventory,tolerance,sta1,bacteria,harvest_top,harvest_time,pitch_temperature,pofpos,zymocide "; |
965 $sql2 = "SELECT inventory,tolerance,sta1,bacteria,harvest_top,harvest_time,pitch_temperature,pofpos,zymocide,gr_hl_lo,sg_lo,gr_hl_hi,sg_hi "; |
962 $sql2 .= "FROM inventory_yeasts "; |
966 $sql2 .= "FROM inventory_yeasts "; |
963 $sql2 .= "WHERE name='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_name'])."' AND"; |
967 $sql2 .= "WHERE name='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_name'])."' AND"; |
964 $sql2 .= " form='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_form'])."' AND"; |
968 $sql2 .= " form='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_form'])."' AND"; |
965 $sql2 .= " laboratory='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_laboratory'])."' AND"; |
969 $sql2 .= " laboratory='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_laboratory'])."' AND"; |
966 $sql2 .= " product_id='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_product_id'])."'"; |
970 $sql2 .= " product_id='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_product_id'])."'"; |
983 $yeasts[$i]['y_pitch_temperature'] = floatval($obj->pitch_temperature); |
987 $yeasts[$i]['y_pitch_temperature'] = floatval($obj->pitch_temperature); |
984 if (! isset($yeasts[$i]['y_pofpos'])) |
988 if (! isset($yeasts[$i]['y_pofpos'])) |
985 $yeasts[$i]['y_pofpos'] = intval($obj->pofpos); |
989 $yeasts[$i]['y_pofpos'] = intval($obj->pofpos); |
986 if (! isset($yeasts[$i]['y_zymocide'])) |
990 if (! isset($yeasts[$i]['y_zymocide'])) |
987 $yeasts[$i]['y_zymocide'] = intval($obj->zymocide); |
991 $yeasts[$i]['y_zymocide'] = intval($obj->zymocide); |
|
992 if (! isset($yeasts[$i]['y_gr_hl_lo'])) |
|
993 $yeasts[$i]['y_gr_hl_lo'] = intval($obj->gr_hl_lo); |
|
994 if (! isset($yeasts[$i]['y_sg_lo'])) |
|
995 $yeasts[$i]['y_sg_lo'] = floatval($obj->sg_lo); |
|
996 if (! isset($yeasts[$i]['y_gr_hl_hi'])) |
|
997 $yeasts[$i]['y_gr_hl_hi'] = intval($obj->gr_hl_hi); |
|
998 if (! isset($yeasts[$i]['y_sg_hi'])) |
|
999 $yeasts[$i]['y_sg_hi'] = floatval($obj->sg_hi); |
988 } else { |
1000 } else { |
989 if (! isset($yeasts[$i]['y_sta1'])) |
1001 if (! isset($yeasts[$i]['y_sta1'])) |
990 $yeasts[$i]['y_sta1'] = 0; |
1002 $yeasts[$i]['y_sta1'] = 0; |
991 if (! isset($yeasts[$i]['y_bacteria'])) |
1003 if (! isset($yeasts[$i]['y_bacteria'])) |
992 $yeasts[$i]['y_bacteria'] = 0; |
1004 $yeasts[$i]['y_bacteria'] = 0; |