# HG changeset patch # User Michiel Broek # Date 1548431879 -3600 # Node ID 64a9c935a66b81663d18ef18a4c9ede78bfb6634 # Parent f9b7e3f6be7c38a3ec59e0e4598b54b8849fc66b Yeast import Imperial Yeast packs are 200 billion cells/pack. Inventory fermentables the origin country column first. Disable filter menu on some fields. Friendy display of stock inventory. diff -r f9b7e3f6be7c -r 64a9c935a66b www/import/from_brouwhulp.php --- a/www/import/from_brouwhulp.php Fri Jan 25 13:33:10 2019 +0100 +++ b/www/import/from_brouwhulp.php Fri Jan 25 16:57:59 2019 +0100 @@ -278,7 +278,10 @@ $sql .= "', max_reuse='" . $yeast->MAX_REUSE; if ($yeast->FORM == 'Liquid') { - $sql .= "', cells='100000000000"; // 100 billion cells per pack + if ($yeast->LABORATORY == 'Imperial Yeast') + $sql .= "', cells='200000000000"; // 200 billion cells per pack + else + $sql .= "', cells='100000000000"; // 100 billion cells per pack if ($yeast->COST) $sql .= "', cost='" . floatval($yeast->COST); if ($yeast->INVENTORY) 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.