Version 0.3.14. Added yeast viability calculations for liquid yeast packs.

Sat, 24 Aug 2019 21:52:46 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 24 Aug 2019 21:52:46 +0200
changeset 457
b9055393b802
parent 456
00b199dccf72
child 458
47b592993dd5

Version 0.3.14. Added yeast viability calculations for liquid yeast packs.

config.status file | annotate | diff | comparison | revisions
configure file | annotate | diff | comparison | revisions
configure.ac file | annotate | diff | comparison | revisions
www/includes/db_product.php file | annotate | diff | comparison | revisions
www/js/prod_edit.js file | annotate | diff | comparison | revisions
www/prod_edit.php file | annotate | diff | comparison | revisions
--- a/config.status	Sat Aug 24 19:48:23 2019 +0200
+++ b/config.status	Sat Aug 24 21:52:46 2019 +0200
@@ -621,7 +621,7 @@
 S["CC"]="gcc"
 S["CYEARS"]="2016-2019"
 S["COPYRIGHT"]="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved"
-S["VERSION"]="0.3.13"
+S["VERSION"]="0.3.14"
 S["PACKAGE"]="bms"
 S["SUBDIRS"]="bmsd doc script tools www"
 S["target_alias"]=""
@@ -710,7 +710,7 @@
 D["PACKAGE_STRING"]=" \"\""
 D["PACKAGE_BUGREPORT"]=" \"\""
 D["PACKAGE_URL"]=" \"\""
-D["VERSION"]=" \"0.3.13\""
+D["VERSION"]=" \"0.3.14\""
 D["COPYRIGHT"]=" \"Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved\""
 D["STDC_HEADERS"]=" 1"
 D["HAVE_SYS_TYPES_H"]=" 1"
--- a/configure	Sat Aug 24 19:48:23 2019 +0200
+++ b/configure	Sat Aug 24 21:52:46 2019 +0200
@@ -2043,7 +2043,7 @@
 
 
 PACKAGE="bms"
-VERSION="0.3.13"
+VERSION="0.3.14"
 COPYRIGHT="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved"
 CYEARS="2016-2019"
 
--- a/configure.ac	Sat Aug 24 19:48:23 2019 +0200
+++ b/configure.ac	Sat Aug 24 21:52:46 2019 +0200
@@ -8,7 +8,7 @@
 dnl General settings
 dnl After changeing the version number, run autoconf!
 PACKAGE="bms"
-VERSION="0.3.13"
+VERSION="0.3.14"
 COPYRIGHT="Copyright (C) 2016-2019 Michiel Broek, All Rights Reserved"
 CYEARS="2016-2019"
 AC_SUBST(PACKAGE)
--- a/www/includes/db_product.php	Sat Aug 24 19:48:23 2019 +0200
+++ b/www/includes/db_product.php	Sat Aug 24 21:52:46 2019 +0200
@@ -243,13 +243,14 @@
 	$sql .= "', wa_acid_perc='" . $_POST['wa_acid_perc'];
 	$sql .= "', wa_base_name='" . $_POST['wa_base_name'];
 	if ($_POST['starter_enable'] == 0) {
-		$sql .= "', starter_enable='0', starter_type='0', starter_sg='1.040";
+		$sql .= "', starter_enable='0', starter_type='0', starter_sg='1.040', starter_viability='97";
 		$sql .= "', prop1_type='0', prop1_volume='0', prop2_type='0', prop2_volume='0";
 		$sql .= "', prop3_type='0', prop3_volume='0', prop4_type='0', prop4_volume='0";
 	} else {
 		$sql .= "', starter_enable='1";
 		$sql .= "', starter_type='" . $_POST['starter_type'];
 		$sql .= "', starter_sg='" . $_POST['starter_sg'];
+		$sql .= "', starter_viability='" . $_POST['starter_viability'];
 		$sql .= "', prop1_type='" . $_POST['prop1_type'];
 		$sql .= "', prop1_volume='" . $_POST['prop1_volume'];
 		$sql .= "', prop2_type='" . $_POST['prop2_type'];
@@ -821,6 +822,7 @@
 		$brew .= ',"starter_enable":' . $row['starter_enable'];
 		$brew .= ',"starter_type":' . $row['starter_type'];
 		$brew .= ',"starter_sg":' . $row['starter_sg'];
+		$brew .= ',"starter_viability":' . $row['starter_viability'];
 		$brew .= ',"prop1_type":' . $row['prop1_type'];
 		$brew .= ',"prop1_volume":' . $row['prop1_volume'];
 		$brew .= ',"prop2_type":' . $row['prop2_type'];
--- a/www/js/prod_edit.js	Sat Aug 24 19:48:23 2019 +0200
+++ b/www/js/prod_edit.js	Sat Aug 24 21:52:46 2019 +0200
@@ -346,7 +346,7 @@
 				if (parseFloat(row.y_attenuation) > svg)
 					svg = parseFloat(row.y_attenuation);	// Take the highest if multiple yeasts.
 				if (row.y_form == 0)
-					initcells += (parseFloat(row.y_cells) / 1000000000) * parseFloat(row.y_amount);
+					initcells += (parseFloat(row.y_cells) / 1000000000) * parseFloat(row.y_amount) * (dataRecord.starter_viability / 100);
 				else
 					initcells += (parseFloat(row.y_cells) / 1000000) * parseFloat(row.y_amount);
 			}
@@ -2012,6 +2012,7 @@
 			$("#starter_type").jqxDropDownList({ disabled: true });
                         $("#starter_try").jqxButton({ disabled: true });
                         $("#starter_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#starter_viability").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
 		}
 		if (dataRecord.stage > 3) { // Primary fermentation done
 			$("#brew_date_start").jqxDateTimeInput({ disabled: true });
@@ -2103,11 +2104,13 @@
 			$("#starter_type").jqxDropDownList( {disabled: false });
 			$("#starter_try").jqxButton({ disabled: false });
 			$("#starter_sg").jqxNumberInput({ spinButtons: true, readOnly: false, width: 110 });
+			$("#starter_viability").jqxNumberInput({ spinButtons: true, readOnly: false, width: 110 });
 		} else {
 			$("#propagator").hide();
 			$("#starter_type").jqxDropDownList( {disabled: true });
 			$("#starter_try").jqxButton({ disabled: true });
 			$("#starter_sg").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
+			$("#starter_viability").jqxNumberInput({ spinButtons: false, readOnly: true, width: 90 });
 		}
 	}
 
@@ -2148,6 +2151,13 @@
 				calcYeast();
 			}
 		});
+		$('#starter_viability').on('change', function (event) {
+                        if (event.args) {
+                                dataRecord.starter_viability = event.args.value;
+				calcFermentables();
+                                calcYeast();
+                        }
+                });
 		$('#prop1_type').on('change', function (event) {
 			if (event.args) {
 				var index = event.args.index;
@@ -2840,6 +2850,7 @@
 			starter_enable: dataRecord.starter_enable,
 			starter_type: $("#starter_type").val(),
 			starter_sg: parseFloat($("#starter_sg").jqxNumberInput('decimal')),
+			starter_viability: parseFloat($("#starter_viability").jqxNumberInput('decimal')),
 			prop1_type: $("#prop1_type").val(),
 			prop1_volume: parseFloat($("#prop1_volume").jqxNumberInput('decimal')),
 			prop2_type: $("#prop2_type").val(),
@@ -3066,6 +3077,7 @@
 			{ name: 'starter_enable', type: 'int' },
 			{ name: 'starter_type', type: 'int' },
 			{ name: 'starter_sg', type: 'float' },
+			{ name: 'starter_viability', type: 'int' },
 			{ name: 'prop1_type', type: 'int' },
 			{ name: 'prop1_volume', type: 'float' },
 			{ name: 'prop2_type', type: 'int' },
@@ -3287,6 +3299,7 @@
 			$("#starter_enable").val(dataRecord.starter_enable);
 			$("#starter_type").val(dataRecord.starter_type);
 			$("#starter_sg").val(dataRecord.starter_sg);
+			$("#starter_viability").val(dataRecord.starter_viability);
 			$("#prop1_type").val(dataRecord.prop1_type);
 			$("#prop1_volume").val(dataRecord.prop1_volume);
 			$("#prop2_type").val(dataRecord.prop2_type);
@@ -5264,6 +5277,7 @@
 		autoDropDownHeight: true
 	});
 	$("#starter_sg").jqxNumberInput( SGopts );
+	$("#starter_viability").jqxNumberInput( Perc0 );
 	$("#starter_try").jqxButton({ template: "primary", width: '100px', height: 23, theme: theme });
 
 	// Tab 7, Mashing
--- a/www/prod_edit.php	Sat Aug 24 19:48:23 2019 +0200
+++ b/www/prod_edit.php	Sat Aug 24 21:52:46 2019 +0200
@@ -253,7 +253,7 @@
        <tr>
         <td style="vertical-align: top; float: right; padding: 3px;">Verwacht eind SG:</td>
 	<td style="padding: 3px;"><div id="est_fg2"></div></td>
-	<td align="center" colspan="5" rowspan="5">
+	<td align="center" colspan="7" rowspan="5">
          <div id="propagator">
           <table style="width: 100%;">
 	   <caption>Giststarter stappen</caption>
@@ -331,10 +331,12 @@
 	<td style="padding: 3px;"><div id="starter_type"></div></td>
 	<td style="vertical-align: top; float: right; padding: 3px;">Starter SG:</td>
         <td style="padding: 3px;"><div id="starter_sg"></div></td>
+        <td style="vertical-align: top; float: right; padding: 3px;">Gist conditie %:</td>
+        <td style="padding: 3px;"><div id="starter_viability"></div></td>
         <td style="vertical-align: top; padding: 3px;"><input type="button" id="starter_try"  value="Probeer" /></td>
        </tr>
-       <tr><td colspan="7">&nbsp;</td></tr>
-       <tr><td align="center" colspan="7"><div id="yeastGrid"></div></td></tr>
+       <tr><td colspan="9">&nbsp;</td></tr>
+       <tr><td align="center" colspan="9"><div id="yeastGrid"></div></td></tr>
       </table>
      </div>
     </div> <!-- tab gisten -->

mercurial