diff -r 217ba4596c4d -r 3c680d1dea35 www/js/inv_yeasts.js --- a/www/js/inv_yeasts.js Mon Oct 14 23:13:40 2019 +0200 +++ b/www/js/inv_yeasts.js Wed Oct 16 21:05:03 2019 +0200 @@ -47,12 +47,12 @@ function calcTotal() { $('#totval').val(dataRecord.cost * dataRecord.inventory); - if (dataRecord.form == 0) { // Liquid + if (dataRecord.form == 'Vloeibaar') { // Liquid $("#pmpt_cost").html('Prijs per pak:'); $("#pmpt_inventory").html('Voorraad pak(ken):'); $("#pmpt_cells").html('Miljard cellen per pak:'); $("#inventory").jqxNumberInput({ decimalDigits: 0 }); - } else if (dataRecord.form == 1) { // Dry + } else if (dataRecord.form == 'Droog') { // Dry $("#pmpt_cost").html('Prijs per kg:'); $("#pmpt_inventory").html('Voorraad gram:'); $("#pmpt_cells").html('Miljard cellen per gram:'); @@ -73,8 +73,8 @@ datafields: [ { name: 'record', type: 'number' }, { name: 'name', type: 'string' }, - { name: 'type', type: 'int' }, - { name: 'form', type: 'int' }, + { name: 'type', type: 'string' }, + { name: 'form', type: 'string' }, { name: 'laboratory', type: 'string' }, { name: 'product_id', type: 'string' }, { name: 'min_temperature', type: 'float' }, @@ -163,7 +163,7 @@ $("#type").jqxDropDownList({ theme: theme, source: YeastTypeAdapter, - valueMember: 'id', + valueMember: 'nl', displayMember: 'nl', width: 180, height: 23, @@ -172,9 +172,9 @@ $("#form").jqxDropDownList({ theme: theme, source: YeastFormAdapter, - valueMember: 'id', + valueMember: 'nl', displayMember: 'nl', - selectedIndex: 0, + // selectedIndex: 0, width: 180, height: 23, autoDropDownHeight: true @@ -251,8 +251,8 @@ $("#name").val(''); $("#laboratory").val(''); $("#product_id").val(''); - $("#type").val(0); - $("#form").val(0); + $("#type").val('Bovengist'); + $("#form").val('Vloeibaar'); $("#min_temperature").val(18); $("#max_temperature").val(22); $("#flocculation").val(0); @@ -270,7 +270,7 @@ $("#bacteria").val(0); $("#harvest_top").val(0); $("#harvest_time").val(0); - $("pitch_temperature#").val(0); + $("#pitch_temperature").val(0); $("#pofpos").val(0); $("#zymocide").val(0); $("#popupWindow").jqxWindow('open'); @@ -285,16 +285,8 @@ { text: 'Laboratorium', datafield: 'laboratory', width: 150 }, { text: 'Product ID', datafield: 'product_id', width: 120, menu: false }, { text: 'Gist naam', datafield: 'name', menu: false }, - { text: 'Type', datafield: 'type', align: 'center', cellsalign: 'center', menu: false, width: 110, - cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { - return "