Wed, 02 Jan 2019 14:49:17 +0100
Added the packaging tab contents.
--- a/www/import/from_brouwhulp.php Tue Jan 01 16:24:17 2019 +0100 +++ b/www/import/from_brouwhulp.php Wed Jan 02 14:49:17 2019 +0100 @@ -1290,6 +1290,9 @@ $sql .= "', brew_date_end='" . $date_end; } + $sql .= "', og='" . floatval($recipe->OG); + $sql .= "', fg='" . floatval($recipe->FG); + if ($recipe->PRIMARY_AGE && ($stageno >= 3)) { /* PRIMARY_TEMP is the average of START_TEMP_PRIMARY MAX_TEMP_PRIMARY END_TEMP_PRIMARY */ $pdate = new DateTime($brewdate); @@ -1343,19 +1346,36 @@ if ($recipe->AMOUNT_BOTTLING && $recipe->AMOUNT_PRIMING) { $sql .= "', bottle_amount='" . floatval($recipe->AMOUNT_BOTTLING); $sql .= "', bottle_carbonation='" . floatval($recipe->CARBONATION); - $sql .= "', bottle_priming_sugar='" . mysqli_real_escape_string($db, $recipe->PRIMING_SUGAR_BOTTLES); + if ($recipe->PRIMING_SUGAR_BOTTLES == "Saccharose") + $sql .= "', bottle_priming_sugar='Kristalsuiker"; + else if ($recipe->PRIMING_SUGAR_BOTTLES == "Glucose or dextrose") + $sql .= "', bottle_priming_sugar='Glucose/dextrose"; + else if ($recipe->PRIMING_SUGAR_BOTTLES == "Honey") + $sql .= "', bottle_priming_sugar='Honing"; + else if ($recipe->PRIMING_SUGAR_BOTTLES == "DME") + $sql .= "', bottle_priming_sugar='Moutextract"; + else if ($recipe->PRIMING_SUGAR_BOTTLES == "Molassis") + $sql .= "', bottle_priming_sugar='Melasse"; $sql .= "', bottle_priming_amount='" . floatval($recipe->AMOUNT_PRIMING); $sql .= "', bottle_carbonation_temp='" . floatval($recipe->CARBONATION_TEMP); } if ($recipe->AMOUNT_KEGGED && $recipe->AMOUNT_PRIMING_KEGS) { $sql .= "', keg_amount='" . floatval($recipe->AMOUNT_KEGGED); $sql .= "', keg_carbonation='" . floatval($recipe->CARBONATION); // Lijkt wel hetzelfde als bottles - $sql .= "', keg_priming_sugar='" . mysqli_real_escape_string($db, $recipe->PRIMING_SUGAR_KEGS); + if ($recipe->PRIMING_SUGAR_BOTTLES == "Saccharose") + $sql .= "', keg_priming_sugar='Kristalsuiker"; + else if ($recipe->PRIMING_SUGAR_BOTTLES == "Glucose or dextrose") + $sql .= "', keg_priming_sugar='Glucose/dextrose"; + else if ($recipe->PRIMING_SUGAR_BOTTLES == "Honey") + $sql .= "', keg_priming_sugar='Honing"; + else if ($recipe->PRIMING_SUGAR_BOTTLES == "DME") + $sql .= "', keg_priming_sugar='Moutextract"; + else if ($recipe->PRIMING_SUGAR_BOTTLES == "Molassis") + $sql .= "', keg_priming_sugar='Melasse"; $sql .= "', keg_priming_amount='" . floatval($recipe->AMOUNT_PRIMING_KEGS); $sql .= "', keg_carbonation_temp='" . floatval($recipe->KEG_CARB_TEMP); ($recipe->FORCED_CARB_KEGS == 'TRUE') ? $sql .= "', keg_forced_carb='1" : $sql .= "', keg_forced_carb='0"; $sql .= "', keg_pressure='" . floatval($recipe->KEG_PRESSURE); - $sql .= "', keg_priming_factor='" . floatval($recipe->KEG_PRIMING_FACTOR); } }
--- a/www/includes/db_product.php Tue Jan 01 16:24:17 2019 +0100 +++ b/www/includes/db_product.php Wed Jan 02 14:49:17 2019 +0100 @@ -56,7 +56,7 @@ $sql .= "', code='" . mysqli_real_escape_string($connect, $_POST['code']); $sql .= "', birth='" . $_POST['birth']; $sql .= "', stage='" . $_POST['stage']; - $sql .= "', notes='" . mysqli_real_escape_string($connect, $_POST['notes']); +// $sql .= "', notes='" . mysqli_real_escape_string($connect, $_POST['notes']); ($_POST['log_brew'] == 'true') ? $sql .= "', log_brew='1" : $sql .= "', log_brew='0"; ($_POST['log_fermentation'] == 'true') ? $sql .= "', log_fermentation='1" : $sql .= "', log_fermentation='0"; ($_POST['inventory_reduced'] == 'true') ? $sql .= "', inventory_reduced='1" : $sql .= "', inventory_reduced='0"; @@ -77,7 +77,7 @@ $sql .= "', eq_calc_boil_volume='" . $_POST['eq_calc_boil_volume']; $sql .= "', eq_top_up_kettle='" . $_POST['eq_top_up_kettle']; $sql .= "', eq_hop_utilization='" . $_POST['eq_hop_utilization']; - $sql .= "', eq_notes='" . mysqli_real_escape_string($connect, $_POST['eq_notes']); +// $sql .= "', eq_notes='" . mysqli_real_escape_string($connect, $_POST['eq_notes']); $sql .= "', eq_lauter_volume='" . $_POST['eq_lauter_volume']; $sql .= "', eq_lauter_height='" . $_POST['eq_lauter_height']; $sql .= "', eq_lauter_deadspace='" . $_POST['eq_lauter_deadspace']; @@ -118,6 +118,8 @@ // brew_date_end // brew_log_available } + $sql .= "', og='" . $_POST['og']; + $sql .= "', fg='" . $_POST['fg']; if ($stageno >= 3) { // primary_start_temp @@ -127,54 +129,42 @@ // primary_end_date } - if ($stageno >= 4) { - // secondary_temp - // secondary_end_date - } - - if ($stageno >= 5) { - // tertiary_temp - } - - if ($stageno >= 6) { - // package_date - // bottle_amount - // bottle_carbonation - // bottle_priming_sugar - // bottle_priming_amount - // bottle_carbonation_temp - // keg_amount - // keg_carbonation - // keg_priming_sugar - // keg_priming_amount - // keg_carbonation_temp - // keg_forced_carb - // keg_pressure - // keg_priming_factor - } - - if ($stageno >= 9) { - // taste_notes - // taste_rate - // taste_date - // taste_color - // taste_transparency - // taste_head - // taste_aroma - // taste_taste - // taste_mouthfeel - // taste_aftertaste - } + $sql .= "', secondary_temp='" . $_POST['secondary_temp']; + $sql .= "', secondary_end_date='" . $_POST['secondary_end_date']; + $sql .= "', tertiary_temp='" . $_POST['tertiary_temp']; + $sql .= "', package_date='" . $_POST['package_date']; + $sql .= "', bottle_amount='" . $_POST['bottle_amount']; + $sql .= "', bottle_carbonation='" . $_POST['bottle_carbonation']; + $sql .= "', bottle_priming_sugar='" . $_POST['bottle_priming_sugar']; + $sql .= "', bottle_priming_amount='" . $_POST['bottle_priming_amount']; + $sql .= "', bottle_carbonation_temp='" . $_POST['bottle_carbonation_temp']; + $sql .= "', keg_amount='" . $_POST['keg_amount']; + $sql .= "', keg_carbonation='" . $_POST['keg_carbonation']; + $sql .= "', keg_priming_sugar='" . $_POST['keg_priming_sugar']; + $sql .= "', keg_priming_amount='" . $_POST['keg_priming_amount']; + $sql .= "', keg_carbonation_temp='" . $_POST['keg_carbonation_temp']; + ($_POST['keg_forced_carb'] == 'true') ? $sql .= "', keg_forced_carb='1" : $sql .= "', keg_forced_carb='0"; + $sql .= "', keg_pressure='" . $_POST['keg_pressure']; + $sql .= "', taste_notes='" . mysqli_real_escape_string($connect, $_POST['taste_notes']); + $sql .= "', taste_rate='" . $_POST['taste_rate']; + $sql .= "', taste_date='" . $_POST['taste_date']; + $sql .= "', taste_color='" . mysqli_real_escape_string($connect, $_POST['taste_color']); + $sql .= "', taste_transparency='" . mysqli_real_escape_string($connect, $_POST['taste_transparency']); + $sql .= "', taste_head='" . mysqli_real_escape_string($connect, $_POST['taste_head']); + $sql .= "', taste_aroma='" . mysqli_real_escape_string($connect, $_POST['taste_aroma']); + $sql .= "', taste_taste='" . mysqli_real_escape_string($connect, $_POST['taste_taste']); + $sql .= "', taste_mouthfeel='" . mysqli_real_escape_string($connect, $_POST['taste_mouthfeel']); + $sql .= "', taste_aftertaste='" . mysqli_real_escape_string($connect, $_POST['taste_aftertaste']); /* * Recipe part */ -// $sql .= "', st_name='" . mysqli_real_escape_string($connect, $_POST['st_name']); -// $sql .= "', st_letter='" . mysqli_real_escape_string($connect, $_POST['st_letter']); -// $sql .= "', st_guide='" . mysqli_real_escape_string($connect, $_POST['st_guide']); -// $sql .= "', st_type='" . mysqli_real_escape_string($connect, $_POST['st_type']); -// $sql .= "', st_category='" . mysqli_real_escape_string($connect, $_POST['st_category']); -// $sql .= "', st_category_number='" . $_POST['st_category_number']; + $sql .= "', st_name='" . mysqli_real_escape_string($connect, $_POST['st_name']); + $sql .= "', st_letter='" . mysqli_real_escape_string($connect, $_POST['st_letter']); + $sql .= "', st_guide='" . mysqli_real_escape_string($connect, $_POST['st_guide']); + $sql .= "', st_type='" . mysqli_real_escape_string($connect, $_POST['st_type']); + $sql .= "', st_category='" . mysqli_real_escape_string($connect, $_POST['st_category']); + $sql .= "', st_category_number='" . $_POST['st_category_number']; $sql .= "', st_og_min='" . $_POST['st_og_min']; $sql .= "', st_og_max='" . $_POST['st_og_max']; $sql .= "', st_fg_min='" . $_POST['st_fg_min']; @@ -426,6 +416,8 @@ $brew .= ',"brew_fermenter_ibu":' . floatval($row['brew_fermenter_ibu']); $brew .= ',"brew_date_end":"' . $row['brew_date_end']; $brew .= '","brew_log_available":' . $row['brew_log_available']; + $brew .= ',"og":' . floatval($row['og']); + $brew .= ',"fg":' . floatval($row['fg']); $brew .= ',"primary_start_temp":' . floatval($row['primary_start_temp']); $brew .= ',"primary_max_temp":' . floatval($row['primary_max_temp']); $brew .= ',"primary_end_temp":' . floatval($row['primary_end_temp']); @@ -447,7 +439,6 @@ $brew .= ',"keg_carbonation_temp":' . floatval($row['keg_carbonation_temp']); $brew .= ',"keg_forced_carb":' . floatval($row['keg_forced_carb']); $brew .= ',"keg_pressure":' . floatval($row['keg_pressure']); - $brew .= ',"keg_priming_factor":' . floatval($row['keg_priming_factor']); $brew .= ',"taste_notes":"' . str_replace($escapers, $replacements, $row['taste_notes']); $brew .= '","taste_rate":' . floatval($row['taste_rate']); $brew .= ',"taste_date":"' . str_replace($escapers, $replacements, $row['taste_date']);
--- a/www/js/prod_edit.js Tue Jan 01 16:24:17 2019 +0100 +++ b/www/js/prod_edit.js Wed Jan 02 14:49:17 2019 +0100 @@ -985,8 +985,80 @@ $("#sparge_acid_amount").val(Acid); } + function CarbCO2toS(CO2, T, SFactor) { + // Calcuation of disolved CO2 in the beer. + // Brewersfriend uses: 3.0378 - (0.050062 * temp) + (0.00026555 * temp^2) + // Brouwhulp uses: 0.000849151 * T * T - 0.0587512 * T + 1.71137) + var sugar = SFactor * (CO2 - (0.000849151 * T * T - 0.0587512 * T + 1.71137)) / 0.286; + if (sugar < 0) + sugar = 0; + return sugar; + } + + function CarbCO2ToPressure(CO2, T) { + return (CO2 - (-0.000005594056 * Math.pow(T, 4) + 0.000144357886 * Math.pow(T, 3) + + 0.000362999168 * T * T - 0.064872987645 * T + 1.641145175049)) / + (0.00000498031 * Math.pow(T, 4) - 0.00024358267 * Math.pow(T, 3) + + 0.00385867329 * T * T - 0.05671206825 * T + 1.53801423376); + } + + function getSFactor(Sugar) { + switch (Sugar) { + case 'Kristalsuiker': return 1; + case 'Glucose/dextrose': return 1.16; + case 'Honing': return 1.28; + case 'Moutextract': return 1.74; + case 'Melasse': return 3.83; + } + return 1; + } + + function calcCarbonation() { + + var TSec = dataRecord.secondary_temp; // End fermentation temperature. + if (TSec < 1) + TSec = dataRecord.primary_end_temp; // Fallback + if (TSec < 1) + TSec = 18; // Fallback to room temperature. + + if (dataRecord.fg == 1.000) + var ABV = abvol(dataRecord.brew_fermenter_sg, parseFloat($("#est_fg").jqxNumberInput('decimal'))); + else + var ABV = abvol(dataRecord.brew_fermenter_sg, dataRecord.fg); + + // Bottles + var SFactor = getSFactor(dataRecord.bottle_priming_sugar); + var Amount = CarbCO2toS(dataRecord.bottle_carbonation, TSec, SFactor); + dataRecord.bottle_priming_amount = Amount; + $("#bottle_priming_amount").val(Math.round(dataRecord.bottle_priming_amount * 10) / 10); + $("#bottle_priming_total").val(Math.round(dataRecord.bottle_amount * dataRecord.bottle_priming_amount * 10) / 10); + $("#bottle_abv").val(Math.round((ABV + Amount * 0.47 / 7.907) * 10) / 10); + + // Kegs + SFactor = getSFactor(dataRecord.keg_priming_sugar); + Amount = CarbCO2toS(dataRecord.keg_carbonation, TSec, SFactor); + var Pressure = CarbCO2ToPressure(dataRecord.keg_carbonation, dataRecord.keg_carbonation_temp); + if (Pressure < 0) + Pressure = 0; + dataRecord.keg_pressure = Pressure; + $("#keg_pressure").val(Math.round(Pressure * 10) / 10); + + if (dataRecord.keg_forced_carb) { + Amount = 0; + dataRecord.keg_priming_amount = 0; + $("#keg_priming_amount").val(0); + $("#keg_priming_total").val(0); + } else { + dataRecord.keg_priming_amount = Amount; + $("#keg_priming_amount").val(Math.round(dataRecord.keg_priming_amount * 10) / 10); + $("#keg_priming_total").val(Math.round(dataRecord.keg_amount * dataRecord.keg_priming_amount * 10) / 10); + } + + $("#keg_abv").val(Math.round((ABV + Amount * 0.47 / 7.907) * 10) / 10); + } + function calcInit () { - console.log("calc.init()"); + console.log("calcInit()"); calcSGendMash(); calcMashEfficiency(); @@ -1137,6 +1209,44 @@ dataRecord.sparge_acid_perc = parseFloat(event.args.value); calcSparge(); }); + + calcCarbonation(); + $('#bottle_amount').on('change', function (event) { + dataRecord.bottle_amount = parseFloat(event.args.value); + calcCarbonation(); + }); + $('#keg_amount').on('change', function (event) { + dataRecord.keg_amount = parseFloat(event.args.value); + calcCarbonation(); + }); + $('#bottle_carbonation').on('change', function (event) { + dataRecord.bottle_carbonation = parseFloat(event.args.value); + calcCarbonation(); + }); + $('#keg_carbonation').on('change', function (event) { + dataRecord.keg_carbonation = parseFloat(event.args.value); + calcCarbonation(); + }); + $('#bottle_priming_sugar').on('change', function (event) { + dataRecord.bottle_priming_sugar = event.args.item.value; + calcCarbonation(); + }); + $('#keg_priming_sugar').on('change', function (event) { + dataRecord.keg_priming_sugar = event.args.item.value; + calcCarbonation(); + }); + $("#keg_forced_carb").on('checked', function (event) { + dataRecord.keg_forced_carb = true; + calcCarbonation(); + }); + $("#keg_forced_carb").on('unchecked', function (event) { + dataRecord.keg_forced_carb = false; + calcCarbonation(); + }); + $('#keg_carbonation_temp').on('change', function (event) { + dataRecord.keg_carbonation_temp = parseFloat(event.args.value); + calcCarbonation(); + }); }; $("#styleSelect").jqxDropDownList({ @@ -1173,7 +1283,9 @@ $("#st_color_min").val(datarecord.color_min); $("#st_color_max").val(datarecord.color_max); $("#st_carb_min").val(datarecord.carb_min); + $("#st_carb_min2").val(datarecord.carb_min); $("#st_carb_max").val(datarecord.carb_max); + $("#st_carb_max2").val(datarecord.carb_max); $("#st_abv_min").val(datarecord.abv_min); $("#st_abv_max").val(datarecord.abv_max); } @@ -1344,6 +1456,8 @@ { name: 'brew_fermenter_ibu', type: 'float' }, { name: 'brew_date_end', type: 'string' }, { name: 'brew_log_available', type: 'bool' }, + { name: 'og', type: 'float' }, + { name: 'fg', type: 'float' }, { name: 'primary_start_temp', type: 'float' }, { name: 'primary_max_temp', type: 'float' }, { name: 'primary_end_temp', type: 'float' }, @@ -1365,7 +1479,6 @@ { name: 'keg_carbonation_temp', type: 'float' }, { name: 'keg_forced_carb', type: 'bool' }, { name: 'keg_pressure', type: 'float' }, - { name: 'keg_priming_factor', type: 'float' }, { name: 'taste_notes', type: 'string' }, { name: 'taste_rate', type: 'float' }, { name: 'taste_date', type: 'string' }, @@ -1520,7 +1633,21 @@ $("#brew_fermenter_extrasugar").val(dataRecord.brew_fermenter_extrasugar); $("#brew_fermenter_color").val(dataRecord.brew_fermenter_color); $("#brew_date_end").val(dataRecord.brew_date_end); - + $("#og").val(dataRecord.og); + $("#fg").val(dataRecord.fg); + $("#package_date").val(dataRecord.package_date); + $("#bottle_amount").val(dataRecord.bottle_amount); + $("#bottle_carbonation").val(dataRecord.bottle_carbonation); + $("#bottle_priming_sugar").val(dataRecord.bottle_priming_sugar); + $("#bottle_priming_amount").val(dataRecord.bottle_priming_amount); + $("#bottle_carbonation_temp").val(dataRecord.bottle_carbonation_temp); + $("#keg_amount").val(dataRecord.keg_amount); + $("#keg_carbonation").val(dataRecord.keg_carbonation); + $("#keg_priming_sugar").val(dataRecord.keg_priming_sugar); + $("#keg_priming_amount").val(dataRecord.keg_priming_amount); + $("#keg_carbonation_temp").val(dataRecord.keg_carbonation_temp); + $("#keg_forced_carb").val(dataRecord.keg_forced_carb); + $("#keg_pressure").val(dataRecord.keg_pressure); $("#taste_notes").val(dataRecord.taste_notes); $("#taste_rate").val(dataRecord.taste_rate); $("#taste_date").val(dataRecord.taste_date); @@ -1550,7 +1677,9 @@ $("#st_ibu_min").val(dataRecord.st_ibu_min); $("#st_ibu_max").val(dataRecord.st_ibu_max); $("#st_carb_min").val(dataRecord.st_carb_min); + $("#st_carb_min2").val(dataRecord.st_carb_min); $("#st_carb_max").val(dataRecord.st_carb_max); + $("#st_carb_max2").val(dataRecord.st_carb_max); $("#type").val(dataRecord.type); $("#batch_size").val(dataRecord.batch_size); $("#boil_size").val(dataRecord.boil_size); @@ -2744,6 +2873,7 @@ var srcBase = [ "NaHCO3", "Na2CO3", "CaCO3", "Ca(OH)2" ]; var srcAcid = [ "Melkzuur", "Zoutzuur", "Fosforzuur", "Zwavelzuur" ]; var srcSource = [ "Bron 1", "Bron 2", "Gemengd" ]; + var srcSugar = [ "Kristalsuiker", "Glucose/dextrose", "Honing", "Moutextract", "Melasse" ]; var srcMaterial= [ "RVS", "Aluminium", "Kunststof", "Koper" ]; var srcAeration= [ 'None', 'Air', 'Oxygen' ]; var srcCooling= [ '-', 'Emersion chiller', 'Counterflow chiller', 'Au bain marie', 'Natural' ]; @@ -3112,8 +3242,45 @@ $("#brew_fermenter_color").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 70, height: 23, decimalDigits: 0 }); // Tab 10, Fermentation + // Note, fermentation temps changes must do calcCarbonation() + $("#fg").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 3, spinButtons: true, spinButtonsStep: 0.001 }); // Tab 11, Packaging + $("#package_date").jqxTooltip({ content: 'De verpakkings datum van dit bier.' }); + $("#package_date").jqxDateTimeInput({ + theme: theme, + width: 150, + height: 23, + allowNullDate: true, + todayString: 'Vandaag', + clearString: 'Wissen', + showFooter: true, + formatString: 'yyyy-MM-dd' + }); + $("#st_carb_min2").jqxTooltip({ content: 'Het minimum aanbevolen koolzuur volume voor deze bierstijl.'}); + $("#st_carb_min2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); + $("#st_carb_max2").jqxTooltip({ content: 'Het maximum aamnevolen koolzuur volume voor deze bierstijl.'}); + $("#st_carb_max2").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 50, height: 23, decimalDigits: 1, readOnly: true }); + $("#bottle_amount").jqxTooltip({ content: 'De totale hoeveelheid te bottelen bier.' }); + $("#bottle_amount").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); + $("#keg_amount").jqxTooltip({ content: 'De totale hoeveelheid op fust te zetten bier.' }); + $("#keg_amount").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); + $("#bottle_carbonation").jqxTooltip({ content: 'Het gewenste CO2 volume in de flessen.' }); + $("#bottle_carbonation").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 5, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.05 }); + $("#keg_carbonation").jqxTooltip({ content: 'Het gewenste CO2 volume door de suiker in de fusten.' }); + $("#keg_carbonation").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0, max: 5, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.05 }); + $("#bottle_priming_sugar").jqxDropDownList({ theme: theme, source: srcSugar, width: 175, height: 23, dropDownHeight: 150 }); + $("#keg_priming_sugar").jqxDropDownList({ theme: theme, source: srcSugar, width: 175, height: 23, dropDownHeight: 150 }); + $("#bottle_priming_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 70, height: 23, decimalDigits: 1, readOnly: true }); + $("#keg_priming_amount").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 70, height: 23, decimalDigits: 1, readOnly: true }); + $("#bottle_priming_total").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 70, height: 23, decimalDigits: 1, readOnly: true }); + $("#keg_priming_total").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 70, height: 23, decimalDigits: 1, readOnly: true }); + $("#keg_forced_carb").jqxCheckBox({ theme: theme, width: 120, height: 23 }); + $("#keg_pressure").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 70, height: 23, decimalDigits: 1, readOnly: true }); + $("#bottle_abv").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 70, height: 23, decimalDigits: 1, readOnly: true }); + $("#keg_abv").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 70, height: 23, decimalDigits: 1, readOnly: true }); + $("#bottle_carbonation_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0.5, max: 40, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); + $("#keg_carbonation_temp").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 90, height: 23, min: 0.5, max: 40, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 }); // Tab 12, Tasting $("#taste_date").jqxTooltip({ content: 'De proef datum van dit bier.' }); @@ -3233,6 +3400,22 @@ eq_mash_volume: parseFloat($("#eq_mash_volume").jqxNumberInput('decimal')), eq_mash_max: parseFloat($("#eq_mash_max").jqxNumberInput('decimal')), eq_efficiency: parseFloat($("#eq_efficiency").jqxNumberInput('decimal')), + + og: dataRecord.og, + fg: parseFloat($("#fg").jqxNumberInput('decimal')), + package_date: $("#package_date").val(), + bottle_amount: parseFloat($("#bottle_amount").jqxNumberInput('decimal')), + bottle_carbonation: parseFloat($("#bottle_carbonation").jqxNumberInput('decimal')), + bottle_priming_sugar: $("#bottle_priming_sugar").val(), + bottle_priming_amount: parseFloat($("#bottle_priming_amount").jqxNumberInput('decimal')), + bottle_carbonation_temp: parseFloat($("#bottle_carbonation_temp").jqxNumberInput('decimal')), + keg_amount: parseFloat($("#keg_amount").jqxNumberInput('decimal')), + keg_carbonation: parseFloat($("#keg_carbonation").jqxNumberInput('decimal')), + keg_priming_sugar: $("#keg_priming_sugar").val(), + keg_priming_amount: parseFloat($("#keg_priming_amount").jqxNumberInput('decimal')), + keg_carbonation_temp: parseFloat($("#keg_carbonation_temp").jqxNumberInput('decimal')), + keg_forced_carb: $("#keg_forced_carb").val(), + keg_pressure: parseFloat($("#keg_pressure").jqxNumberInput('decimal')), taste_notes: $("#taste_notes").val(), taste_rate: parseFloat($("#taste_rate").jqxNumberInput('decimal')), taste_date: $("#taste_date").val(),
--- a/www/prod_edit.php Tue Jan 01 16:24:17 2019 +0100 +++ b/www/prod_edit.php Wed Jan 02 14:49:17 2019 +0100 @@ -548,11 +548,84 @@ <div> <!-- Vergisten --> <div style="overflow: hidden;"> + <table style="width: 100%;"> + <tr> + <td style="vertical-align: top; float: right; padding: 3px;">FG:</td> + <td align="left" style="vertical-align: top;"><div id="fg"></div></td> + </tr> + </table> </div> </div> <!-- Vergisten --> <div> <!-- Verpakken --> <div style="overflow: hidden;"> + <table style="width: 100%;"> + <tr> + <td style="vertical-align: top; float: right; padding: 3px;">Datum:</td> + <td align="left" style="vertical-align: top;"><div id="package_date"></div></td> + <td style="vertical-align: top; float: right; padding: 3px;">Aanbevolen koolzuur vol:</td> + <td style="padding: 3px;"><div style="float: left; margin-left: 15px;" id="st_carb_min2"></div><div style="float: left; margin-left: 5px;" id="st_carb_max2"></div></td> + </tr> + <tr> + <td colspan="4"><hr></td> + </tr> + <tr> + <th style="text-align: center;" colspan="2">Flessen</th> + <th style="text-align: center;" colspan="2">Kegs</th> + </tr> + <tr> + <td style="vertical-align: top; float: right; padding: 3px;">Hoeveelheid liter:</td> + <td align="left" style="vertical-align: top;"><div id="bottle_amount"></div></td> + <td style="vertical-align: top; float: right; padding: 3px;">Hoeveelheid liter:</td> + <td align="left" style="vertical-align: top;"><div id="keg_amount"></div></td> + </tr> + <tr> + <td style="vertical-align: top; float: right; padding: 3px;">Gewenst CO2 gehalte:</td> + <td align="left" style="vertical-align: top;"><div id="bottle_carbonation"></div></td> + <td style="vertical-align: top; float: right; padding: 3px;">Gewenst CO2 gehalte:</td> + <td align="left" style="vertical-align: top;"><div id="keg_carbonation"></div></td> + </tr> + <tr> + <td style="vertical-align: top; float: right; padding: 3px;">Suiker type:</td> + <td align="left" style="vertical-align: top;"><div id="bottle_priming_sugar"></div></td> + <td style="vertical-align: top; float: right; padding: 3px;">Suiker type:</td> + <td align="left" style="vertical-align: top;"><div id="keg_priming_sugar"></div></td> + </tr> + <tr> + <td style="vertical-align: top; float: right; padding: 3px;">Toevoegen suiker g/l:</td> + <td align="left" style="vertical-align: top;"><div id="bottle_priming_amount"></div></td> + <td style="vertical-align: top; float: right; padding: 3px;">Toevoegen suiker g/l:</td> + <td align="left" style="vertical-align: top;"><div id="keg_priming_amount"></div></td> + </tr> + <tr> + <td style="vertical-align: top; float: right; padding: 3px;">Suiker totaal gr:</td> + <td align="left" style="vertical-align: top;"><div id="bottle_priming_total"></div></td> + <td style="vertical-align: top; float: right; padding: 3px;">Suiker totaal gr:</td> + <td align="left" style="vertical-align: top;"><div id="keg_priming_total"></div></td> + </tr> + <tr> + <td colspan="2"></td> + <td style="vertical-align: top; float: right; padding: 3px;">Op druk brengen met CO2:</td> + <td align="left" style="vertical-align: top;"><div id="keg_forced_carb"></div></td> + </tr> + <tr> + <td colspan="2"></td> + <td style="vertical-align: top; float: right; padding: 3px;">Druk op fust bar:</td> + <td align="left" style="vertical-align: top;"><div id="keg_pressure"></div></td> + </tr> + <tr> + <td style="vertical-align: top; float: right; padding: 3px;">Alcohol op fles:</td> + <td align="left" style="vertical-align: top;"><div id="bottle_abv"></div></td> + <td style="vertical-align: top; float: right; padding: 3px;">Alcohol op fust:</td> + <td align="left" style="vertical-align: top;"><div id="keg_abv"></div></td> + </tr> + <tr> + <td style="vertical-align: top; float: right; padding: 3px;">Hergisting temperatuur:</td> + <td align="left" style="vertical-align: top;"><div id="bottle_carbonation_temp"></div></td> + <td style="vertical-align: top; float: right; padding: 3px;">Keg temperatuur:</td> + <td align="left" style="vertical-align: top;"><div id="keg_carbonation_temp"></div></td> + </tr> + </table> </div> </div> <!-- Verpakken -->