diff -r 8d7fad771dde -r f0ca77097236 www/js/prod_edit.js
--- a/www/js/prod_edit.js Wed Mar 13 20:17:15 2019 +0100
+++ b/www/js/prod_edit.js Wed Mar 13 21:31:04 2019 +0100
@@ -3672,6 +3672,7 @@
{ name: 'y_attenuation', type: 'float' },
{ name: 'y_use', type: 'int' },
{ name: 'y_cells', type: 'float' },
+ { name: 'y_tolerance', type: 'float' },
{ name: 'y_inventory', type: 'float' },
{ name: 'y_avail', type: 'int' }
],
@@ -3733,6 +3734,7 @@
row["y_attenuation"] = datarecord.attenuation;
row["y_flocculation"] = datarecord.flocculation;
row["y_cells"] = datarecord.cells;
+ row["y_tolerance"] = datarecord.tolerance;
row["y_inventory"] = datarecord.inventory;
var commit = $("#yeastGrid").jqxGrid('addrow', null, row);
}
@@ -3773,13 +3775,25 @@
},
{ text: 'Min. °C', width: 70, align: 'right', cellsalign: 'right', datafield: 'y_min_temperature' },
{ text: 'Max. °C', width: 70, align: 'right', cellsalign: 'right', datafield: 'y_max_temperature' },
+ { text: 'Tol. %', width: 60, align: 'right', cellsalign: 'right', datafield: 'y_tolerance',
+ cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
+ var color = '#ffffff';
+ var amount = "";
+ if (value > 0) {
+ amount = dataAdapter.formatNumber(value, "f1");
+ if (dataRecord.est_abv > value)
+ color = '#ff4040';
+ }
+ return '' + amount + '';
+ }
+ },
{ text: 'Attn. %', width: 70, align: 'right', cellsalign: 'right', datafield: 'y_attenuation', cellsformat: 'f1' },
{ text: 'Voor', width: 120, datafield: 'y_use',
cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
return '' + YeastUseData[value].nl + '';
}
},
- { text: 'Hoeveel', datafield: 'y_amount', width: 100, align: 'right',
+ { text: 'Hoeveel', datafield: 'y_amount', width: 90, align: 'right',
cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
var amount = dataAdapter.formatNumber(value*1000, "f0")+" ml";
if (rowdata.y_form == 0) // Liquid
@@ -3789,7 +3803,7 @@
return '' + amount + '';
}
},
- { text: 'Voorraad', datafield: 'y_inventory', width: 100, align: 'right',
+ { text: 'Voorraad', datafield: 'y_inventory', width: 90, align: 'right',
cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
var color = '#ffffff';
if (value < rowdata.y_amount)
@@ -3802,7 +3816,7 @@
return '' + amount + '';
}
},
- { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', cellsrenderer: function () {
+ { text: '', datafield: 'Edit', columntype: 'button', width: 90, align: 'center', cellsrenderer: function () {
return "Wijzig";
}, buttonclick: function (row) {
if (dataRecord.stage <= 3) {