# HG changeset patch # User Michiel Broek # Date 1583693559 -3600 # Node ID ffe0416614b38311363ffe33c8298df69380c0c5 # Parent 92afe6b59610dd28e7ed5aac1e99cbc0bcabc9bb Added short_desc to the yeast inventory database for short remarks in the yeastlab pdf list diff -r 92afe6b59610 -r ffe0416614b3 www/includes/db_inventory_yeasts.php --- 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'], diff -r 92afe6b59610 -r ffe0416614b3 www/inv_yeastlab.php --- 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); diff -r 92afe6b59610 -r ffe0416614b3 www/inv_yeasts.php --- 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 @@
+ Gistbank tekst: + + Ent temperatuur °C: +
+ + POF+:
Zymocide+:
- Ent temperatuur °C: -
+ Oogst tijd uren: +
STA1 (diastatic) gen:
Oogst van boven:
- Oogst tijd uren: -
- - - - Bevat bacteriën:
diff -r 92afe6b59610 -r ffe0416614b3 www/js/inv_yeasts.js --- 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);