diff -r 7f5455806f20 -r 1de1623e1760 www/js/rec_edit.js --- a/www/js/rec_edit.js Sun May 26 16:09:50 2019 +0200 +++ b/www/js/rec_edit.js Sun May 26 20:37:28 2019 +0200 @@ -176,6 +176,7 @@ var mashtemp = 0; // Average mash temperature var bv = 0.925; // Bierverlies rendement var sr = 0.95; // Mash en spoel rendement + var lintner = 0; // Total recipe lintner if ((rows = $('#mashGrid').jqxGrid('getrows'))) { for (var i = 0; i < rows.length; i++) { @@ -221,10 +222,15 @@ addedmass += row.f_amount; vol += (x * sugardensity + (1 - x) * 1) * row.f_amount; } + if (row.f_added == 0 && (row.f_type == 0 || row.f_type == 4) && row.f_color < 50) { // Mash and Grain/Adjunct and Color < 50 + lintner += row.f_diastatic_power * row.f_amount; + } colort += row.f_amount * ebc_to_srm(row.f_color); colorh += row.f_amount * row.f_color * get_kt(row.f_color); colorn += (row.f_percentage / 100) * row.f_color; // For 8.6 Pt wort. } + $("#ferm_lintner").val(Math.round(parseFloat(lintner / mashkg))); + console.log("lintner:"+lintner+" kg:"+mashkg); to_100 = my_100; if (to_100) { $("#wf_amount").jqxNumberInput({ width: 90, readOnly: true, spinButtons: false }); @@ -1767,7 +1773,7 @@ var fermentableAdapter = new $.jqx.dataAdapter(fermentableSource); $("#fermentableGrid").jqxGrid({ width: 1240, - height: 500, + height: 470, source: fermentableAdapter, theme: theme, selectionmode: 'singlerow', @@ -2783,6 +2789,8 @@ $("#est_color2").jqxNumberInput( Show0dec ); $("#est_og2").jqxTooltip({ content: 'Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend.' }); $("#est_og2").jqxNumberInput( Show3dec ); + $("#ferm_lintner").jqxTooltip({ content: 'De enzymkracht van alle mouten in de maisch. Moet hoger dan 35 zijn.' }); + $("#ferm_lintner").jqxNumberInput( Show0dec ); $("#perc_malts").jqxProgressBar({ width: 300, height: 23,