Sorting the inventory and changes some grid tables.

Sat, 25 Aug 2018 13:07:13 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 25 Aug 2018 13:07:13 +0200
changeset 37
9362eb9e9e5b
parent 36
4b829f689d7e
child 38
b7d44c98d609

Sorting the inventory and changes some grid tables.

www/includes/db_inventory_equipments.php file | annotate | diff | comparison | revisions
www/includes/db_inventory_fermentables.php file | annotate | diff | comparison | revisions
www/includes/db_inventory_hops.php file | annotate | diff | comparison | revisions
www/includes/db_inventory_miscs.php file | annotate | diff | comparison | revisions
www/includes/db_inventory_styles.php file | annotate | diff | comparison | revisions
www/includes/db_inventory_water_profiles.php file | annotate | diff | comparison | revisions
www/includes/db_inventory_water_sources.php file | annotate | diff | comparison | revisions
www/includes/db_inventory_yeasts.php file | annotate | diff | comparison | revisions
www/js/inv_fermentables.js file | annotate | diff | comparison | revisions
www/js/inv_hops.js file | annotate | diff | comparison | revisions
www/js/inv_yeasts.js file | annotate | diff | comparison | revisions
--- a/www/includes/db_inventory_equipments.php	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/includes/db_inventory_equipments.php	Sat Aug 25 13:07:13 2018 +0200
@@ -9,7 +9,7 @@
 }
 
 // get data and store in a json array
-$query = "SELECT * FROM inventory_equipments";
+$query = "SELECT * FROM inventory_equipments ORDER BY name";
 if (isset($_GET['insert'])) {
 	// INSERT COMMAND
 	$sql  = "INSERT INTO `inventory_equipments` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
--- a/www/includes/db_inventory_fermentables.php	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/includes/db_inventory_fermentables.php	Sat Aug 25 13:07:13 2018 +0200
@@ -11,7 +11,7 @@
 }
 
 // get data and store in a json array
-$query = "SELECT * FROM inventory_fermentables";
+$query = "SELECT * FROM inventory_fermentables ORDER BY supplier,name";
 if (isset($_GET['insert'])) {
 	// INSERT COMMAND
 	$sql  = "INSERT INTO `inventory_fermentables` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
--- a/www/includes/db_inventory_hops.php	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/includes/db_inventory_hops.php	Sat Aug 25 13:07:13 2018 +0200
@@ -11,7 +11,7 @@
 }
 
 // get data and store in a json array
-$query = "SELECT * FROM inventory_hops";
+$query = "SELECT * FROM inventory_hops ORDER BY origin,name";
 if (isset($_GET['insert'])) {
 	// INSERT COMMAND
 	$sql  = "INSERT INTO `inventory_hops` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
--- a/www/includes/db_inventory_miscs.php	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/includes/db_inventory_miscs.php	Sat Aug 25 13:07:13 2018 +0200
@@ -10,7 +10,7 @@
 }
 
 // get data and store in a json array
-$query = "SELECT * FROM inventory_miscs";
+$query = "SELECT * FROM inventory_miscs ORDER BY name";
 if (isset($_GET['insert'])) {
 	// INSERT COMMAND
 	$sql  = "INSERT INTO `inventory_miscs` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
--- a/www/includes/db_inventory_styles.php	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/includes/db_inventory_styles.php	Sat Aug 25 13:07:13 2018 +0200
@@ -10,7 +10,7 @@
 }
 
 // get data and store in a json array
-$query = "SELECT * FROM inventory_styles";
+$query = "SELECT * FROM inventory_styles ORDER BY name";
 if (isset($_GET['insert'])) {
 	// INSERT COMMAND
 	$sql  = "INSERT INTO `inventory_styles` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
--- a/www/includes/db_inventory_water_profiles.php	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/includes/db_inventory_water_profiles.php	Sat Aug 25 13:07:13 2018 +0200
@@ -10,7 +10,7 @@
 }
 
 // get data and store in a json array
-$query = "SELECT * FROM inventory_water_profiles";
+$query = "SELECT * FROM inventory_water_profiles ORDER BY name";
 if (isset($_GET['insert'])) {
 	// INSERT COMMAND
 	$sql  = "INSERT INTO `inventory_water_profiles` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
--- a/www/includes/db_inventory_water_sources.php	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/includes/db_inventory_water_sources.php	Sat Aug 25 13:07:13 2018 +0200
@@ -24,7 +24,7 @@
 
 
 // get data and store in a json array
-$query = "SELECT * FROM inventory_water_sources";
+$query = "SELECT * FROM inventory_water_sources ORDER BY name";
 if (isset($_GET['insert'])) {
 	// INSERT COMMAND
 	$sql  = "INSERT INTO `inventory_water_sources` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
--- a/www/includes/db_inventory_yeasts.php	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/includes/db_inventory_yeasts.php	Sat Aug 25 13:07:13 2018 +0200
@@ -10,7 +10,7 @@
 }
 
 // get data and store in a json array
-$query = "SELECT * FROM inventory_yeasts";
+$query = "SELECT * FROM inventory_yeasts ORDER BY laboratory,product_id,name";
 if (isset($_GET['insert'])) {
 	// INSERT COMMAND
 	$sql  = "INSERT INTO `inventory_yeasts` SET name='" . mysqli_real_escape_string($connect, $_GET['name']);
--- a/www/js/inv_fermentables.js	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/js/inv_fermentables.js	Sat Aug 25 13:07:13 2018 +0200
@@ -199,11 +199,11 @@
 		filterable: true,
 		filtermode: 'excel',
 		columns: [
-			{ text: 'Vergistbaar product', datafield: 'name', width: 270 },
+		{ text: 'Producent', datafield: 'supplier', width: 200 },
+			{ text: 'Vergistbaar product', datafield: 'name' },
 			{ text: 'Soort', datafield: 'type', align: 'center', cellsalign: 'center', width: 90 },
 			{ text: 'Mout type', datafield: 'graintype', align: 'center', cellsalign: 'center', width: 90 },
 			{ text: 'Herkomst', datafield: 'origin', width: 150 },
-			{ text: 'Producent', datafield: 'supplier', width: 200 },
 			{ text: 'Kleur', datafield: 'color', width: 70, align: 'right', cellsalign: 'right' },
 			{ text: 'Opbrengst', datafield: 'yield', width: 70, align: 'right', cellsalign: 'right', cellsformat: 'p1' },
 			{ text: 'Vooraad', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f3' },
--- a/www/js/inv_hops.js	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/js/inv_hops.js	Sat Aug 25 13:07:13 2018 +0200
@@ -190,18 +190,18 @@
 		filterable: true,
 		filtermode: 'excel',
 		columns: [
-			{ text: 'Hop Naam', datafield: 'name', width: 250 },
+			{ text: 'Herkomst', datafield: 'origin', align: 'center', cellsalign: 'center', width: 150 },
+			{ text: 'Hop Naam', datafield: 'name' },
 			{ text: 'Soort', datafield: 'type', align: 'center', cellsalign: 'center', width: 90 },
 			{ text: 'Vorm', datafield: 'form', align: 'center', cellsalign: 'center', width: 90 },
 			{ text: 'Alpha %', datafield: 'alpha', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'p1' },
 			{ text: 'Beta %', datafield: 'beta', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'p1' },
 			{ text: 'Cohumuloon %%', datafield: 'cohumulone', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'p1' },
 			{ text: 'HSI', datafield: 'hsi', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
-			{ text: 'Herkomst', datafield: 'origin', align: 'center', cellsalign: 'center', width: 150 },
 			{ text: 'Oogst datum', datafield: 'production_date', align: 'center', cellsalign: 'center', width: 100 },
 			{ text: 'Voor, gr.', datafield: 'inventory', width: 70, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
 			{ text: 'Prijs /kg', datafield: 'cost', width: 70, align: 'right', cellsalign: 'right', cellsformat: 'c2' },
-			{ text: 'Wijzig', datafield: 'Wijzig', columntype: 'button', align: 'center', cellsrenderer: function () {
+			{ text: 'Wijzig', datafield: 'Wijzig', columntype: 'button', width: 120, align: 'center', cellsrenderer: function () {
 				return "Wijzig";
 				}, buttonclick: function (row) {
 					// open the popup window when the user clicks a button.
--- a/www/js/inv_yeasts.js	Sat Aug 25 11:40:31 2018 +0200
+++ b/www/js/inv_yeasts.js	Sat Aug 25 13:07:13 2018 +0200
@@ -183,15 +183,15 @@
 		filterable: true,
 		filtermode: 'excel',
 		columns: [
-			{ text: 'Gist naam', datafield: 'name', width: 350 },
 			{ text: 'Laboratorium', datafield: 'laboratory', width: 150 },
 			{ text: 'Product ID', datafield: 'product_id', width: 120 },
+			{ text: 'Gist naam', datafield: 'name' },
 			{ text: 'Type', datafield: 'type', align: 'center', cellsalign: 'center', width: 90 },
 			{ text: 'Vorm', datafield: 'form', align: 'center', cellsalign: 'center', width: 90 },
 			{ text: 'Vergistingsgraad', datafield: 'attenuation', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'p0' },
 			{ text: 'Voor. gr/ml', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
 			{ text: 'Prijs kg/l', datafield: 'cost', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'c2' },
-			{ text: 'Wijzig', datafield: 'Edit', columntype: 'button', align: 'center', cellsrenderer: function () {
+			{ text: 'Wijzig', datafield: 'Edit', columntype: 'button', width: 120, align: 'center', cellsrenderer: function () {
 				return "Wijzig";
 				}, buttonclick: function (row) {
 					// open the popup window when the user clicks a button.

mercurial