Less logging in the db_product interface. Fixed some empty default values that bugged the newer php and mariadb versions.

Mon, 20 Jul 2020 15:48:46 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 20 Jul 2020 15:48:46 +0200
changeset 706
12f9316de113
parent 705
d77b723f7b35
child 707
8488195b3c50

Less logging in the db_product interface. Fixed some empty default values that bugged the newer php and mariadb versions.

www/includes/db_product.php file | annotate | diff | comparison | revisions
www/js/prod_edit.js file | annotate | diff | comparison | revisions
www/js/prod_new.js file | annotate | diff | comparison | revisions
--- a/www/includes/db_product.php	Wed Jul 15 16:03:23 2020 +0200
+++ b/www/includes/db_product.php	Mon Jul 20 15:48:46 2020 +0200
@@ -493,7 +493,7 @@
                         else
                                 $mash .= ',"step_wg_ratio":0';
 			$mash .= '}';
-			syslog(LOG_NOTICE, $mash);
+			//syslog(LOG_NOTICE, $mash);
 			$mashs .= $mash;
 		}
 	}
@@ -802,7 +802,7 @@
 		$brew .= '","st_name":"'  . str_replace($escapers, $replacements, $row['st_name']);
 		$brew .= '","st_type":' . $row['st_type'];
 		$brew .= ',"st_category":"' . str_replace($escapers, $replacements, $row['st_category']);
-		$brew .= '","st_category_number":' . floatval($row['st_category_number']);
+		$brew .= '","st_category_number":' . $row['st_category_number'];
 		$brew .= ',"st_og_min":' . floatval($row['st_og_min']);
 		$brew .= ',"st_og_max":' . floatval($row['st_og_max']);
 		$brew .= ',"st_fg_min":' . floatval($row['st_fg_min']);
@@ -1012,7 +1012,6 @@
 			$brew .= ',"miscs":' . $row['json_miscs'];
 			$brew .= ',"yeasts":' . $row['json_yeasts'];
 		}
-syslog(LOG_NOTICE, $row['json_mashs']);
 		$brew .= ',"mashs":' . $row['json_mashs'];
 		$brew .= '}';
 //		syslog(LOG_NOTICE, $brew);
--- a/www/js/prod_edit.js	Wed Jul 15 16:03:23 2020 +0200
+++ b/www/js/prod_edit.js	Mon Jul 20 15:48:46 2020 +0200
@@ -313,7 +313,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' },
@@ -4618,7 +4618,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')),
--- a/www/js/prod_new.js	Wed Jul 15 16:03:23 2020 +0200
+++ b/www/js/prod_new.js	Mon Jul 20 15:48:46 2020 +0200
@@ -272,7 +272,7 @@
      eq_trub_chiller_loss: parseFloat($('#eq_trub_chiller_loss').jqxNumberInput('decimal')),
      eq_evap_rate: parseFloat($('#eq_evap_rate').jqxNumberInput('decimal')),
      eq_boil_time: parseFloat($('#eq_boil_time').jqxNumberInput('decimal')),
-     eq_calc_boil_volume: $('#eq_calc_boil_volume').val(),
+     eq_calc_boil_volume: $('#eq_calc_boil_volume').val() ?1:0,
      eq_top_up_kettle: parseFloat($('#eq_top_up_kettle').jqxNumberInput('decimal')),
      eq_hop_utilization: parseFloat($('#eq_hop_utilization').jqxNumberInput('decimal')),
      eq_notes: $('#eq_notes').val(),
@@ -327,6 +327,7 @@
      primary_end_date: '',
      secondary_temp: 0,
      secondary_end_date: '',
+     secondary_end_sg: 0,
      tertiary_temp: 0,
      package_date: '',
      package_volume: 0,
@@ -362,7 +363,7 @@
      st_guide: $('#st_guide').val(),
      st_type: style_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')),
@@ -381,6 +382,7 @@
      boil_time: parseFloat($('#eq_boil_time').jqxNumberInput('decimal')),
      efficiency: parseFloat($('#eq_efficiency').jqxNumberInput('decimal')),
      est_og: 0.000,
+     est_og3: 0.000,
      est_fg: 0.000,
      est_color: 0,
      est_abv: 0.0,

mercurial