# HG changeset patch # User Michiel Broek # Date 1597850004 -7200 # Node ID 9646123ea06343ab47723fd1664f69dd19d1107a # Parent e251cceec547e299f15dae66662415fdf36b2536 Fixed st_category_namber to be an integer value instead of float. The calc_acid in a new recipe is integer. Added missing wg_ and wb_ fields in a new recipe. diff -r e251cceec547 -r 9646123ea063 www/includes/db_recipes.php --- a/www/includes/db_recipes.php Fri Aug 14 11:38:58 2020 +0200 +++ b/www/includes/db_recipes.php Wed Aug 19 17:13:24 2020 +0200 @@ -396,7 +396,7 @@ $recipes .= '","st_name":"' . str_replace($escapers, $replacements, $row['st_name']); $recipes .= '","st_type":' . $row['st_type']; $recipes .= ',"st_category":"' . str_replace($escapers, $replacements, $row['st_category']); - $recipes .= '","st_category_number":' . floatval($row['st_category_number']); + $recipes .= '","st_category_number":' . $row['st_category_number']; $recipes .= ',"st_og_min":' . floatval($row['st_og_min']); $recipes .= ',"st_og_max":' . floatval($row['st_og_max']); $recipes .= ',"st_fg_min":' . floatval($row['st_fg_min']); diff -r e251cceec547 -r 9646123ea063 www/js/prod_divide.js --- a/www/js/prod_divide.js Fri Aug 14 11:38:58 2020 +0200 +++ b/www/js/prod_divide.js Wed Aug 19 17:13:24 2020 +0200 @@ -186,7 +186,7 @@ { name: 'st_letter', type: 'string' }, { name: 'st_guide', type: 'string' }, { name: 'st_category', type: 'string' }, - { name: 'st_category_number', type: 'float' }, + { name: 'st_category_number', type: 'int' }, { name: 'st_type', type: 'int' }, { name: 'st_og_min', type: 'float' }, { name: 'st_og_max', type: 'float' }, diff -r e251cceec547 -r 9646123ea063 www/js/rec_edit.js --- a/www/js/rec_edit.js Fri Aug 14 11:38:58 2020 +0200 +++ b/www/js/rec_edit.js Wed Aug 19 17:13:24 2020 +0200 @@ -733,7 +733,7 @@ { name: 'st_guide', type: 'string' }, { name: 'st_type', type: 'int' }, { name: 'st_category', type: 'string' }, - { name: 'st_category_number', type: 'float' }, + { name: 'st_category_number', type: 'int' }, { name: 'st_og_min', type: 'float' }, { name: 'st_og_max', type: 'float' }, { name: 'st_fg_min', type: 'float' }, @@ -2770,7 +2770,7 @@ st_guide: $('#st_guide').val(), st_type: dataRecord.st_type, st_category: $('#st_category').val(), - st_category_number: parseFloat($('#st_category_number').jqxNumberInput('decimal')), + st_category_number: $('#st_category_number').val(), st_og_min: parseFloat($('#st_og_min').jqxNumberInput('decimal')), st_og_max: parseFloat($('#st_og_max').jqxNumberInput('decimal')), st_fg_min: parseFloat($('#st_fg_min').jqxNumberInput('decimal')), diff -r e251cceec547 -r 9646123ea063 www/js/rec_new.js --- a/www/js/rec_new.js Fri Aug 14 11:38:58 2020 +0200 +++ b/www/js/rec_new.js Wed Aug 19 17:13:24 2020 +0200 @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * * Michiel Broek * @@ -48,7 +48,7 @@ st_letter: $('#st_style_letter').val(), st_guide: $('#st_style_guide').val(), st_category: $('#st_category').val(), - st_category_number: parseFloat($('#st_category_number').jqxNumberInput('decimal')), + st_category_number: $('#st_category_number').val(), st_type: style_type, st_og_min: parseFloat($('#st_og_min').jqxNumberInput('decimal')), st_og_max: parseFloat($('#st_og_max').jqxNumberInput('decimal')), @@ -84,7 +84,7 @@ sparge_acid_type: 0, // Lactic acid sparge_acid_perc: 80, sparge_acid_amount: 0, - calc_acid: true, + calc_acid: 1, w1_name: 'Tap water', w1_amount: 15, w1_calcium: 0, @@ -95,6 +95,21 @@ w1_total_alkalinity: 0, w1_ph: 7.0, w1_cost: 0.0, + wg_amount: 15, + wg_calcium: 0, + wg_sulfate: 0, + wg_chloride: 0, + wg_sodium: 0, + wg_magnesium: 0, + wg_total_alkalinity: 0, + wg_ph: 7.0, + wb_calcium: 0, + wb_sulfate: 0, + wb_sodium: 0, + wb_chloride: 0, + wb_magnesium: 0, + wb_total_alkalinity: 0, + wb_ph: 0, wa_acid_name: 0, // Lactic acid wa_acid_perc: 80, wa_base_name: 0