Store calculated estimate ibu and estimate fg.

Tue, 11 Dec 2018 12:49:53 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 11 Dec 2018 12:49:53 +0100
changeset 137
dfbf43b2797e
parent 136
bcc4583fd013
child 138
59874681fc13

Store calculated estimate ibu and estimate fg.

www/js/rec_edit.js file | annotate | diff | comparison | revisions
--- a/www/js/rec_edit.js	Mon Dec 10 22:20:19 2018 +0100
+++ b/www/js/rec_edit.js	Tue Dec 11 12:49:53 2018 +0100
@@ -144,7 +144,9 @@
 			hopAromaContribution(parseFloat(row.h_time), parseFloat($("#batch_size").jqxNumberInput('decimal')),
 					                                                row.h_useat, parseFloat(row.h_amount));
 		}
+		total_ibus = Math.round(total_ibus);
 		console.log("calcIBUs(): " + total_ibus);
+		dataRecord.est_ibu = total_ibus;
 		$('#est_ibu').val(total_ibus);
 	};
 
@@ -1453,6 +1455,8 @@
                         },
 			ready: function() {
 				var fg = estimate_fg(psugar, pcara, 0, 0, 0, svg, parseFloat(parseFloat($("#est_og").jqxNumberInput('decimal'))));
+				dataRecord.est_fg = fg;
+				$('#est_fg').val(fg);
 				calcInit();
 				$('#jqxLoader').jqxLoader('close');
 				$('#jqxTabs').jqxTabs('first');

mercurial