Added short_desc to the yeast inventory database for short remarks in the yeastlab pdf list

Sun, 08 Mar 2020 19:52:39 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 08 Mar 2020 19:52:39 +0100
changeset 630
ffe0416614b3
parent 629
92afe6b59610
child 631
450ac489bbe7

Added short_desc to the yeast inventory database for short remarks in the yeastlab pdf list

www/includes/db_inventory_yeasts.php file | annotate | diff | comparison | revisions
www/inv_yeastlab.php file | annotate | diff | comparison | revisions
www/inv_yeasts.php file | annotate | diff | comparison | revisions
www/js/inv_yeasts.js file | annotate | diff | comparison | revisions
--- a/www/includes/db_inventory_yeasts.php	Sun Mar 08 17:43:55 2020 +0100
+++ b/www/includes/db_inventory_yeasts.php	Sun Mar 08 19:52:39 2020 +0100
@@ -26,6 +26,7 @@
 	$sql .= "', form='" . array_search($_POST['form'], $yeastform);
 	$sql .= "', laboratory='" . mysqli_real_escape_string($connect, $_POST['laboratory']);
 	$sql .= "', product_id='" . mysqli_real_escape_string($connect, $_POST['product_id']);
+	$sql .= "', short_desc='" . mysqli_real_escape_string($connect, $_POST['short_desc']);
 	$sql .= "', min_temperature='" . $_POST['min_temperature'];
 	$sql .= "', max_temperature='" . $_POST['max_temperature'];
 	$sql .= "', flocculation='" . $_POST['flocculation'];
@@ -96,6 +97,7 @@
 			'form' => $yeastform[$row['form']],
 			'laboratory' => $row['laboratory'],
 			'product_id' => $row['product_id'],
+			'short_desc' => $row['short_desc'],
 			'min_temperature' => $row['min_temperature'],
 			'max_temperature' => $row['max_temperature'],
 			'flocculation' => $row['flocculation'],
--- a/www/inv_yeastlab.php	Sun Mar 08 17:43:55 2020 +0100
+++ b/www/inv_yeastlab.php	Sun Mar 08 19:52:39 2020 +0100
@@ -82,8 +82,8 @@
 		global $yeasttype;
 		global $yeastform;
 		global $my_lab;
-		$this->AddCol( 20,'Product','L');
-		$this->AddCol( 70,'Gist','L');
+		$this->AddCol( 60,'Gist','L');
+		$this->AddCol( 50,'Omschrijving','L');
 		$this->AddCol( 18,'Soort','L');
 		$this->AddCol( 18,'Vorm','L');
 		$this->AddCol( 20,'Voorraad','R');
@@ -101,7 +101,7 @@
 		$this->ColorIndex=0;
 		$this->ProcessingTable=true;
 
-		$sql  = "SELECT name,product_id,type,form,inventory,production_date FROM inventory_yeasts ";
+		$sql  = "SELECT name,type,form,inventory,production_date,short_desc FROM inventory_yeasts ";
 		$sql .= "WHERE inventory > 0 AND laboratory = '".$my_lab."' ORDER BY product_id";
 		$result = mysqli_query($link, $sql);
 
@@ -115,8 +115,8 @@
 			$this->SetX($this->TableX);
 			$ci=$this->ColorIndex;
 			$this->SetFillColor($this->RowColors[$ci][0],$this->RowColors[$ci][1],$this->RowColors[$ci][2]);
-			$this->Cell(20,5,iconv('UTF-8','windows-1252',$row['product_id']),0,0,'L',true);
-			$this->Cell(70,5,iconv('UTF-8','windows-1252',$row['name']),0,0,'L',true);
+			$this->Cell(60,5,iconv('UTF-8','windows-1252',$row['name']),0,0,'L',true);
+			$this->Cell(50,5,iconv('UTF-8','windows-1252',$row['short_desc']),0,0,'L',true);
 			$this->Cell(18,5,iconv('UTF-8','windows-1252',$yeasttype[$row['type']]),0,0,'L',true);
 			$this->Cell(18,5,iconv('UTF-8','windows-1252',$yeastform[$row['form']]),0,0,'L',true);
 			$this->Cell(20,5,sprintf("%10.1f ",$stock).$form[$row['form']],0,0,'R',true);
--- a/www/inv_yeasts.php	Sun Mar 08 17:43:55 2020 +0100
+++ b/www/inv_yeasts.php	Sun Mar 08 19:52:39 2020 +0100
@@ -65,24 +65,24 @@
        <td align="left"><div id="max_reuse"></div></td>
       </tr>
       <tr>
+       <td align="right" style="vertical-align: top;">Gistbank tekst:</td>
+       <td align="left" colspan="3" style="vertical-align: top;"><input id="short_desc" /></td>
+       <td align="right" style="vertical-align: top;">Ent temperatuur &deg;C:</td>
+       <td align="left"><div id="pitch_temperature"></div></td>
+      </tr>
+      <tr>
        <td align="right" style="vertical-align: top;">POF+:</td>
        <td align="left"><div id="pofpos"></div></td>
        <td align="right" style="vertical-align: top;">Zymocide+:</td>
        <td align="left"><div id="zymocide"></div></td>
-       <td align="right" style="vertical-align: top;">Ent temperatuur &deg;C:</td>
-       <td align="left"><div id="pitch_temperature"></div></td>
+       <td align="right" style="vertical-align: top;">Oogst tijd uren:</td>
+       <td align="left"><div id="harvest_time"></div></td>
       </tr>
       <tr>
        <td align="right" style="vertical-align: top;">STA1 (diastatic) gen:</td>
        <td align="left"><div id="sta1"></div></td>
        <td align="right" style="vertical-align: top;">Oogst van boven:</td>
        <td align="left"><div id="harvest_top"></div></td>
-       <td align="right" style="vertical-align: top;">Oogst tijd uren:</td>
-       <td align="left"><div id="harvest_time"></div></td>
-      </tr>
-      <tr>
-       <td></td><td></td>
-       <td></td><td></td>
        <td align="right" style="vertical-align: top;">Bevat bacteri&euml;n:</td>
        <td align="left"><div id="bacteria"></div></td>
       </tr>
--- a/www/js/inv_yeasts.js	Sun Mar 08 17:43:55 2020 +0100
+++ b/www/js/inv_yeasts.js	Sun Mar 08 19:52:39 2020 +0100
@@ -96,7 +96,8 @@
    { name: 'harvest_time', type: 'int' },
    { name: 'pitch_temperature', type: 'float' },
    { name: 'pofpos', type: 'int' },
-   { name: 'zymocide', type: 'int' }
+   { name: 'zymocide', type: 'int' },
+   { name: 'short_desc', type: 'string' }
   ],
   id: 'record',
   url: url,
@@ -159,6 +160,7 @@
  // initialize the input fields.
  $('#name').jqxInput({ theme: theme, width: 640, height: 23 });
  $('#laboratory').jqxInput({ theme: theme, width: 320, height: 23 });
+ $('#short_desc').jqxInput({ theme: theme, width: 320, height: 23 });
  $('#product_id').jqxInput({ theme: theme, width: 320, height: 23 });
  $('#type').jqxDropDownList({
   theme: theme,
@@ -255,6 +257,7 @@
     $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } });
     $('#name').val('');
     $('#laboratory').val('');
+    $('#short_desc').val('');
     $('#product_id').val('');
     $('#type').val('Bovengist');
     $('#form').val('Vloeibaar');
@@ -356,6 +359,7 @@
      $('#pitch_temperature').val(parseFloat(dataRecord.pitch_temperature));
      $('#pofpos').val(dataRecord.pofpos);
      $('#zymocide').val(dataRecord.zymocide);
+     $('#short_desc').val(dataRecord.short_desc);
      calcTotal();
      // show the popup window.
      $('#popupWindow').jqxWindow('open');
@@ -478,7 +482,8 @@
    harvest_time: $('#harvest_time').val(),
    pitch_temperature: parseFloat($('#pitch_temperature').jqxNumberInput('decimal')),
    pofpos: $('#pofpos').val(),
-   zymocide: $('#zymocide').val()
+   zymocide: $('#zymocide').val(),
+   short_desc: $('#short_desc').val()
   };
   if (editrow >= 0) {
    $('#jqxgrid').jqxGrid('updaterow', rowID, row);

mercurial