diff -r 217ba4596c4d -r 3c680d1dea35 www/js/inv_fermentables.js --- a/www/js/inv_fermentables.js Mon Oct 14 23:13:40 2019 +0200 +++ b/www/js/inv_fermentables.js Wed Oct 16 21:05:03 2019 +0200 @@ -58,7 +58,7 @@ datafields: [ { name: 'record', type: 'number' }, { name: 'name', type: 'string' }, - { name: 'type', type: 'int' }, + { name: 'type', type: 'string' }, { name: 'yield', type: 'float' }, { name: 'color', type: 'float' }, { name: 'add_after_boil', type: 'int' }, @@ -72,11 +72,11 @@ { name: 'dissolved_protein', type: 'float' }, { name: 'max_in_batch', type: 'float' }, { name: 'recommend_mash', type: 'int' }, - { name: 'added', type: 'int' }, + { name: 'added', type: 'string' }, { name: 'always_on_stock', type: 'int' }, { name: 'di_ph', type: 'float' }, { name: 'acid_to_ph_57', type: 'float' }, - { name: 'graintype', type: 'int' }, + { name: 'graintype', type: 'string' }, { name: 'inventory', type: 'float' }, { name: 'cost', type: 'float' }, { name: 'production_date', type: 'string' }, @@ -145,7 +145,7 @@ $("#type").jqxDropDownList({ theme: theme, source: FermentableTypeAdapter, - valueMember: 'id', + valueMember: 'nl', displayMember: 'nl', width: 180, height: 23, @@ -167,7 +167,7 @@ $("#added").jqxDropDownList({ theme: theme, source: AddedAdapter, - valueMember: 'id', + valueMember: 'nl', displayMember: 'nl', width: 180, height: 23, @@ -179,7 +179,7 @@ $("#graintype").jqxDropDownList({ theme: theme, source: GrainTypeAdapter, - valueMember: 'id', + valueMember: 'nl', displayMember: 'nl', width: 180, height: 23, @@ -213,7 +213,7 @@ editrow = -1; $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); $("#name").val('Nieuw product'); - $("#type").val(0); + $("#type").val('Mout'); $("#origin").val(''); $("#supplier").val(''); $("#notes").val(''); @@ -229,9 +229,9 @@ $("#always_on_stock").val(0); $("#di_ph").val(0); $("#acid_to_ph_57").val(0); - $("#graintype").val(0); + $("#graintype").val('Basismout'); $("#add_after_boil").val(0); - $("#added").val(0); + $("#added").val('Maischen'); $("#inventory").val(0); $("#cost").val(0); $("#production_date").val(''); @@ -248,16 +248,8 @@ { text: 'Herkomst', datafield: 'origin', width: 150 }, { text: 'Producent', datafield: 'supplier', width: 140 }, { text: 'Vergistbaar product', datafield: 'name', menu: false }, - { text: 'Soort', width: 135, filtertype: 'list', datafield: 'type', - cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - return "" + FermentableTypeData[value].nl + ""; - } - }, - { text: 'Graan type', datafield: 'graintype', align: 'center', cellsalign: 'center', width: 125, - cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - return "" + GrainTypeData[value].nl + ""; - } - }, + { text: 'Soort', width: 135, filtertype: 'list', datafield: 'type' }, + { text: 'Graan type', datafield: 'graintype', align: 'center', cellsalign: 'center', width: 125 }, { 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,