# HG changeset patch # User Michiel Broek # Date 1544528993 -3600 # Node ID dfbf43b2797e4886a7aa81479d3da1f6f8bcb8a0 # Parent bcc4583fd0133fcfff2c7d178a42930840be0cb6 Store calculated estimate ibu and estimate fg. diff -r bcc4583fd013 -r dfbf43b2797e www/js/rec_edit.js --- 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');