www/import_ingredients.php

Tue, 31 Aug 2021 20:48:37 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 31 Aug 2021 20:48:37 +0200
changeset 774
92e1e8f175a2
parent 311
f6fafccd8a6d
permissions
-rw-r--r--

Split batch, adjust mash step volume. In the duplicated log_brew handle the missing values. In save product, round the mash step sg to 4 decimals. In prod_edit, ingredients are stored as strings, not arrays. This triggered a memory corruption that only happened in rare circumstances. Don't fix mash step fields in the javascript, it is already done during load from the database. Calculation of the mash volume is rounded to 6 decimals. Enter mash step Brix/Plato value, the SG result is rounded to 4 decimals.

<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php');
if ($my_select == "fermentables" )
	page_header('Vergistbare ingredi&euml;nten import', 'import_ingredients');
else if ($my_select == "hops" )
	page_header('Hoppen import', 'import_ingredients');
else if ($my_select == "miscs" )
	page_header('Diverse ingredi&euml;nten import', 'import_ingredients');
else if ($my_select == "yeasts")
	page_header('Gisten import', 'import_ingredients');
else if ($my_select == "styles")
	page_header('Bierstijlen import', 'import_ingredients');
else
	page_header('Bummer', '');
?>

   <div id="MainPanel">
    <div style="float: left; margin-left: 240px; margin-top: 50px;">
<?php
     if ($my_select == "fermentables")
	echo '<div align="center">Vergistbare ingredi&euml;nten xml bestand upload.</div><br>' . PHP_EOL;
     else if ($my_select == "hops")
	echo '<div align="center">Hoppen xml bestand upload.</div><br>' . PHP_EOL;
     else if ($my_select == "miscs")
	echo '<div align="center">Diverse ingredi&euml;nten xml bestand upload.</div><br>' . PHP_EOL;
     else if ($my_select == "yeasts")
	echo '<div align="center">Gisten xml bestand upload.</div><br>' . PHP_EOL;
     else if ($my_select == "styles")
	echo '<div align="center">Bierstijlen xml bestand upload.</div><br>' . PHP_EOL;
?>
     <div id="eventsPanel"> </div>
     <div style="float: left; margin-top: 10px;" id="jqxFileUpload"> </div>
    </div>
   </div>

<?php
page_footer();
?>

mercurial