www/js/inv_fermentables.js

changeset 376
1de1623e1760
parent 324
d49da6d0b451
child 395
463d64cce768
--- a/www/js/inv_fermentables.js	Sun May 26 16:09:50 2019 +0200
+++ b/www/js/inv_fermentables.js	Sun May 26 20:37:28 2019 +0200
@@ -156,7 +156,7 @@
 	$("#notes").jqxInput({ theme: theme, width: 640, height: 100 });
 	$("#coarse_fine_diff").jqxNumberInput( Spin1dec );
 	$("#moisture").jqxNumberInput( Spin1dec );
-	$("#diastatic_power").jqxNumberInput( Spin1dec );
+	$("#diastatic_power").jqxNumberInput( PosInt );
 	$("#protein").jqxNumberInput( Spin1dec );
 	$("#dissolved_protein").jqxNumberInput( Spin1dec );
 	$("#max_in_batch").jqxNumberInput( Perc1dec );
@@ -289,7 +289,7 @@
 					$("#notes").val(dataRecord.notes);
 					$("#coarse_fine_diff").val(dataRecord.coarse_fine_diff);
 					$("#moisture").val(dataRecord.moisture);
-					$("#diastatic_power").val(dataRecord.diastatic_power);
+					$("#diastatic_power").val(lintner_to_kolbach(dataRecord.diastatic_power));
 					$("#protein").val(dataRecord.protein);
 					$("#dissolved_protein").val(dataRecord.dissolved_protein);
 					$("#max_in_batch").val(dataRecord.max_in_batch);
@@ -366,7 +366,7 @@
 			notes: $("#notes").val(),
 			coarse_fine_diff: parseFloat($("#coarse_fine_diff").jqxNumberInput('decimal')),
 			moisture: parseFloat($("#moisture").jqxNumberInput('decimal')),
-			diastatic_power: parseFloat($("#diastatic_power").jqxNumberInput('decimal')),
+			diastatic_power: kolbach_to_lintner(parseFloat($("#diastatic_power").jqxNumberInput('decimal'))),
 			protein: parseFloat($("#protein").jqxNumberInput('decimal')),
 			dissolved_protein: parseFloat($("#dissolved_protein").jqxNumberInput('decimal')),
 			max_in_batch: parseFloat($("#max_in_batch").jqxNumberInput('decimal')),

mercurial