diff -r f9b7e3f6be7c -r 64a9c935a66b www/js/inv_fermentables.js
--- a/www/js/inv_fermentables.js Fri Jan 25 13:33:10 2019 +0100
+++ b/www/js/inv_fermentables.js Fri Jan 25 16:57:59 2019 +0100
@@ -239,8 +239,9 @@
filterable: true,
filtermode: 'excel',
columns: [
+ { text: 'Herkomst', datafield: 'origin', width: 150 },
{ text: 'Producent', datafield: 'supplier', width: 140 },
- { text: 'Vergistbaar product', datafield: 'name' },
+ { text: 'Vergistbaar product', datafield: 'name', menu: false },
{ text: 'Soort', width: 135, filtertype: 'list', /*filteritems: FermentableTypeAdapter, displayfield: 'nl',*/ datafield: 'type',
cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
return "
" + FermentableTypeData[rowdata.type].nl + "
";
@@ -262,12 +263,18 @@
return "" + GrainTypeData[value].nl + "
";
}
},
- { text: 'Herkomst', datafield: 'origin', width: 150 },
- { text: 'EBC', datafield: 'color', width: 60, 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' },
- { text: 'Prijs/kg', datafield: 'cost', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'c2' },
- { text: 'Wijzig', datafield: 'Edit', width: 100, align: 'center', columntype: 'button', cellsrenderer: function () {
+ { text: 'EBC', datafield: 'color', width: 60, align: 'right', menu: false, cellsalign: 'right' },
+ { text: 'Opbrengst', datafield: 'yield', width: 70, align: 'right', menu: false, cellsalign: 'right', cellsformat: 'p1' },
+ { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', menu: false,
+ cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
+ if (value == 0)
+ return "";
+ if (value < 1)
+ return ""+value * 1000+" gr
";
+ return ""+dataAdapter.formatNumber(value,"f1")+" kg
";
+ }
+ },
+ { text: 'Wijzig', datafield: 'Edit', width: 100, align: 'center', menu: false, columntype: 'button', cellsrenderer: function () {
return "Wijzig";
}, buttonclick: function (row) {
// open the popup window when the user clicks a button.