www/crontasks.php

Sat, 23 Feb 2019 19:55:42 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 23 Feb 2019 19:55:42 +0100
changeset 282
f765249d57d7
parent 257
62e294ab94f5
child 294
1e09d1d102a8
permissions
-rw-r--r--

ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.

<?php

require_once('config.php');

$mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME);
$query = "UPDATE products SET stage=7 WHERE stage = 6 AND DATEDIFF(CURDATE(), package_date) > 0";
$result = $mysqli->query($query);

$query = "UPDATE products SET stage=8 WHERE stage = 7 AND DATEDIFF(CURDATE(), package_date) > 13";
$result = $mysqli->query($query);

$query = "UPDATE products SET stage=9 WHERE stage = 8 AND DATEDIFF(CURDATE(), package_date) > 41";
$result = $mysqli->query($query);

mercurial