www/includes/db_product.php

changeset 408
a93c9473a7c3
parent 394
ccd85f0ed96c
child 411
077ada2dda9b
--- a/www/includes/db_product.php	Thu Jun 13 21:28:17 2019 +0200
+++ b/www/includes/db_product.php	Fri Jun 14 15:57:57 2019 +0200
@@ -29,11 +29,9 @@
 	// Basic settings
 	if (isset($_POST['uuid'])) {
 		$sql .= "uuid='" . $_POST['uuid'];
-		syslog(LOG_NOTICE, 'Keep uuid ');
 	} else {
 		$uuid = str_replace("\n", "", file_get_contents('/proc/sys/kernel/random/uuid'));
 		$sql .= "uuid='" . $uuid;
-		syslog(LOG_NOTICE, 'New uuid ');
 	}
 	$sql .= "', name='" . mysqli_real_escape_string($connect, $_POST['name']);
 	$sql .= "', code='" . mysqli_real_escape_string($connect, $_POST['code']);
@@ -131,12 +129,12 @@
 		$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_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_sugar='" . $_POST['keg_priming_sugar'];
 	$sql .= "', keg_priming_amount='" . $_POST['keg_priming_amount'];
 	$sql .= "', keg_carbonation_temp='" . $_POST['keg_carbonation_temp'];
 	$sql .= "', keg_forced_carb='" . $_POST['keg_forced_carb'];
@@ -715,12 +713,12 @@
 		$brew .= ',"package_date":"' . $row['package_date'];
 		$brew .= '","bottle_amount":' . floatval($row['bottle_amount']);
 		$brew .= ',"bottle_carbonation":' . floatval($row['bottle_carbonation']);
-		$brew .= ',"bottle_priming_sugar":' . $row['bottle_priming_sugar'];
+		//$brew .= ',"bottle_priming_sugar":' . $row['bottle_priming_sugar'];
 		$brew .= ',"bottle_priming_amount":' . floatval($row['bottle_priming_amount']);
 		$brew .= ',"bottle_carbonation_temp":' . floatval($row['bottle_carbonation_temp']);
 		$brew .= ',"keg_amount":' . floatval($row['keg_amount']);
 		$brew .= ',"keg_carbonation":' . floatval($row['keg_carbonation']);
-		$brew .= ',"keg_priming_sugar":' . $row['keg_priming_sugar'];
+		//$brew .= ',"keg_priming_sugar":' . $row['keg_priming_sugar'];
 		$brew .= ',"keg_priming_amount":' . floatval($row['keg_priming_amount']);
 		$brew .= ',"keg_carbonation_temp":' . floatval($row['keg_carbonation_temp']);
 		$brew .= ',"keg_forced_carb":' . floatval($row['keg_forced_carb']);
@@ -1065,6 +1063,9 @@
     $savethis = 0;
     $stage = $_POST['stage'];
     $inventory_reduced = $_POST['inventory_reduced'];
+    if ($stage == $inventory_reduced) {
+	return;
+    }
     syslog(LOG_NOTICE, "inventory_reduce() stage: ".$stage." inventory_reduced: ".$inventory_reduced);
 
     /*

mercurial