# HG changeset patch # User Michiel Broek # Date 1590264044 -7200 # Node ID dc3311736fb70ad31148d500bb3303f6477af3e9 # Parent 9c21125f584e316e66d95edbb4cb3d0f7b682610 Added display fermenter volume. Auto recalculate if trub_chiller_loss or top_up_water is changed. diff -r 9c21125f584e -r dc3311736fb7 www/inv_equipments.php --- a/www/inv_equipments.php Sat May 23 20:53:48 2020 +0200 +++ b/www/inv_equipments.php Sat May 23 22:00:44 2020 +0200 @@ -29,9 +29,9 @@ Koken - Maischkuip volume l: + Maischkuip volume L:
- Kookketel volume l: + Kookketel volume L:
@@ -43,13 +43,13 @@ Maischkuip gewicht kg:
- Kook volume l: + Kook volume L:
Maischkuip materiaal:
- Verdamping per uur l: + Verdamping per uur L:
@@ -59,9 +59,9 @@
- Maischwater l: + Maischwater L:
- Extra water bij koken l: + Extra water bij koken L:
@@ -72,30 +72,31 @@ Filteren - Volume eind koken l: + Volume eind koken L:
- Filter volume l: + Filter volume L:
Koelen Filterkuip hoogte cm:
- Trub verlies kookketel l: + Trub verlies kookketel L:
- Filterkuip verlies l: + Filterkuip verlies L:
- Extra water in het gistvat l: + Extra water in het gistvat L:
Brouwzaalrendement %:
- + Volume naar het gistvat L: +
diff -r 9c21125f584e -r dc3311736fb7 www/js/inv_equipments.js --- a/www/js/inv_equipments.js Sat May 23 20:53:48 2020 +0200 +++ b/www/js/inv_equipments.js Sat May 23 22:00:44 2020 +0200 @@ -50,12 +50,13 @@ evap_rate = parseFloat($('#evap_rate').jqxNumberInput('decimal')), boil_time = parseFloat($('#boil_time').jqxNumberInput('decimal')), top_up = parseFloat($('#top_up_kettle').jqxNumberInput('decimal')), - batch; + batch = parseFloat($('#batch_size').jqxNumberInput('decimal')); if (calc) { // If checked, calculate the batch size. batch = boil_size - (evap_rate * boil_time / 60) + top_up; $('#batch_size').val(batch); } + $('#vol_fermenter').val((batch / 1.04) + parseFloat($('#top_up_water').jqxNumberInput('decimal')) - parseFloat($('#trub_chiller_loss').jqxNumberInput('decimal'))); } // tooltips @@ -80,6 +81,7 @@ $('#hop_utilization').jqxTooltip({ content: '100% for smaller installations, higher for large breweries.' }); $('#batch_size').jqxTooltip({ content: 'Calculated batch size, liters at end of the boil.' }); $('#trub_chiller_loss').jqxTooltip({ content: 'Standard loss in liters during transfer to the fermenter.' }); + $('#top_up_water').jqxTooltip({ content: 'Extra water added into the fermenter.' }); var dataRecord = {}, url = 'includes/db_inventory_equipments.php', @@ -214,6 +216,7 @@ $('#mash_volume').jqxNumberInput(Spin1dec); $('#mash_max').jqxNumberInput(Spin1dec); $('#efficiency').jqxNumberInput(Perc1dec); + $('#vol_fermenter').jqxNumberInput(Show2dec); // initialize jqxGrid $('#jqxgrid').jqxGrid({ @@ -240,6 +243,7 @@ $('#name').val('Nieuwe brouwset'); $('#boil_size').val(18); $('#batch_size').val(15.3); + $('#vol_fermenter').val(14.2); $('#tun_volume').val(20); $('#tun_weight').val(2); $('#tun_specific_heat').val(0.11); @@ -274,6 +278,8 @@ $('#boil_time').on('change', function(event) { calcBatchVolume(); }); $('#top_up_kettle').on('change', function(event) { calcBatchVolume(); }); $('#calc_boil_volume').on('change', function(event) { calcBatchVolume(); }); + $('#top_up_water').on('change', function(event) { calcBatchVolume(); }); + $('#trub_chiller_loss').on('change', function(event) { calcBatchVolume(); }); $('#tun_material').on('select', function(event) { dataRecord.tun_specific_heat = MaterialData[event.args.index].sh; $('#tun_specific_heat').val(dataRecord.tun_specific_heat);