Fri, 25 Jan 2019 16:57:59 +0100
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.
www/import/from_brouwhulp.php | file | annotate | diff | comparison | revisions | |
www/js/inv_fermentables.js | file | annotate | diff | comparison | revisions |
--- 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)
--- 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 "<div style='margin: 4px;' class='jqx-center-align'>" + FermentableTypeData[rowdata.type].nl + "</div>"; @@ -262,12 +263,18 @@ return "<div style='margin: 4px;' class='jqx-center-align'>" + GrainTypeData[value].nl + "</div>"; } }, - { 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 "<div style='margin: 4px;' class='jqx-right-align'></div>"; + if (value < 1) + return "<div style='margin: 4px;' class='jqx-right-align'>"+value * 1000+" gr</div>"; + return "<div style='margin: 4px;' class='jqx-right-align'>"+dataAdapter.formatNumber(value,"f1")+" kg</div>"; + } + }, + { 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.