Added new fields in inventory_yeasts for Kveik and extra generic flags. Currently these fields do nothing but adding extra information in the database. Added Brett, Kveik and Hybrid yeast types.

Sun, 13 Oct 2019 22:02:49 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 13 Oct 2019 22:02:49 +0200
changeset 512
4451af8b6295
parent 511
f51630063f00
child 513
217ba4596c4d

Added new fields in inventory_yeasts for Kveik and extra generic flags. Currently these fields do nothing but adding extra information in the database. Added Brett, Kveik and Hybrid yeast types.

README.design file | annotate | diff | comparison | revisions
www/includes/db_inventory_yeasts.php file | annotate | diff | comparison | revisions
www/inv_yeasts.php file | annotate | diff | comparison | revisions
www/js/global-min.js file | annotate | diff | comparison | revisions
www/js/global.js file | annotate | diff | comparison | revisions
www/js/inv_yeasts-min.js file | annotate | diff | comparison | revisions
www/js/inv_yeasts.js file | annotate | diff | comparison | revisions
--- a/README.design	Sat Oct 12 14:00:33 2019 +0200
+++ b/README.design	Sun Oct 13 22:02:49 2019 +0200
@@ -31,6 +31,10 @@
   zymocide+ (K1,K2,K28 or Klus)  (killer yeast gen) (Alleen in wijngist?)
   sta1 (diastatic)
   beta glucosidase
+  top/bottom harvest (Kveik)
+  harvest time (hours)
+  bacteria (Kveik)
+Pitch temperature.
 Gist typen: Brettanomyces, Wild yeast, Kveik, Spontaneous.
 Gist klasse: N/A, Saccharomyces cerevisiae, Saccharomyces pastorianus, Saccharomyces Bayanus, 
 
@@ -43,7 +47,10 @@
   pofpos	boolean
   zymocide	int4		none, K1, K2, K28, Klus
   sta1		boolean
-
+  harvest_top   boolean
+  harvest_time  int16
+  pitchtemp     float
+  bacteria      boolean
 
 
 Toevoegen Barrel/Oak aging vergisting stap. Wort souring stap.
--- a/www/includes/db_inventory_yeasts.php	Sat Oct 12 14:00:33 2019 +0200
+++ b/www/includes/db_inventory_yeasts.php	Sun Oct 13 22:02:49 2019 +0200
@@ -33,6 +33,13 @@
 	$sql .= "', max_reuse='" . $_POST['max_reuse'];
 	$sql .= "', cells='" . floatval($_POST['cells']) * 1000000000.0;
 	$sql .= "', tolerance='" . $_POST['tolerance'];
+	($_POST['sta1'] == 'true') ? $sql .= "', sta1='1" : $sql .= "', sta1='0";
+	($_POST['bacteria'] == 'true') ? $sql .= "', bacteria='1" : $sql .= "', bacteria='0";
+	($_POST['harvest_top'] == 'true') ? $sql .= "', harvest_top='1" : $sql .= "', harvest_top='0";
+	$sql .= "', harvest_time='" . $_POST['harvest_time'];
+	$sql .= "', pitch_temperature='" . floatval($_POST['pitch_temperature']);
+	($_POST['pofpos'] == 'true') ? $sql .= "', pofpos='1" : $sql .= "', pofpos='0";
+	$sql .= "', zymocide='" . $_POST['zymocide'];
 	$sql .= "', inventory='" . $_POST['inventory'];
 	$sql .= "', cost='" . $_POST['cost'] . "'";
 	if ($_POST['production_date'] == '')
@@ -99,7 +106,14 @@
 			'production_date' => $row['production_date'],
 			'tht_date' => $row['tht_date'],
 			'cells' => floatval($row['cells']) / 1000000000.0,
-			'tolerance' => $row['tolerance']
+			'tolerance' => $row['tolerance'],
+			'sta1' => $row['sta1'],
+			'bacteria' => $row['bacteria'],
+			'harvest_top' => $row['harvest_top'],
+			'harvest_time' => $row['harvest_time'],
+			'pitch_temperature' => floatval($row['pitch_temperature']),
+			'pofpos' => $row['pofpos'],
+			'zymocide' => $row['zymocide']
 		);
 	}
 	header("Content-type: application/json");
--- a/www/inv_yeasts.php	Sat Oct 12 14:00:33 2019 +0200
+++ b/www/inv_yeasts.php	Sun Oct 13 22:02:49 2019 +0200
@@ -16,39 +16,41 @@
      <table style="width: 100%;">
       <tr>
        <td align="right" style="vertical-align: top;">Gist naam:</td>
-       <td align="left" colspan="3" style="vertical-align: top;"><input id="name" /></td>
+       <td align="left" colspan="5" style="vertical-align: top;"><input id="name" /></td>
       </tr>
       <tr>
        <td align="right" style="vertical-align: top;">Productcode:</td>
-       <td align="left" colspan="3" style="vertical-align: top;"><input id="product_id" /></td>
+       <td align="left" colspan="5" style="vertical-align: top;"><input id="product_id" /></td>
       </tr>
       <tr>
        <td align="right" style="vertical-align: top;">Opmerkingen:</td>
-       <td align="left" colspan="3"><textarea id="notes"></textarea></td>
+       <td align="left" colspan="5"><textarea id="notes"></textarea></td>
       </tr>
       <tr>
        <td align="right" style="vertical-align: top;">Type:</td>
        <td align="left"><div id="type"></div></td>
+       <td></td><td></td>
        <td align="right" style="vertical-align: top;">Minimum temperatuur &deg;C:</td>
        <td align="left"><div id="min_temperature"></div></td>
       </tr>
       <tr>
        <td align="right" style="vertical-align: top;">Gist vorm:</td>
        <td align="left"><div id="form"></div></td>
+       <td></td><td></td>
        <td align="right" style="vertical-align: top;">Maximum temperatuur &deg;C:</td>
        <td align="left"><div id="max_temperature"></div></td>
       </tr>
       <tr>
        <td align="right" style="vertical-align: top;">Laboratorium:</td>
-       <td align="left" style="vertical-align: top;"><input id="laboratory" /></td>
+       <td align="left" colspan="3" style="vertical-align: top;"><input id="laboratory" /></td>
        <td align="right" style="vertical-align: top;">Vergistingsgraad %:</td>
        <td align="left"><div id="attenuation"></div></td>
       </tr>
       <tr>
        <td rowspan="4" align="right" style="vertical-align: top;">Geschikt voor:</td>
-       <td rowspan="4" align="left"><textarea id="best_for"></textarea></td>
-       <td align="right" style="vertical-align: top;">Maximum Hergebruik:</td>
-       <td align="left"><div id="max_reuse"></div></td>
+       <td rowspan="4" align="left" colspan="3"><textarea id="best_for"></textarea></td>
+       <td align="right" style="vertical-align: top;">Alcohol tolerantie:</td>
+       <td align="left"><div id="tolerance"></div></td>
       </tr>
       <tr>
        <td align="right" style="vertical-align: top;">Flocculatie:</td>
@@ -59,31 +61,53 @@
        <td align="left"><div id="cells"></div></td>
       </tr>
       <tr>
-       <td align="right" style="vertical-align: top;"><div id="pmpt_cells">Alcohol tolerantie:</div></td>
-       <td align="left"><div id="tolerance"></div></td>
+       <td align="right" style="vertical-align: top;">Maximum Hergebruik:</td>
+       <td align="left"><div id="max_reuse"></div></td>
+      </tr>
+      <tr>
+       <td align="right" style="vertical-align: top;">POF+:</td>
+       <td align="left"><div id="pofpos"></div></td>
+       <td align="right" style="vertical-align: top;">Zymocide+:</td>
+       <td align="left"><div id="zymocide"></div></td>
+       <td align="right" style="vertical-align: top;">Ent temperatuur &deg;C:</td>
+       <td align="left"><div id="pitch_temperature"></div></td>
       </tr>
       <tr>
-       <td colspan="4"><hr></td>
+       <td align="right" style="vertical-align: top;">STA1 (diastatic) gen:</td>
+       <td align="left"><div id="sta1"></div></td>
+       <td align="right" style="vertical-align: top;">Oogst van boven:</td>
+       <td align="left"><div id="harvest_top"></div></td>
+       <td align="right" style="vertical-align: top;">Oogst tijd uren:</td>
+       <td align="left"><div id="harvest_time"></div></td>
+      </tr>
+      <tr>
+       <td></td><td></td>
+       <td></td><td></td>
+       <td align="right" style="vertical-align: top;">Bevat bacteri&euml;n:</td>
+       <td align="left"><div id="bacteria"></div></td>
+      </tr>
+      <tr>
+       <td colspan="6"><hr></td>
       </tr>
       <tr>
        <td align="right" style="vertical-align: top;"><div id="pmpt_inventory">Voorraad xx:</div></td>
        <td align="left"><div id="inventory"></div></td>
+       <td></td><td></td>
        <td align="right" style="vertical-align: top;">Productie datum:</td>
        <td align="left" style="vertical-align: top;"><div id="production_date"></div></td>
       </tr>
       <tr>
        <td align="right" style="vertical-align: top;"><div id="pmpt_cost">Prijs per xx:</div></td>
        <td align="left"><div id="cost"></div></td>
+       <td align="right" style="vertical-align: top;">Waarde voorraad &euro;:</td>
+       <td align="left"><div id="totval"></div></td>
        <td align="right" style="vertical-align: top;">THT datum:</td>
        <td align="left" style="vertical-align: top;"><div id="tht_date"></div></td>
       </tr>
       <tr>
-       <td align="right" style="vertical-align: top;">Waarde voorraad &euro;:</td>
-       <td align="left" colspan="3"><div id="totval"></div></td>
-      </tr>
-      <tr>
        <td style="padding-top: 20px;" align="right"><input type="button" id="Delete" value="Verwijder" /></td>
        <td style="padding-top: 20px;" align="left"><input type="button" id="Clone" value="Kloon" /></td>
+       <td></td><td></td>
        <td align="right"></td>
        <td style="padding-top: 20px;" align="left"><input style="margin-right: 5px;" type="button" id="Save" value="Sla op" /><input id="Cancel" type="button" value="Annuleer" /></td>
       </tr>
--- a/www/js/global-min.js	Sat Oct 12 14:00:33 2019 +0200
+++ b/www/js/global-min.js	Sun Oct 13 22:02:49 2019 +0200
@@ -1,1 +1,1 @@
-var StageData=[{id:0,en:"Plan",nl:"Plan"},{id:1,en:"Wait",nl:"Wacht"},{id:2,en:"Brew",nl:"Brouwen"},{id:3,en:"Primary",nl:"Hoofdgisting"},{id:4,en:"Secondary",nl:"Nagisting"},{id:5,en:"Tertiary",nl:"Lagering"},{id:6,en:"Package",nl:"Afvullen"},{id:7,en:"Carbonation",nl:"Hergisten"},{id:8,en:"Mature",nl:"Rijpen"},{id:9,en:"Taste",nl:"Proeven"},{id:10,en:"Ready",nl:"Gereed"},{id:11,en:"Closed",nl:"Afgesloten"}],StageSource={localdata:StageData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},StageAdapter=new $.jqx.dataAdapter(StageSource),SplitData=[{id:0,en:"Not divided",nl:"Niet gesplitst",ok:100},{id:1,en:"After mash",nl:"Na maischen",ok:2},{id:2,en:"After boil",nl:"Na koken",ok:2},{id:3,en:"After cooling",nl:"Na koelen",ok:2},{id:4,en:"After primary",nl:"Na hoofdgisting",ok:3},{id:5,en:"After secondary",nl:"Na nagisting",ok:4},{id:6,en:"After tertiary",nl:"Na lageren",ok:5}],SplitSource={localdata:SplitData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"ok"}]},SplitAdapter=new $.jqx.dataAdapter(SplitSource),MaterialData=[{id:0,en:"Stainless Steel",nl:"RVS",sh:0.11},{id:1,en:"Aluminium",nl:"Aluminium",sh:0.22},{id:2,en:"Plastics",nl:"Kunststof",sh:0.46},{id:3,en:"Copper",nl:"Koper",sh:0.092}],MaterialSource={localdata:MaterialData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"sh"}]},MaterialAdapter=new $.jqx.dataAdapter(MaterialSource),FermentableTypeData=[{id:0,en:"Grain",nl:"Mout"},{id:1,en:"Sugar",nl:"Suiker"},{id:2,en:"Extract",nl:"Vloeibaar extract"},{id:3,en:"Dry extract",nl:"Droog extract"},{id:4,en:"Adjunct",nl:"Ongemout graan"}],FermentableTypeSource={localdata:FermentableTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},FermentableTypeAdapter=new $.jqx.dataAdapter(FermentableTypeSource),GrainTypeData=[{id:0,en:"Base",nl:"Basismout"},{id:1,en:"Roast",nl:"Geroosterde mout"},{id:2,en:"Crystal",nl:"Cara- of crystalmout"},{id:3,en:"Kilned",nl:"Geëeste mout"},{id:4,en:"Sour malt",nl:"Zuurmout"},{id:5,en:"Special",nl:"Speciale mout"},{id:6,en:"No malt",nl:"Geen mout"}],GrainTypeSource={localdata:GrainTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},GrainTypeAdapter=new $.jqx.dataAdapter(GrainTypeSource),AddedData=[{id:0,en:"Mash",nl:"Maischen"},{id:1,en:"Boil",nl:"Koken"},{id:2,en:"Fermentation",nl:"Vergisten"},{id:3,en:"Lagering",nl:"Nagisten/lageren"},{id:4,en:"Bottle",nl:"Bottelen"},{id:5,en:"Kegs",nl:"Fust"}],AddedSource={localdata:AddedData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},AddedAdapter=new $.jqx.dataAdapter(AddedSource),HopTypeData=[{id:0,en:"Bittering",nl:"Bitterhop"},{id:1,en:"Aroma",nl:"Aromahop"},{id:2,en:"Both",nl:"Beide"}],HopTypeSource={localdata:HopTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},HopTypeAdapter=new $.jqx.dataAdapter(HopTypeSource),HopFormData=[{id:0,en:"Pellet",nl:"Pellets"},{id:1,en:"Plug",nl:"Plugs"},{id:2,en:"Leaf",nl:"Bloemen"},{id:3,en:"Leaf wet",nl:"Hop nat"},{id:4,en:"Cryo",nl:"Cryo"}],HopFormSource={localdata:HopFormData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},HopFormAdapter=new $.jqx.dataAdapter(HopFormSource),HopUseData=[{id:0,en:"Mash",nl:"Maischhop"},{id:1,en:"First wort",nl:"First wort hop"},{id:2,en:"Boil",nl:"Koken"},{id:3,en:"Aroma",nl:"Vlamuit"},{id:4,en:"Whirlpool",nl:"Whirlpool"},{id:5,en:"Dry hop",nl:"Koudhop"}],HopUseSource={localdata:HopUseData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},HopUseAdapter=new $.jqx.dataAdapter(HopUseSource),YeastTypeData=[{id:0,en:"Lager",nl:"Ondergist"},{id:1,en:"Ale",nl:"Bovengist"},{id:2,en:"Wheat",nl:"Tarwegist"},{id:3,en:"Wine",nl:"Wijngist"},{id:4,en:"Champagne",nl:"Champagnegist"}],YeastTypeSource={localdata:YeastTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},YeastTypeAdapter=new $.jqx.dataAdapter(YeastTypeSource),YeastFormData=[{id:0,en:"Liquid",nl:"Vloeibaar",cells:100000000000},{id:1,en:"Dry",nl:"Korrel",cells:15000000000},{id:2,en:"Slant",nl:"Schuine buis",cells:1700000000},{id:3,en:"Culture",nl:"Slurry",cells:1700000000},{id:4,en:"Frozen",nl:"Ingevroren",cells:1700000000},{id:5,en:"Bottle",nl:"Depot",cells:1700000000}],YeastFormSource={localdata:YeastFormData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"cells"}]},YeastFormAdapter=new $.jqx.dataAdapter(YeastFormSource),YeastUseData=[{id:0,en:"Primary",nl:"Hoofdgisting"},{id:1,en:"Secondary",nl:"Nagisting"},{id:2,en:"Tertiary",nl:"Lagering"},{id:3,en:"Bottle",nl:"Bottelen"}],YeastUseSource={localdata:YeastUseData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"cells"}]},YeastUseAdapter=new $.jqx.dataAdapter(YeastUseSource),FlocculationData=[{id:0,en:"Low",nl:"Laag"},{id:1,en:"Medium",nl:"Medium"},{id:2,en:"High",nl:"Hoog"},{id:3,en:"Very high",nl:"Zeer hoog"}],FlocculationSource={localdata:FlocculationData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},FlocculationAdapter=new $.jqx.dataAdapter(FlocculationSource),StarterTypeData=[{id:0,en:"Stirred",nl:"Geroerd"},{id:1,en:"Shaken",nl:"Geschud"},{id:2,en:"Simple",nl:"Simpel"}],StarterTypeSource={localdata:StarterTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},StarterTypeAdapter=new $.jqx.dataAdapter(StarterTypeSource),MiscTypeData=[{id:0,en:"Spice",nl:"Specerij"},{id:1,en:"Herb",nl:"Kruid"},{id:2,en:"Flavor",nl:"Smaakstof"},{id:3,en:"Fining",nl:"Klaringsmiddel"},{id:4,en:"Water agent",nl:"Brouwzout"},{id:5,en:"Yeast nutrient",nl:"Gistvoeding"},{id:6,en:"Other",nl:"Overig"}],MiscTypeSource={localdata:MiscTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},MiscTypeAdapter=new $.jqx.dataAdapter(MiscTypeSource),MiscUseData=[{id:0,en:"Starter",nl:"Starter"},{id:1,en:"Mash",nl:"Maischen"},{id:2,en:"Boil",nl:"Koken"},{id:3,en:"Primary",nl:"Hoofdvergisting"},{id:4,en:"Secondary",nl:"Nagisting/lagering"},{id:5,en:"Bottling",nl:"Bottelen"}],MiscUseSource={localdata:MiscUseData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},MiscUseAdapter=new $.jqx.dataAdapter(MiscUseSource),StyleTypeData=[{id:0,en:"Lager",nl:"Ondergistend bier"},{id:1,en:"Ale",nl:"Bovengistend bier"},{id:2,en:"Mead",nl:"Mede"},{id:3,en:"Wheat",nl:"Tarwebier"},{id:4,en:"Mixed",nl:"Gemengd"},{id:5,en:"Cider",nl:"Cider"}],StyleTypeSource={localdata:StyleTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},StyleTypeAdapter=new $.jqx.dataAdapter(StyleTypeSource),MashStepTypeData=[{id:0,en:"Infusion",nl:"Infusie"},{id:1,en:"Temperature",nl:"Verwarming"},{id:2,en:"Decoction",nl:"Decoctie"}],MashStepTypeSource={localdata:MashStepTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},MashStepTypeAdapter=new $.jqx.dataAdapter(MashStepTypeSource),RecipeTypeData=[{id:0,en:"Extract",nl:"Extract"},{id:1,en:"Partial Mash",nl:"Deelmaisch"},{id:2,en:"All Grain",nl:"Mout"}],RecipeTypeSource={localdata:RecipeTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},RecipeTypeAdapter=new $.jqx.dataAdapter(RecipeTypeSource),IBUmethodData=[{id:0,en:"Tinseth",nl:"Tinseth"},{id:1,en:"Rager",nl:"Rager"},{id:2,en:"Daniels",nl:"Daniels"}],IBUmethodSource={localdata:IBUmethodData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},IBUmethodAdapter=new $.jqx.dataAdapter(IBUmethodSource),ColorMethodData=[{id:0,en:"Morey",nl:"Morey"},{id:1,en:"Mosher",nl:"Mosher"},{id:2,en:"Daniels",nl:"Daniels"},{id:3,en:"Halberstadt",nl:"Halberstadt"},{id:4,en:"Naudts",nl:"Naudts"}],ColorMethodSource={localdata:ColorMethodData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},ColorMethodAdapter=new $.jqx.dataAdapter(ColorMethodSource),CoolingTypeData=[{id:0,en:"-",nl:"-"},{id:1,en:"Emersion chiller",nl:"Dompelkoeler"},{id:2,en:"Counterflow chiller",nl:"Tegenstroomkoeler"},{id:3,en:"Au bain marie",nl:"Au bain marie"},{id:4,en:"Natural",nl:"Laten afkoelen"}],CoolingTypeSource={localdata:CoolingTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},CoolingTypeAdapter=new $.jqx.dataAdapter(CoolingTypeSource),AerationTypeData=[{id:0,en:"None",nl:"Geen"},{id:1,en:"Air",nl:"Lucht"},{id:2,en:"Oxygen",nl:"Zuurstof"}],AerationTypeSource={localdata:AerationTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},AerationTypeAdapter=new $.jqx.dataAdapter(AerationTypeSource),AcidTypeData=[{id:0,en:"Lactic",nl:"Melkzuur"},{id:1,en:"Hydrochloric",nl:"Zoutzuur"},{id:2,en:"Phosphoric",nl:"Fosforzuur"},{id:3,en:"Sulfuric",nl:"Zwavelzuur"}],AcidTypeSource={localdata:AcidTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},AcidTypeAdapter=new $.jqx.dataAdapter(AcidTypeSource),BaseTypeData=[{id:0,en:"Sodiumbicarbonate",nl:"NaHCO3"},{id:1,en:"Sodiumcarbonate",nl:"Na2CO3"},{id:2,en:"Calciumcarbonate",nl:"CaCO3"},{id:3,en:"Calciumhydroxide",nl:"Ca(OH)2"}],BaseTypeSource={localdata:BaseTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},BaseTypeAdapter=new $.jqx.dataAdapter(BaseTypeSource),SpargeSourceData=[{id:0,en:"Source 1",nl:"Bron 1"},{id:1,en:"Source 2",nl:"Bron 2"},{id:2,en:"Mixed",nl:"Gemengd"}],SpargeSourceSource={localdata:SpargeSourceData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},SpargeSourceAdapter=new $.jqx.dataAdapter(SpargeSourceSource),Show1wat={inputMode:"simple",theme:theme,width:74,height:23,decimalDigits:1,readOnly:true},Show2wat={inputMode:"simple",theme:theme,width:74,height:23,decimalDigits:2,readOnly:true},Show3wat={inputMode:"simple",theme:theme,width:74,height:23,decimalDigits:3,readOnly:true},Smal0dec={inputMode:"simple",theme:theme,width:50,height:23,decimalDigits:0,readOnly:true},Smal1dec={inputMode:"simple",theme:theme,width:50,height:23,decimalDigits:1,readOnly:true},Show0dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:0},Show1dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:1},Show2dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:2},Show3dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:3},SGopts={inputMode:"simple",theme:theme,width:110,height:23,min:0.99,max:1.199,decimalDigits:3,spinButtons:true},Spin1dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:1,spinButtons:true},Spin2dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:2,spinButtons:true},Spin3dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:3,spinButtons:true},SpinpH={inputMode:"simple",theme:theme,width:110,height:23,min:1,max:14,decimalDigits:1,spinButtons:true},Spin2pH={inputMode:"simple",theme:theme,width:110,height:23,min:1,max:14,decimalDigits:2,spinButtons:true},YeastT={inputMode:"simple",theme:theme,width:110,height:23,min:0,max:50,decimalDigits:1,spinButtons:true},PosInt={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:0,spinButtons:true},Perc1dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,max:100,decimalDigits:1,spinButtons:true},Perc0={inputMode:"simple",theme:theme,width:110,height:23,min:0,max:100,decimalDigits:0,spinButtons:true},Dateopts={theme:theme,width:150,height:23,allowNullDate:true,todayString:"Vandaag",clearString:"Wissen",showFooter:true,formatString:"yyyy-MM-dd",enableBrowserBoundsDetection:true},DateTimeopts={theme:theme,width:230,height:23,allowNullDate:true,todayString:"Vandaag",clearString:"Wissen",showFooter:true,formatString:"yyyy-MM-dd HH:mm:ss",enableBrowserBoundsDetection:true,showTimeButton:true},sugardensity=1.611,stylesSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"category",type:"string"},{name:"category_number",type:"number"},{name:"style_letter",type:"string"},{name:"style_guide",type:"string"},{name:"type",type:"int"},{name:"og_min",type:"float"},{name:"og_max",type:"float"},{name:"fg_min",type:"float"},{name:"fg_max",type:"float"},{name:"ibu_min",type:"float"},{name:"ibu_max",type:"float"},{name:"color_min",type:"float"},{name:"color_max",type:"float"},{name:"carb_min",type:"float"},{name:"carb_max",type:"float"},{name:"abv_min",type:"float"},{name:"abv_max",type:"float"},{name:"notes",type:"string"},{name:"profile",type:"string"},{name:"ingredients",type:"string"},{name:"examples",type:"string"}],url:"includes/db_profile_styles.php"},styleslist=new $.jqx.dataAdapter(stylesSource),equipmentSource={datatype:"json",datafields:[{name:"name",type:"string"},{name:"boil_size",type:"float"},{name:"batch_size",type:"float"},{name:"tun_volume",type:"float"},{name:"tun_weight",type:"float"},{name:"tun_specific_heat",type:"float"},{name:"tun_material",type:"int"},{name:"tun_height",type:"float"},{name:"top_up_water",type:"float"},{name:"trub_chiller_loss",type:"float"},{name:"evap_rate",type:"float"},{name:"boil_time",type:"float"},{name:"calc_boil_volume",type:"int"},{name:"top_up_kettle",type:"float"},{name:"hop_utilization",type:"float"},{name:"notes",type:"string"},{name:"lauter_volume",type:"float"},{name:"lauter_height",type:"float"},{name:"lauter_deadspace",type:"float"},{name:"kettle_volume",type:"float"},{name:"kettle_height",type:"float"},{name:"mash_volume",type:"float"},{name:"mash_max",type:"float"},{name:"efficiency",type:"float"}],url:"includes/db_inventory_equipments.php"},equipmentlist=new $.jqx.dataAdapter(equipmentSource),fermentableInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"int"},{name:"yield",type:"float"},{name:"color",type:"float"},{name:"add_after_boil",type:"int"},{name:"origin",type:"string"},{name:"supplier",type:"string"},{name:"coarse_fine_diff",type:"float"},{name:"moisture",type:"float"},{name:"diastatic_power",type:"float"},{name:"protein",type:"float"},{name:"dissolved_protein",type:"float"},{name:"max_in_batch",type:"float"},{name:"recommend_mash",type:"int"},{name:"graintype",type:"int"},{name:"di_ph",type:"float"},{name:"acid_to_ph_57",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"}],url:"getfermentablesources.php"},fermentableinstock=false,fermentablelist=new $.jqx.dataAdapter(fermentableInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.inventory||!fermentableinstock){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),fermentablesugars=new $.jqx.dataAdapter(fermentableInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.type==1||d.type==3){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),hopInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"origin",type:"string"},{name:"type",type:"int"},{name:"alpha",type:"float"},{name:"beta",type:"float"},{name:"humulene",type:"float"},{name:"caryophyllene",type:"float"},{name:"cohumulone",type:"float"},{name:"myrcene",type:"float"},{name:"hsi",type:"float"},{name:"useat",type:"int"},{name:"form",type:"int"},{name:"total_oil",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"}],url:"gethopsources.php"},hopinstock=false,hoplist=new $.jqx.dataAdapter(hopInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.inventory||!hopinstock){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),miscInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"int"},{name:"use_use",type:"int"},{name:"amount_is_weight",type:"int"},{name:"time",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"}],url:"getmiscsources.php"},miscinstock=false,misclist=new $.jqx.dataAdapter(miscInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.inventory||!miscinstock){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),yeastInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"int"},{name:"form",type:"int"},{name:"laboratory",type:"string"},{name:"product_id",type:"string"},{name:"min_temperature",type:"float"},{name:"max_temperature",type:"float"},{name:"flocculation",type:"int"},{name:"attenuation",type:"float"},{name:"cells",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"},{name:"tolerance",type:"float"}],url:"getyeastsources.php"},yeastinstock=false,yeastlist=new $.jqx.dataAdapter(yeastInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.inventory||!yeastinstock){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),waterInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"unlimited_stock",type:"int"},{name:"calcium",type:"float"},{name:"sulfate",type:"float"},{name:"chloride",type:"float"},{name:"sodium",type:"float"},{name:"magnesium",type:"float"},{name:"ph",type:"float"},{name:"total_alkalinity",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"},],url:"getwatersources.php"},waterinstock=false,waterlist=new $.jqx.dataAdapter(waterInvSource,{beforeLoadComplete:function(a){var c,b,d;c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.inventory||d.unlimited_stock||!waterinstock){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),waterProfileSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"calcium",type:"float"},{name:"bicarbonate",type:"float"},{name:"sulfate",type:"float"},{name:"chloride",type:"float"},{name:"sodium",type:"float"},{name:"magnesium",type:"float"},{name:"ph",type:"float"},{name:"total_alkalinity",type:"float"},],url:"includes/db_profile_water.php"},waterprofiles=new $.jqx.dataAdapter(waterProfileSource),mashProfileSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"steps",type:"array"}],url:"includes/db_profile_mash.php"},mashlist=new $.jqx.dataAdapter(mashProfileSource),K1s=0.384,K1a=-0.177,K1e=0.241,K1g=0.247,Ks=0.1415,Ka1=0.058,Ka2=0.078,Ke=0.174,Kg=0.109;function A(e,d,b,g,f){var c,a;c=d*1000;a=e/c+(b/c)*Ka1/Ks+(b/c)*(b/c)*Ka2/Ks+g/c*Ke/Ks+f/c*Kg/Ks;console.log("A("+e+","+d+","+b+","+g+","+f+"):"+a);return a}function B(d,c,a,f,e){var b,g;b=c*1000;g=d/b+(a/b)*K1a/K1s+f/b*K1e/K1s+e/b*K1g/K1s;console.log("B("+d+","+c+","+a+","+f+","+e+"):"+g);return g}$(document).ready(function(){$("#jqxMenu").jqxMenu({width:1280,height:"30px",autoOpen:false,clickToOpen:true,theme:theme});$("#jqxWidget").css("visibility","visible")});function Round(e,c){for(var b=0,a=1;b<c;b++,a*=10){}return Math.round(e*a)/a}function ebc_to_srm(a){var b=-1.32303e-12*Math.pow(a,4)-2.91515e-9*Math.pow(a,3)+0.00000818515*Math.pow(a,2)+0.372038*a+0.596351;if(b<0){b=0}return b}function srm_to_ebc(b){var a=Math.round(1.76506e-10*Math.pow(b,4)+1.54529e-7*Math.pow(b,3)-0.000159428*Math.pow(b,2)+2.68837*b-1.6004);if(a<0){a=0}return a}function get_kt(a){var b=1;if(a<3){b=3.5}else{if(a<6){b=3}else{if(a<8){b=2.75}else{if(a<10){b=2.5}else{if(a<20){b=1.8}else{if(a<30){b=1.6}else{if(a<60){b=1.3}else{if(a<100){b=1.2}else{if(a<300){b=1.1}}}}}}}}}return b}function abvol(c,a){if(((c-a)<0)||(a<0.9)){return 0}var b=c*3157*Math.pow(10,-5)+9.716*Math.pow(10,-2);return(c*1000-a*1000)*b}function kw_to_srm(a,b){if(a==0){return 1.4922*Math.pow(b,0.6859)}if(a==1){return 0.3*b+4.7}if(a==2){return 0.2*b+8.4}return 0}function kw_to_ebc(a,b){return srm_to_ebc(kw_to_srm(a,b))}function toIBU(a,h,r,q,s,e,m,c){var g,n,f,o,i,j=1,k=1,v=0,b,u,l,d,t,p;g=parseFloat(r);n=parseFloat(q);f=parseFloat(m)/100;o=parseFloat(s)*1000;i=parseFloat(e);if((a==3)||(a==4)||(a==5)){j=0}else{if(a==0){j+=my_factor_mashhop/100}else{if(a==1){j+=my_factor_fwh/100}}}if(h==0){k+=my_factor_pellet/100}else{if(h==1){k+=my_factor_plug/100}else{if(h==3){k+=my_factor_wethop/100}else{if(h==4){k+=my_factor_cryohop/100}}}}if(c==0){l=(f*o*1000)/n;d=1.65*Math.pow(0.000125,g-1);t=((1-Math.exp(-0.04*i))/4.15);p=d*t;v=Round(p*l*j*k,1)}if(c==2){if(h==2){b=-(0.0041*i*i)+(0.6162*i)+1.5779}else{b=-(0.0051*i*i)+(0.7835*i)+1.9348}if(g<1050){u=0}else{u=(g-1050)/200}v=Round(j*((o*(f*100)*b*0.1)/(n*(1+u))),1)}if(c==1){b=j*18.11+13.86*Math.tanh((i*31.32)/18.27);if(g<1050){u=0}else{u=(g-1050)/200}v=Round((o*(f*100)*b*0.1)/(n*(1+u)),1)}return v}function ebc_to_color(a){return srm_to_color(ebc_to_srm(a))}function srm_to_color(g){var c,e,d,f,b,a;c=Math.round(g*10);if(c<0){c=0}if(c>299){c=299}e=[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,249,248,247,246,245,244,243,242,241,240,239,238,237,236,235,234,233,232,231,230,229,228,227,226,225,224,223,222,221,220,219,218,217,216,215,214,213,212,211,210,209,208,207,206,205,204,203,202,201,200,200,199,199,198,198,197,197,196,196,195,195,194,194,193,193,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,191,190,189,188,187,186,185,184,183,182,181,180,179,178,177,175,174,172,171,169,168,167,195,164,162,161,159,158,157,155,154,152,151,149,148,147,145,144,142,141,139,138,137,135,134,132,131,129,128,127,125,124,122,121,119,118,117,115,114,112,111,109,108,107,105,104,102,101,99,98,97,95,94,92,91,89,88,87,85,84,82,81,79,78,77,75,74,72,71,69,68,67,65,64,62,61,59,58,57,55,54,52,51,49,48,47,45,44,43,41,39,38,37,37,36,36,35,35,34,34,33,33,32,32,31,31,30,30,29,29,28,28,27,27,26,26,25,25,24,24,23,23,22,22,21,21,20,20,19,19,18,18,17,17,16,16,15,15,14,14,13,13,12,12,11,11,10,10,9,9,8,8];d=[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,249,248,247,246,245,244,242,240,238,236,234,232,230,228,226,224,222,220,218,216,214,212,210,208,206,204,202,200,198,196,194,192,190,188,186,184,182,180,178,176,174,172,170,168,166,164,162,160,158,156,154,152,150,148,146,144,142,141,140,139,139,138,137,136,136,135,134,133,133,132,131,130,130,129,128,127,127,126,125,124,124,123,122,121,121,120,119,118,118,117,116,115,115,114,113,112,112,111,110,109,109,108,107,106,106,105,104,103,103,102,101,100,100,99,98,97,97,96,95,94,94,93,92,91,91,90,89,88,88,87,86,85,85,84,83,82,82,81,80,79,78,77,76,75,75,74,73,72,72,71,70,69,69,68,67,66,66,65,64,63,63,62,61,60,60,59,58,57,57,56,55,54,54,53,52,51,51,50,49,48,48,47,46,45,45,44,43,42,42,41,40,39,39,38,37,36,36,35,34,33,33,32,31,30,30,29,28,27,27,26,25,24,24,23,22,22,22,21,21,21,20,20,20,19,19,19,18,18,18,17,17,17,16,16,16,15,15,15,14,14,14,13,13,13,12,12,12,11,11,11,10,10,10,9,9,9,8,8,8,7,7,7,6,6,6,5,5,5,4,4,4,3,3,3];f=[210,204,199,193,188,182,177,171,166,160,155,149,144,138,133,127,122,116,111,105,100,94,89,83,78,72,67,61,56,50,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,55,55,55,55,54,54,54,54,53,53,53,53,52,52,52,52,51,51,51,51,50,50,50,50,49,49,48,47,47,46,45,45,44,43,43,42,41,41,40,39,39,38,37,37,36,35,34,33,32,31,29,28,27,26,25,24,23,21,20,19,18,17,16,15,13,12,11,10,9,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,21,21,21,20,20,20,19,19,19,18,18,18,17,17,17,17,16,16,15,15,15,14,14,14,13,13,13,12,12,12,11,11,11,10,10,10,9,9,9,8,8,8,7,7,7,6,6,6,5,5,5,4,4,4,3,3,3,2,2,2];b=e[c]*65536+d[c]*256+f[c];a=b.toString(16).toUpperCase();if(a.length<6){a="0"+a}return"#"+a}function sg_to_plato(a){return((135.997*a-630.272)*a+1111.14)*a-616.868}function plato_to_sg(a){return 1+(a/(258.6-((a/258.2)*227.1)))}function brix_to_sg(a){if(my_brix_correction>0){return plato_to_sg(a/my_brix_correction)}else{return plato_to_sg(a)}}function sg_to_brix(a){return sg_to_plato(a)*my_brix_correction}function estimate_sg(c,e){var a,d,b;a=100*c/e;d=plato_to_sg(a);for(b=0;b<20;b++){if(d>0){a=100*c/(e*d)}d=plato_to_sg(a)}return Round(d,4)}function estimate_fg(f,i,e,h,c,g,j){var b,d,a;if(f>40){f=0}if(i>50){i=0}if((e>0)&&(h>0)){b=e;if(b<2){b=2}if(b>5.5){b=5.5}if(c<60){c=60}if(c>72){c=72}}else{b=3.5;c=67;h=75}if(g<30){g=77}d=0.00825*g+0.00817*b-0.00684*c+0.00026*h-0.00356*i+0.00553*f+0.547;a=Round(1+(1-d)*(j-1),4);return a}function CalcFrac(f,e,d,b){var g,a,i,k,h,c,j;g=Math.pow(10,f-e);a=Math.pow(10,f-d);i=Math.pow(10,f-b);k=1/(1+g+g*a+g*a*i);h=g*k;c=g*a*k;j=g*a*i*k;return h+2*c+3*j}function lintner_to_kolbach(a){return(3.5*a)-16}function kolbach_to_lintner(a){return(a+16)/3.5};
\ No newline at end of file
+var StageData=[{id:0,en:"Plan",nl:"Plan"},{id:1,en:"Wait",nl:"Wacht"},{id:2,en:"Brew",nl:"Brouwen"},{id:3,en:"Primary",nl:"Hoofdgisting"},{id:4,en:"Secondary",nl:"Nagisting"},{id:5,en:"Tertiary",nl:"Lagering"},{id:6,en:"Package",nl:"Afvullen"},{id:7,en:"Carbonation",nl:"Hergisten"},{id:8,en:"Mature",nl:"Rijpen"},{id:9,en:"Taste",nl:"Proeven"},{id:10,en:"Ready",nl:"Gereed"},{id:11,en:"Closed",nl:"Afgesloten"}],StageSource={localdata:StageData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},StageAdapter=new $.jqx.dataAdapter(StageSource),SplitData=[{id:0,en:"Not divided",nl:"Niet gesplitst",ok:100},{id:1,en:"After mash",nl:"Na maischen",ok:2},{id:2,en:"After boil",nl:"Na koken",ok:2},{id:3,en:"After cooling",nl:"Na koelen",ok:2},{id:4,en:"After primary",nl:"Na hoofdgisting",ok:3},{id:5,en:"After secondary",nl:"Na nagisting",ok:4},{id:6,en:"After tertiary",nl:"Na lageren",ok:5}],SplitSource={localdata:SplitData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"ok"}]},SplitAdapter=new $.jqx.dataAdapter(SplitSource),MaterialData=[{id:0,en:"Stainless Steel",nl:"RVS",sh:0.11},{id:1,en:"Aluminium",nl:"Aluminium",sh:0.22},{id:2,en:"Plastics",nl:"Kunststof",sh:0.46},{id:3,en:"Copper",nl:"Koper",sh:0.092}],MaterialSource={localdata:MaterialData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"sh"}]},MaterialAdapter=new $.jqx.dataAdapter(MaterialSource),FermentableTypeData=[{id:0,en:"Grain",nl:"Mout"},{id:1,en:"Sugar",nl:"Suiker"},{id:2,en:"Extract",nl:"Vloeibaar extract"},{id:3,en:"Dry extract",nl:"Droog extract"},{id:4,en:"Adjunct",nl:"Ongemout graan"}],FermentableTypeSource={localdata:FermentableTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},FermentableTypeAdapter=new $.jqx.dataAdapter(FermentableTypeSource),GrainTypeData=[{id:0,en:"Base",nl:"Basismout"},{id:1,en:"Roast",nl:"Geroosterde mout"},{id:2,en:"Crystal",nl:"Cara- of crystalmout"},{id:3,en:"Kilned",nl:"Geëeste mout"},{id:4,en:"Sour malt",nl:"Zuurmout"},{id:5,en:"Special",nl:"Speciale mout"},{id:6,en:"No malt",nl:"Geen mout"}],GrainTypeSource={localdata:GrainTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},GrainTypeAdapter=new $.jqx.dataAdapter(GrainTypeSource),AddedData=[{id:0,en:"Mash",nl:"Maischen"},{id:1,en:"Boil",nl:"Koken"},{id:2,en:"Fermentation",nl:"Vergisten"},{id:3,en:"Lagering",nl:"Nagisten/lageren"},{id:4,en:"Bottle",nl:"Bottelen"},{id:5,en:"Kegs",nl:"Fust"}],AddedSource={localdata:AddedData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},AddedAdapter=new $.jqx.dataAdapter(AddedSource),HopTypeData=[{id:0,en:"Bittering",nl:"Bitterhop"},{id:1,en:"Aroma",nl:"Aromahop"},{id:2,en:"Both",nl:"Beide"}],HopTypeSource={localdata:HopTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},HopTypeAdapter=new $.jqx.dataAdapter(HopTypeSource),HopFormData=[{id:0,en:"Pellet",nl:"Pellets"},{id:1,en:"Plug",nl:"Plugs"},{id:2,en:"Leaf",nl:"Bloemen"},{id:3,en:"Leaf wet",nl:"Hop nat"},{id:4,en:"Cryo",nl:"Cryo"}],HopFormSource={localdata:HopFormData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},HopFormAdapter=new $.jqx.dataAdapter(HopFormSource),HopUseData=[{id:0,en:"Mash",nl:"Maischhop"},{id:1,en:"First wort",nl:"First wort hop"},{id:2,en:"Boil",nl:"Koken"},{id:3,en:"Aroma",nl:"Vlamuit"},{id:4,en:"Whirlpool",nl:"Whirlpool"},{id:5,en:"Dry hop",nl:"Koudhop"}],HopUseSource={localdata:HopUseData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},HopUseAdapter=new $.jqx.dataAdapter(HopUseSource),YeastTypeData=[{id:0,en:"Lager",nl:"Ondergist"},{id:1,en:"Ale",nl:"Bovengist"},{id:2,en:"Wheat",nl:"Tarwegist"},{id:3,en:"Wine",nl:"Wijngist"},{id:4,en:"Champagne",nl:"Champagnegist"},{id:5,en:"Brett",nl:"Brett"},{id:6,en:"Kveik",nl:"Kveik"},{id:7,en:"Hybrid",nl:"Hybride"}],YeastTypeSource={localdata:YeastTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},YeastTypeAdapter=new $.jqx.dataAdapter(YeastTypeSource),YeastFormData=[{id:0,en:"Liquid",nl:"Vloeibaar",cells:100000000000},{id:1,en:"Dry",nl:"Korrel",cells:15000000000},{id:2,en:"Slant",nl:"Schuine buis",cells:1700000000},{id:3,en:"Culture",nl:"Slurry",cells:1700000000},{id:4,en:"Frozen",nl:"Ingevroren",cells:1700000000},{id:5,en:"Bottle",nl:"Depot",cells:1700000000}],YeastFormSource={localdata:YeastFormData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"cells"}]},YeastFormAdapter=new $.jqx.dataAdapter(YeastFormSource),YeastUseData=[{id:0,en:"Primary",nl:"Hoofdgisting"},{id:1,en:"Secondary",nl:"Nagisting"},{id:2,en:"Tertiary",nl:"Lagering"},{id:3,en:"Bottle",nl:"Bottelen"}],YeastUseSource={localdata:YeastUseData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"},{name:"cells"}]},YeastUseAdapter=new $.jqx.dataAdapter(YeastUseSource),FlocculationData=[{id:0,en:"Low",nl:"Laag"},{id:1,en:"Medium",nl:"Medium"},{id:2,en:"High",nl:"Hoog"},{id:3,en:"Very high",nl:"Zeer hoog"}],FlocculationSource={localdata:FlocculationData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},FlocculationAdapter=new $.jqx.dataAdapter(FlocculationSource),ZymocideData=[{id:0,en:"None",nl:"Niet"},{id:1,en:"K1",nl:"K1"},{id:2,en:"K2",nl:"K2"},{id:3,en:"K28",nl:"K28"},{id:4,en:"Klus",nl:"Klus"}],ZymocideSource={localdata:ZymocideData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},ZymocideAdapter=new $.jqx.dataAdapter(ZymocideSource),StarterTypeData=[{id:0,en:"Stirred",nl:"Geroerd"},{id:1,en:"Shaken",nl:"Geschud"},{id:2,en:"Simple",nl:"Simpel"}],StarterTypeSource={localdata:StarterTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},StarterTypeAdapter=new $.jqx.dataAdapter(StarterTypeSource),MiscTypeData=[{id:0,en:"Spice",nl:"Specerij"},{id:1,en:"Herb",nl:"Kruid"},{id:2,en:"Flavor",nl:"Smaakstof"},{id:3,en:"Fining",nl:"Klaringsmiddel"},{id:4,en:"Water agent",nl:"Brouwzout"},{id:5,en:"Yeast nutrient",nl:"Gistvoeding"},{id:6,en:"Other",nl:"Overig"}],MiscTypeSource={localdata:MiscTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},MiscTypeAdapter=new $.jqx.dataAdapter(MiscTypeSource),MiscUseData=[{id:0,en:"Starter",nl:"Starter"},{id:1,en:"Mash",nl:"Maischen"},{id:2,en:"Boil",nl:"Koken"},{id:3,en:"Primary",nl:"Hoofdvergisting"},{id:4,en:"Secondary",nl:"Nagisting/lagering"},{id:5,en:"Bottling",nl:"Bottelen"}],MiscUseSource={localdata:MiscUseData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},MiscUseAdapter=new $.jqx.dataAdapter(MiscUseSource),StyleTypeData=[{id:0,en:"Lager",nl:"Ondergistend bier"},{id:1,en:"Ale",nl:"Bovengistend bier"},{id:2,en:"Mead",nl:"Mede"},{id:3,en:"Wheat",nl:"Tarwebier"},{id:4,en:"Mixed",nl:"Gemengd"},{id:5,en:"Cider",nl:"Cider"}],StyleTypeSource={localdata:StyleTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},StyleTypeAdapter=new $.jqx.dataAdapter(StyleTypeSource),MashStepTypeData=[{id:0,en:"Infusion",nl:"Infusie"},{id:1,en:"Temperature",nl:"Verwarming"},{id:2,en:"Decoction",nl:"Decoctie"}],MashStepTypeSource={localdata:MashStepTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},MashStepTypeAdapter=new $.jqx.dataAdapter(MashStepTypeSource),RecipeTypeData=[{id:0,en:"Extract",nl:"Extract"},{id:1,en:"Partial Mash",nl:"Deelmaisch"},{id:2,en:"All Grain",nl:"Mout"}],RecipeTypeSource={localdata:RecipeTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},RecipeTypeAdapter=new $.jqx.dataAdapter(RecipeTypeSource),IBUmethodData=[{id:0,en:"Tinseth",nl:"Tinseth"},{id:1,en:"Rager",nl:"Rager"},{id:2,en:"Daniels",nl:"Daniels"}],IBUmethodSource={localdata:IBUmethodData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},IBUmethodAdapter=new $.jqx.dataAdapter(IBUmethodSource),ColorMethodData=[{id:0,en:"Morey",nl:"Morey"},{id:1,en:"Mosher",nl:"Mosher"},{id:2,en:"Daniels",nl:"Daniels"},{id:3,en:"Halberstadt",nl:"Halberstadt"},{id:4,en:"Naudts",nl:"Naudts"}],ColorMethodSource={localdata:ColorMethodData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},ColorMethodAdapter=new $.jqx.dataAdapter(ColorMethodSource),CoolingTypeData=[{id:0,en:"-",nl:"-"},{id:1,en:"Emersion chiller",nl:"Dompelkoeler"},{id:2,en:"Counterflow chiller",nl:"Tegenstroomkoeler"},{id:3,en:"Au bain marie",nl:"Au bain marie"},{id:4,en:"Natural",nl:"Laten afkoelen"}],CoolingTypeSource={localdata:CoolingTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},CoolingTypeAdapter=new $.jqx.dataAdapter(CoolingTypeSource),AerationTypeData=[{id:0,en:"None",nl:"Geen"},{id:1,en:"Air",nl:"Lucht"},{id:2,en:"Oxygen",nl:"Zuurstof"}],AerationTypeSource={localdata:AerationTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},AerationTypeAdapter=new $.jqx.dataAdapter(AerationTypeSource),AcidTypeData=[{id:0,en:"Lactic",nl:"Melkzuur"},{id:1,en:"Hydrochloric",nl:"Zoutzuur"},{id:2,en:"Phosphoric",nl:"Fosforzuur"},{id:3,en:"Sulfuric",nl:"Zwavelzuur"}],AcidTypeSource={localdata:AcidTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},AcidTypeAdapter=new $.jqx.dataAdapter(AcidTypeSource),BaseTypeData=[{id:0,en:"Sodiumbicarbonate",nl:"NaHCO3"},{id:1,en:"Sodiumcarbonate",nl:"Na2CO3"},{id:2,en:"Calciumcarbonate",nl:"CaCO3"},{id:3,en:"Calciumhydroxide",nl:"Ca(OH)2"}],BaseTypeSource={localdata:BaseTypeData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},BaseTypeAdapter=new $.jqx.dataAdapter(BaseTypeSource),SpargeSourceData=[{id:0,en:"Source 1",nl:"Bron 1"},{id:1,en:"Source 2",nl:"Bron 2"},{id:2,en:"Mixed",nl:"Gemengd"}],SpargeSourceSource={localdata:SpargeSourceData,datatype:"array",datafields:[{name:"id"},{name:"en"},{name:"nl"}]},SpargeSourceAdapter=new $.jqx.dataAdapter(SpargeSourceSource),Show1wat={inputMode:"simple",theme:theme,width:74,height:23,decimalDigits:1,readOnly:true},Show2wat={inputMode:"simple",theme:theme,width:74,height:23,decimalDigits:2,readOnly:true},Show3wat={inputMode:"simple",theme:theme,width:74,height:23,decimalDigits:3,readOnly:true},Smal0dec={inputMode:"simple",theme:theme,width:50,height:23,decimalDigits:0,readOnly:true},Smal1dec={inputMode:"simple",theme:theme,width:50,height:23,decimalDigits:1,readOnly:true},Show0dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:0},Show1dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:1},Show2dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:2},Show3dec={inputMode:"simple",theme:theme,width:90,height:23,readOnly:true,decimalDigits:3},SGopts={inputMode:"simple",theme:theme,width:110,height:23,min:0.99,max:1.199,decimalDigits:3,spinButtons:true},Spin1dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:1,spinButtons:true},Spin2dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:2,spinButtons:true},Spin3dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:3,spinButtons:true},SpinpH={inputMode:"simple",theme:theme,width:110,height:23,min:1,max:14,decimalDigits:1,spinButtons:true},Spin2pH={inputMode:"simple",theme:theme,width:110,height:23,min:1,max:14,decimalDigits:2,spinButtons:true},YeastT={inputMode:"simple",theme:theme,width:110,height:23,min:0,max:50,decimalDigits:1,spinButtons:true},PosInt={inputMode:"simple",theme:theme,width:110,height:23,min:0,decimalDigits:0,spinButtons:true},Perc1dec={inputMode:"simple",theme:theme,width:110,height:23,min:0,max:100,decimalDigits:1,spinButtons:true},Perc0={inputMode:"simple",theme:theme,width:110,height:23,min:0,max:100,decimalDigits:0,spinButtons:true},Dateopts={theme:theme,width:150,height:23,allowNullDate:true,todayString:"Vandaag",clearString:"Wissen",showFooter:true,formatString:"yyyy-MM-dd",enableBrowserBoundsDetection:true},DateTimeopts={theme:theme,width:230,height:23,allowNullDate:true,todayString:"Vandaag",clearString:"Wissen",showFooter:true,formatString:"yyyy-MM-dd HH:mm:ss",enableBrowserBoundsDetection:true,showTimeButton:true},sugardensity=1.611,stylesSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"category",type:"string"},{name:"category_number",type:"number"},{name:"style_letter",type:"string"},{name:"style_guide",type:"string"},{name:"type",type:"int"},{name:"og_min",type:"float"},{name:"og_max",type:"float"},{name:"fg_min",type:"float"},{name:"fg_max",type:"float"},{name:"ibu_min",type:"float"},{name:"ibu_max",type:"float"},{name:"color_min",type:"float"},{name:"color_max",type:"float"},{name:"carb_min",type:"float"},{name:"carb_max",type:"float"},{name:"abv_min",type:"float"},{name:"abv_max",type:"float"},{name:"notes",type:"string"},{name:"profile",type:"string"},{name:"ingredients",type:"string"},{name:"examples",type:"string"}],url:"includes/db_profile_styles.php"},styleslist=new $.jqx.dataAdapter(stylesSource),equipmentSource={datatype:"json",datafields:[{name:"name",type:"string"},{name:"boil_size",type:"float"},{name:"batch_size",type:"float"},{name:"tun_volume",type:"float"},{name:"tun_weight",type:"float"},{name:"tun_specific_heat",type:"float"},{name:"tun_material",type:"int"},{name:"tun_height",type:"float"},{name:"top_up_water",type:"float"},{name:"trub_chiller_loss",type:"float"},{name:"evap_rate",type:"float"},{name:"boil_time",type:"float"},{name:"calc_boil_volume",type:"int"},{name:"top_up_kettle",type:"float"},{name:"hop_utilization",type:"float"},{name:"notes",type:"string"},{name:"lauter_volume",type:"float"},{name:"lauter_height",type:"float"},{name:"lauter_deadspace",type:"float"},{name:"kettle_volume",type:"float"},{name:"kettle_height",type:"float"},{name:"mash_volume",type:"float"},{name:"mash_max",type:"float"},{name:"efficiency",type:"float"}],url:"includes/db_inventory_equipments.php"},equipmentlist=new $.jqx.dataAdapter(equipmentSource),fermentableInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"int"},{name:"yield",type:"float"},{name:"color",type:"float"},{name:"add_after_boil",type:"int"},{name:"origin",type:"string"},{name:"supplier",type:"string"},{name:"coarse_fine_diff",type:"float"},{name:"moisture",type:"float"},{name:"diastatic_power",type:"float"},{name:"protein",type:"float"},{name:"dissolved_protein",type:"float"},{name:"max_in_batch",type:"float"},{name:"recommend_mash",type:"int"},{name:"graintype",type:"int"},{name:"di_ph",type:"float"},{name:"acid_to_ph_57",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"}],url:"getfermentablesources.php"},fermentableinstock=false,fermentablelist=new $.jqx.dataAdapter(fermentableInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.inventory||!fermentableinstock){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),fermentablesugars=new $.jqx.dataAdapter(fermentableInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.type==1||d.type==3){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),hopInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"origin",type:"string"},{name:"type",type:"int"},{name:"alpha",type:"float"},{name:"beta",type:"float"},{name:"humulene",type:"float"},{name:"caryophyllene",type:"float"},{name:"cohumulone",type:"float"},{name:"myrcene",type:"float"},{name:"hsi",type:"float"},{name:"useat",type:"int"},{name:"form",type:"int"},{name:"total_oil",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"}],url:"gethopsources.php"},hopinstock=false,hoplist=new $.jqx.dataAdapter(hopInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.inventory||!hopinstock){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),miscInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"int"},{name:"use_use",type:"int"},{name:"amount_is_weight",type:"int"},{name:"time",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"}],url:"getmiscsources.php"},miscinstock=false,misclist=new $.jqx.dataAdapter(miscInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.inventory||!miscinstock){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),yeastInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"int"},{name:"form",type:"int"},{name:"laboratory",type:"string"},{name:"product_id",type:"string"},{name:"min_temperature",type:"float"},{name:"max_temperature",type:"float"},{name:"flocculation",type:"int"},{name:"attenuation",type:"float"},{name:"cells",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"},{name:"tolerance",type:"float"}],url:"getyeastsources.php"},yeastinstock=false,yeastlist=new $.jqx.dataAdapter(yeastInvSource,{beforeLoadComplete:function(a){var d,b,c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.inventory||!yeastinstock){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),waterInvSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"unlimited_stock",type:"int"},{name:"calcium",type:"float"},{name:"sulfate",type:"float"},{name:"chloride",type:"float"},{name:"sodium",type:"float"},{name:"magnesium",type:"float"},{name:"ph",type:"float"},{name:"total_alkalinity",type:"float"},{name:"inventory",type:"float"},{name:"cost",type:"float"},],url:"getwatersources.php"},waterinstock=false,waterlist=new $.jqx.dataAdapter(waterInvSource,{beforeLoadComplete:function(a){var c,b,d;c=new Array();for(b=0;b<a.length;b++){d=a[b];if(d.inventory||d.unlimited_stock||!waterinstock){c.push(d)}}return c},loadError:function(c,a,b){console.log(a+" "+b)},}),waterProfileSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"calcium",type:"float"},{name:"bicarbonate",type:"float"},{name:"sulfate",type:"float"},{name:"chloride",type:"float"},{name:"sodium",type:"float"},{name:"magnesium",type:"float"},{name:"ph",type:"float"},{name:"total_alkalinity",type:"float"},],url:"includes/db_profile_water.php"},waterprofiles=new $.jqx.dataAdapter(waterProfileSource),mashProfileSource={datatype:"json",datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"steps",type:"array"}],url:"includes/db_profile_mash.php"},mashlist=new $.jqx.dataAdapter(mashProfileSource),K1s=0.384,K1a=-0.177,K1e=0.241,K1g=0.247,Ks=0.1415,Ka1=0.058,Ka2=0.078,Ke=0.174,Kg=0.109;function A(e,d,b,g,f){var c,a;c=d*1000;a=e/c+(b/c)*Ka1/Ks+(b/c)*(b/c)*Ka2/Ks+g/c*Ke/Ks+f/c*Kg/Ks;console.log("A("+e+","+d+","+b+","+g+","+f+"):"+a);return a}function B(d,c,a,f,e){var b,g;b=c*1000;g=d/b+(a/b)*K1a/K1s+f/b*K1e/K1s+e/b*K1g/K1s;console.log("B("+d+","+c+","+a+","+f+","+e+"):"+g);return g}$(document).ready(function(){$("#jqxMenu").jqxMenu({width:1280,height:"30px",autoOpen:false,clickToOpen:true,theme:theme});$("#jqxWidget").css("visibility","visible")});function Round(e,c){for(var b=0,a=1;b<c;b++,a*=10){}return Math.round(e*a)/a}function ebc_to_srm(a){var b=-1.32303e-12*Math.pow(a,4)-2.91515e-9*Math.pow(a,3)+0.00000818515*Math.pow(a,2)+0.372038*a+0.596351;if(b<0){b=0}return b}function srm_to_ebc(b){var a=Math.round(1.76506e-10*Math.pow(b,4)+1.54529e-7*Math.pow(b,3)-0.000159428*Math.pow(b,2)+2.68837*b-1.6004);if(a<0){a=0}return a}function get_kt(a){var b=1;if(a<3){b=3.5}else{if(a<6){b=3}else{if(a<8){b=2.75}else{if(a<10){b=2.5}else{if(a<20){b=1.8}else{if(a<30){b=1.6}else{if(a<60){b=1.3}else{if(a<100){b=1.2}else{if(a<300){b=1.1}}}}}}}}}return b}function abvol(c,a){if(((c-a)<0)||(a<0.9)){return 0}var b=c*3157*Math.pow(10,-5)+9.716*Math.pow(10,-2);return(c*1000-a*1000)*b}function kw_to_srm(a,b){if(a==0){return 1.4922*Math.pow(b,0.6859)}if(a==1){return 0.3*b+4.7}if(a==2){return 0.2*b+8.4}return 0}function kw_to_ebc(a,b){return srm_to_ebc(kw_to_srm(a,b))}function toIBU(a,h,r,q,s,e,m,c){var g,n,f,o,i,j=1,k=1,v=0,b,u,l,d,t,p;g=parseFloat(r);n=parseFloat(q);f=parseFloat(m)/100;o=parseFloat(s)*1000;i=parseFloat(e);if((a==3)||(a==4)||(a==5)){j=0}else{if(a==0){j+=my_factor_mashhop/100}else{if(a==1){j+=my_factor_fwh/100}}}if(h==0){k+=my_factor_pellet/100}else{if(h==1){k+=my_factor_plug/100}else{if(h==3){k+=my_factor_wethop/100}else{if(h==4){k+=my_factor_cryohop/100}}}}if(c==0){l=(f*o*1000)/n;d=1.65*Math.pow(0.000125,g-1);t=((1-Math.exp(-0.04*i))/4.15);p=d*t;v=Round(p*l*j*k,1)}if(c==2){if(h==2){b=-(0.0041*i*i)+(0.6162*i)+1.5779}else{b=-(0.0051*i*i)+(0.7835*i)+1.9348}if(g<1050){u=0}else{u=(g-1050)/200}v=Round(j*((o*(f*100)*b*0.1)/(n*(1+u))),1)}if(c==1){b=j*18.11+13.86*Math.tanh((i*31.32)/18.27);if(g<1050){u=0}else{u=(g-1050)/200}v=Round((o*(f*100)*b*0.1)/(n*(1+u)),1)}return v}function ebc_to_color(a){return srm_to_color(ebc_to_srm(a))}function srm_to_color(g){var c,e,d,f,b,a;c=Math.round(g*10);if(c<0){c=0}if(c>299){c=299}e=[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,249,248,247,246,245,244,243,242,241,240,239,238,237,236,235,234,233,232,231,230,229,228,227,226,225,224,223,222,221,220,219,218,217,216,215,214,213,212,211,210,209,208,207,206,205,204,203,202,201,200,200,199,199,198,198,197,197,196,196,195,195,194,194,193,193,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,191,190,189,188,187,186,185,184,183,182,181,180,179,178,177,175,174,172,171,169,168,167,195,164,162,161,159,158,157,155,154,152,151,149,148,147,145,144,142,141,139,138,137,135,134,132,131,129,128,127,125,124,122,121,119,118,117,115,114,112,111,109,108,107,105,104,102,101,99,98,97,95,94,92,91,89,88,87,85,84,82,81,79,78,77,75,74,72,71,69,68,67,65,64,62,61,59,58,57,55,54,52,51,49,48,47,45,44,43,41,39,38,37,37,36,36,35,35,34,34,33,33,32,32,31,31,30,30,29,29,28,28,27,27,26,26,25,25,24,24,23,23,22,22,21,21,20,20,19,19,18,18,17,17,16,16,15,15,14,14,13,13,12,12,11,11,10,10,9,9,8,8];d=[250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,249,248,247,246,245,244,242,240,238,236,234,232,230,228,226,224,222,220,218,216,214,212,210,208,206,204,202,200,198,196,194,192,190,188,186,184,182,180,178,176,174,172,170,168,166,164,162,160,158,156,154,152,150,148,146,144,142,141,140,139,139,138,137,136,136,135,134,133,133,132,131,130,130,129,128,127,127,126,125,124,124,123,122,121,121,120,119,118,118,117,116,115,115,114,113,112,112,111,110,109,109,108,107,106,106,105,104,103,103,102,101,100,100,99,98,97,97,96,95,94,94,93,92,91,91,90,89,88,88,87,86,85,85,84,83,82,82,81,80,79,78,77,76,75,75,74,73,72,72,71,70,69,69,68,67,66,66,65,64,63,63,62,61,60,60,59,58,57,57,56,55,54,54,53,52,51,51,50,49,48,48,47,46,45,45,44,43,42,42,41,40,39,39,38,37,36,36,35,34,33,33,32,31,30,30,29,28,27,27,26,25,24,24,23,22,22,22,21,21,21,20,20,20,19,19,19,18,18,18,17,17,17,16,16,16,15,15,15,14,14,14,13,13,13,12,12,12,11,11,11,10,10,10,9,9,9,8,8,8,7,7,7,6,6,6,5,5,5,4,4,4,3,3,3];f=[210,204,199,193,188,182,177,171,166,160,155,149,144,138,133,127,122,116,111,105,100,94,89,83,78,72,67,61,56,50,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,55,55,55,55,54,54,54,54,53,53,53,53,52,52,52,52,51,51,51,51,50,50,50,50,49,49,48,47,47,46,45,45,44,43,43,42,41,41,40,39,39,38,37,37,36,35,34,33,32,31,29,28,27,26,25,24,23,21,20,19,18,17,16,15,13,12,11,10,9,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,21,21,21,20,20,20,19,19,19,18,18,18,17,17,17,17,16,16,15,15,15,14,14,14,13,13,13,12,12,12,11,11,11,10,10,10,9,9,9,8,8,8,7,7,7,6,6,6,5,5,5,4,4,4,3,3,3,2,2,2];b=e[c]*65536+d[c]*256+f[c];a=b.toString(16).toUpperCase();if(a.length<6){a="0"+a}return"#"+a}function sg_to_plato(a){return((135.997*a-630.272)*a+1111.14)*a-616.868}function plato_to_sg(a){return 1+(a/(258.6-((a/258.2)*227.1)))}function brix_to_sg(a){if(my_brix_correction>0){return plato_to_sg(a/my_brix_correction)}else{return plato_to_sg(a)}}function sg_to_brix(a){return sg_to_plato(a)*my_brix_correction}function estimate_sg(c,e){var a,d,b;a=100*c/e;d=plato_to_sg(a);for(b=0;b<20;b++){if(d>0){a=100*c/(e*d)}d=plato_to_sg(a)}return Round(d,4)}function estimate_fg(f,i,e,h,c,g,j){var b,d,a;if(f>40){f=0}if(i>50){i=0}if((e>0)&&(h>0)){b=e;if(b<2){b=2}if(b>5.5){b=5.5}if(c<60){c=60}if(c>72){c=72}}else{b=3.5;c=67;h=75}if(g<30){g=77}d=0.00825*g+0.00817*b-0.00684*c+0.00026*h-0.00356*i+0.00553*f+0.547;a=Round(1+(1-d)*(j-1),4);return a}function CalcFrac(f,e,d,b){var g,a,i,k,h,c,j;g=Math.pow(10,f-e);a=Math.pow(10,f-d);i=Math.pow(10,f-b);k=1/(1+g+g*a+g*a*i);h=g*k;c=g*a*k;j=g*a*i*k;return h+2*c+3*j}function lintner_to_kolbach(a){return(3.5*a)-16}function kolbach_to_lintner(a){return(a+16)/3.5};
\ No newline at end of file
--- a/www/js/global.js	Sat Oct 12 14:00:33 2019 +0200
+++ b/www/js/global.js	Sun Oct 13 22:02:49 2019 +0200
@@ -164,13 +164,13 @@
  { id: 1, en: 'Ale',       nl: 'Bovengist' },
  { id: 2, en: 'Wheat',     nl: 'Tarwegist' },
  { id: 3, en: 'Wine',      nl: 'Wijngist' },
- { id: 4, en: 'Champagne', nl: 'Champagnegist' }
-// { id: 5, en: 'Hybrid',    nl: 'Hybride' },
-// { id: 5, en: 'Brett',     nl: 'Brett' },
-// { id: 6, en: 'Kveik',     nl: 'Kveik' },
-// { id: 7, en: 'Mixed',     nl: 'Mixed' },
-// { id: 8, en: 'Spontaneous', nl: 'Spontaan' },
-// { id: 9, en: 'Other',       nl: 'Overig' }
+ { id: 4, en: 'Champagne', nl: 'Champagnegist' },
+ { id: 5, en: 'Brett',     nl: 'Brett' },
+ { id: 6, en: 'Kveik',     nl: 'Kveik' },
+ { id: 7, en: 'Hybrid',    nl: 'Hybride' }
+// { id: 8, en: 'Mixed',     nl: 'Mixed' },
+// { id: 9, en: 'Spontaneous', nl: 'Spontaan' },
+// { id: 10, en: 'Other',       nl: 'Overig' }
 ],
 YeastTypeSource = {
  localdata: YeastTypeData,
@@ -220,6 +220,20 @@
 },
 FlocculationAdapter = new $.jqx.dataAdapter(FlocculationSource),
 
+ZymocideData = [
+ { id: 0, en: 'None', nl: 'Niet' },
+ { id: 1, en: 'K1',   nl: 'K1' },
+ { id: 2, en: 'K2',   nl: 'K2' },
+ { id: 3, en: 'K28',  nl: 'K28' },
+ { id: 4, en: 'Klus', nl: 'Klus' }
+],
+ZymocideSource = {
+ localdata: ZymocideData,
+ datatype: 'array',
+ datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
+},
+ZymocideAdapter = new $.jqx.dataAdapter(ZymocideSource),
+
 StarterTypeData = [
  { id: 0, en: 'Stirred', nl: 'Geroerd' },
  { id: 1, en: 'Shaken',  nl: 'Geschud' },
--- a/www/js/inv_yeasts-min.js	Sat Oct 12 14:00:33 2019 +0200
+++ b/www/js/inv_yeasts-min.js	Sun Oct 13 22:02:49 2019 +0200
@@ -1,1 +1,1 @@
-function createDelElements(){$("#eventWindow").jqxWindow({theme:theme,position:{x:490,y:210},width:300,height:175,resizable:false,isModal:true,modalOpacity:0.4,okButton:$("#delOk"),cancelButton:$("#delCancel"),initContent:function(){$("#delOk").jqxButton({template:"danger",width:"65px",theme:theme});$("#delCancel").jqxButton({template:"success",width:"65px",theme:theme});$("#delCancel").focus()}});$("#eventWindow").jqxWindow("hide")}$(document).ready(function(){function d(){$("#totval").val(b.cost*b.inventory);if(b.form==0){$("#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(b.form==1){$("#pmpt_cost").html("Prijs per kg:");$("#pmpt_inventory").html("Voorraad gram:");$("#pmpt_cells").html("Miljard cellen per gram:");$("#inventory").jqxNumberInput({decimalDigits:1})}else{$("#pmpt_cost").html("Prijs per liter:");$("#pmpt_inventory").html("Voorraad ml:");$("#pmpt_cells").html("Miljard cellen per ml:");$("#inventory").jqxNumberInput({decimalDigits:1})}}}var b={},a="includes/db_inventory_yeasts.php",e={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"int"},{name:"form",type:"int"},{name:"laboratory",type:"string"},{name:"product_id",type:"string"},{name:"min_temperature",type:"float"},{name:"max_temperature",type:"float"},{name:"flocculation",type:"int"},{name:"attenuation",type:"float"},{name:"notes",type:"string"},{name:"best_for",type:"string"},{name:"max_reuse",type:"int"},{name:"inventory",type:"float"},{name:"cost",type:"float"},{name:"production_date",type:"string"},{name:"tht_date",type:"string"},{name:"cells",type:"float"},{name:"tolerance",type:"float"}],id:"record",url:a,deleterow:function(g,i){var h="delete=true&"+$.param({record:g});$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(k,j,l){i(true);location.reload(true)},error:function(j,l,k){i(false)}})},addrow:function(h,k,g,j){var i="insert=true&"+$.param(k);$.ajax({dataType:"json",url:a,cache:false,data:i,type:"POST",success:function(m,l,n){j(true);location.reload(true)},error:function(l,n,m){j(false)}})},updaterow:function(g,j,i){var h="update=true&"+$.param(j);$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(l,k,m){i(true);location.reload(true)},error:function(k,m,l){i(false)}})}},f=new $.jqx.dataAdapter(e),c=-1;$("#name").jqxInput({theme:theme,width:640,height:23});$("#laboratory").jqxInput({theme:theme,width:320,height:23});$("#product_id").jqxInput({theme:theme,width:320,height:23});$("#type").jqxDropDownList({theme:theme,source:YeastTypeAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#form").jqxDropDownList({theme:theme,source:YeastFormAdapter,valueMember:"id",displayMember:"nl",selectedIndex:0,width:180,height:23,autoDropDownHeight:true});$("#notes").jqxInput({theme:theme,width:800,height:120});$("#best_for").jqxInput({theme:theme,width:320,height:100});$("#inventory").jqxNumberInput(Spin1dec);$("#production_date").jqxDateTimeInput(Dateopts);$("#min_temperature").jqxNumberInput(YeastT);$("#max_temperature").jqxNumberInput(YeastT);$("#flocculation").jqxDropDownList({theme:theme,source:FlocculationAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#attenuation").jqxNumberInput(Perc1dec);$("#max_reuse").jqxNumberInput(PosInt);$("#max_reuse").jqxNumberInput({max:10});$("#cost").jqxNumberInput(Spin2dec);$("#tht_date").jqxDateTimeInput(Dateopts);$("#totval").jqxNumberInput(Show2dec);$("#cells").jqxNumberInput(Spin1dec);$("#tolerance").jqxNumberInput(Perc1dec);$("#tolerance").jqxNumberInput({max:25});$("#jqxgrid").jqxGrid({width:1280,height:630,source:f,theme:theme,showstatusbar:true,renderstatusbar:function(i){var g,h,j;g=$("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");h=$("<div style='float: right; margin-right: 15px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Nieuw</span></div>");j=$("<div style='float: right; margin-right: 50px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Import</span></div>");g.append(h);g.append(j);i.append(g);h.jqxButton({theme:theme,width:90,height:20});j.jqxButton({theme:theme,width:90,height:20});h.click(function(k){c=-1;$("#popupWindow").jqxWindow({position:{x:110,y:30}});$("#name").val("");$("#laboratory").val("");$("#product_id").val("");$("#type").val(0);$("#form").val(0);$("#min_temperature").val(18);$("#max_temperature").val(22);$("#flocculation").val(0);$("#attenuation").val(77);$("#notes").val("");$("#best_for").val("");$("#max_reuse").val(10);$("#inventory").val(0);$("#cost").val(0);$("#production_date").val("");$("#tht_date").val("");$("#cells").val(1);$("#tolerance").val(0);$("#popupWindow").jqxWindow("open")});j.click(function(k){window.location.href="import_ingredients.php?select=yeasts"})},filterable:true,filtermode:"excel",columns:[{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(h,g,k,j,i,l){return"<div style='margin: 4px;' class='jqx-center-align'>"+YeastTypeData[k].nl+"</div>"}},{text:"Vorm",datafield:"form",align:"center",cellsalign:"center",menu:false,width:110,cellsrenderer:function(h,g,k,j,i,l){return"<div style='margin: 4px;' class='jqx-center-align'>"+YeastFormData[k].nl+"</div>"}},{text:"SVG",datafield:"attenuation",width:70,align:"right",cellsalign:"right",menu:false,cellsformat:"p1"},{text:"Tol%",datafield:"tolerance",width:60,align:"right",cellsalign:"right",menu:false,cellsrenderer:function(h,g,l,k,j,m){var i="";if(l>0){i=f.formatNumber(l,"p0")}return'<span style="margin: 4px; margin-top: 6px; float: right;">'+i+"</span>"}},{text:"Voorraad",datafield:"inventory",width:100,align:"right",menu:false,cellsrenderer:function(h,g,l,k,j,m){var i="";if(l>0){if((m.form==0)&&(l>1)){i=f.formatNumber(l,"f0")+" pakken"}else{if(m.form==0){i=f.formatNumber(l,"f0")+" pak"}else{if(m.form==1){i=f.formatNumber(l*1000,"f1")+" gram"}else{i=f.formatNumber(l*1000,"f1")+" ml"}}}}return"<span style='margin: 3px; margin-top: 6px; float: right;'>"+i+"</span>"}},{text:"",datafield:"Edit",columntype:"button",width:100,align:"center",menu:false,cellsrenderer:function(){return"Wijzig"},buttonclick:function(g){c=g;$("#popupWindow").jqxWindow({position:{x:110,y:30}});b=$("#jqxgrid").jqxGrid("getrowdata",c);$("#name").val(b.name);$("#laboratory").val(b.laboratory);$("#product_id").val(b.product_id);$("#type").val(b.type);$("#form").val(b.form);$("#min_temperature").val(b.min_temperature);$("#max_temperature").val(b.max_temperature);$("#flocculation").val(b.flocculation);$("#attenuation").val(b.attenuation);$("#notes").val(b.notes);$("#best_for").val(b.best_for);$("#max_reuse").val(b.max_reuse);if(b.form==0){$("#inventory").val(b.inventory)}else{$("#inventory").val(b.inventory*1000)}$("#cost").val(b.cost);$("#production_date").val(b.production_date);$("#tht_date").val(b.tht_date);$("#cells").val(b.cells);$("#tolerance").val(b.tolerance);d();$("#popupWindow").jqxWindow("open")}}]});$("#popupWindow").on("open",function(g){d()});$("#cost").on("change",function(g){b.cost=parseFloat(g.args.value);d()});$("#inventory").on("change",function(g){if(b.form==0){b.inventory=parseFloat(g.args.value)}else{b.inventory=parseFloat(g.args.value)/1000}d()});$("#form").on("select",function(g){if(g.args){b.form=g.args.index;d()}});$("#popupWindow").jqxWindow({width:1050,height:575,resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#Cancel"),modalOpacity:0.4});$("#popupWindow").on("open",function(){$("#name").jqxInput("selectAll")});$("#Delete").jqxButton({template:"danger",width:"90px",theme:theme});$("#Delete").click(function(){if(c>=0){$("#eventWindow").jqxWindow("open");$("#delOk").click(function(){var g=$("#jqxgrid").jqxGrid("getrowid",c);$("#jqxgrid").jqxGrid("deleterow",g)})}$("#popupWindow").jqxWindow("hide")});$("#Cancel").jqxButton({template:"primary",width:"90px",theme:theme});$("#Clone").jqxButton({template:"warning",width:"90px",theme:theme});$("#Clone").click(function(){var g={record:-1,name:$("#name").val()+" kopie",type:$("#type").val(),form:$("#form").val(),laboratory:$("#laboratory").val(),product_id:$("#product_id").val(),min_temperature:parseInt($("#min_temperature").jqxNumberInput("decimal")),max_temperature:parseInt($("#max_temperature").jqxNumberInput("decimal")),flocculation:$("#flocculation").val(),attenuation:parseFloat($("#attenuation").jqxNumberInput("decimal")),notes:$("#notes").val(),best_for:$("#best_for").val(),max_reuse:parseInt($("#max_reuse").jqxNumberInput("decimal")),inventory:0,cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:"",tht_date:"",cells:parseFloat($("#cells").jqxNumberInput("decimal")),tolerance:parseFloat($("#tolerance").jqxNumberInput("decimal"))};$("#jqxgrid").jqxGrid("addrow",null,g);$("#popupWindow").jqxWindow("hide")});$("#Save").jqxButton({template:"success",width:"90px",theme:theme});$("#Save").click(function(){var g,i,h=-1;if(c>=0){h=$("#jqxgrid").jqxGrid("getrowid",c)}if(b.form==0){g=parseFloat($("#inventory").jqxNumberInput("decimal"))}else{g=parseFloat($("#inventory").jqxNumberInput("decimal"))/1000}i={record:h,name:$("#name").val(),type:$("#type").val(),form:$("#form").val(),laboratory:$("#laboratory").val(),product_id:$("#product_id").val(),min_temperature:parseInt($("#min_temperature").jqxNumberInput("decimal")),max_temperature:parseInt($("#max_temperature").jqxNumberInput("decimal")),flocculation:$("#flocculation").val(),attenuation:parseFloat($("#attenuation").jqxNumberInput("decimal")),notes:$("#notes").val(),best_for:$("#best_for").val(),max_reuse:parseInt($("#max_reuse").jqxNumberInput("decimal")),inventory:g,cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:$("#production_date").val(),tht_date:$("#tht_date").val(),cells:parseFloat($("#cells").jqxNumberInput("decimal")),tolerance:parseFloat($("#tolerance").jqxNumberInput("decimal"))};if(c>=0){$("#jqxgrid").jqxGrid("updaterow",h,i)}else{$("#jqxgrid").jqxGrid("addrow",null,i)}$("#popupWindow").jqxWindow("hide")});createDelElements()});
\ No newline at end of file
+function createDelElements(){$("#eventWindow").jqxWindow({theme:theme,position:{x:490,y:210},width:300,height:175,resizable:false,isModal:true,modalOpacity:0.4,okButton:$("#delOk"),cancelButton:$("#delCancel"),initContent:function(){$("#delOk").jqxButton({template:"danger",width:"65px",theme:theme});$("#delCancel").jqxButton({template:"success",width:"65px",theme:theme});$("#delCancel").focus()}});$("#eventWindow").jqxWindow("hide")}$(document).ready(function(){function d(){$("#totval").val(b.cost*b.inventory);if(b.form==0){$("#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(b.form==1){$("#pmpt_cost").html("Prijs per kg:");$("#pmpt_inventory").html("Voorraad gram:");$("#pmpt_cells").html("Miljard cellen per gram:");$("#inventory").jqxNumberInput({decimalDigits:1})}else{$("#pmpt_cost").html("Prijs per liter:");$("#pmpt_inventory").html("Voorraad ml:");$("#pmpt_cells").html("Miljard cellen per ml:");$("#inventory").jqxNumberInput({decimalDigits:1})}}}var b={},a="includes/db_inventory_yeasts.php",e={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"name",type:"string"},{name:"type",type:"int"},{name:"form",type:"int"},{name:"laboratory",type:"string"},{name:"product_id",type:"string"},{name:"min_temperature",type:"float"},{name:"max_temperature",type:"float"},{name:"flocculation",type:"int"},{name:"attenuation",type:"float"},{name:"notes",type:"string"},{name:"best_for",type:"string"},{name:"max_reuse",type:"int"},{name:"inventory",type:"float"},{name:"cost",type:"float"},{name:"production_date",type:"string"},{name:"tht_date",type:"string"},{name:"cells",type:"float"},{name:"tolerance",type:"float"},{name:"sta1",type:"int"},{name:"bacteria",type:"int"},{name:"harvest_top",type:"int"},{name:"harvest_time",type:"int"},{name:"pitch_temperature",type:"float"},{name:"pofpos",type:"int"},{name:"zymocide",type:"int"}],id:"record",url:a,deleterow:function(g,i){var h="delete=true&"+$.param({record:g});$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(k,j,l){i(true);location.reload(true)},error:function(j,l,k){i(false)}})},addrow:function(h,k,g,j){var i="insert=true&"+$.param(k);$.ajax({dataType:"json",url:a,cache:false,data:i,type:"POST",success:function(m,l,n){j(true);location.reload(true)},error:function(l,n,m){j(false)}})},updaterow:function(g,j,i){var h="update=true&"+$.param(j);$.ajax({dataType:"json",url:a,cache:false,data:h,type:"POST",success:function(l,k,m){i(true);location.reload(true)},error:function(k,m,l){i(false)}})}},f=new $.jqx.dataAdapter(e),c=-1;$("#name").jqxInput({theme:theme,width:640,height:23});$("#laboratory").jqxInput({theme:theme,width:320,height:23});$("#product_id").jqxInput({theme:theme,width:320,height:23});$("#type").jqxDropDownList({theme:theme,source:YeastTypeAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#form").jqxDropDownList({theme:theme,source:YeastFormAdapter,valueMember:"id",displayMember:"nl",selectedIndex:0,width:180,height:23,autoDropDownHeight:true});$("#notes").jqxInput({theme:theme,width:800,height:120});$("#best_for").jqxInput({theme:theme,width:320,height:100});$("#inventory").jqxNumberInput(Spin1dec);$("#production_date").jqxDateTimeInput(Dateopts);$("#min_temperature").jqxNumberInput(YeastT);$("#max_temperature").jqxNumberInput(YeastT);$("#flocculation").jqxDropDownList({theme:theme,source:FlocculationAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#attenuation").jqxNumberInput(Perc1dec);$("#max_reuse").jqxNumberInput(PosInt);$("#max_reuse").jqxNumberInput({max:10});$("#cost").jqxNumberInput(Spin2dec);$("#tht_date").jqxDateTimeInput(Dateopts);$("#totval").jqxNumberInput(Show2dec);$("#cells").jqxNumberInput(Spin1dec);$("#tolerance").jqxNumberInput(Perc1dec);$("#tolerance").jqxNumberInput({max:25});$("#sta1").jqxCheckBox({theme:theme,width:120,height:23});$("#sta1").on("checked",function(g){b.sta1=1});$("#sta1").on("unchecked",function(g){b.sta1=0});$("#bacteria").jqxCheckBox({theme:theme,width:120,height:23});$("#bacteria").on("checked",function(g){b.bacteria=1});$("#bacteria").on("unchecked",function(g){b.bacteria=0});$("#harvest_top").jqxCheckBox({theme:theme,width:120,height:23});$("#harvest_top").on("checked",function(g){b.harvest_top=1});$("#harvest_top").on("unchecked",function(g){b.harvest_top=0});$("#harvest_time").jqxNumberInput(PosInt);$("#pitch_temperature").jqxNumberInput(YeastT);$("#pofpos").jqxCheckBox({theme:theme,width:120,height:23});$("#pofpos").on("checked",function(g){b.pofpos=1});$("#pofpos").on("unchecked",function(g){b.pofpos=0});$("#zymocide").jqxDropDownList({theme:theme,source:ZymocideAdapter,valueMember:"id",displayMember:"nl",width:80,height:23,autoDropDownHeight:true});$("#jqxgrid").jqxGrid({width:1280,height:630,source:f,theme:theme,showstatusbar:true,renderstatusbar:function(i){var g,h,j;g=$("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");h=$("<div style='float: right; margin-right: 15px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Nieuw</span></div>");j=$("<div style='float: right; margin-right: 50px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Import</span></div>");g.append(h);g.append(j);i.append(g);h.jqxButton({theme:theme,width:90,height:20});j.jqxButton({theme:theme,width:90,height:20});h.click(function(k){c=-1;$("#popupWindow").jqxWindow({position:{x:110,y:30}});$("#name").val("");$("#laboratory").val("");$("#product_id").val("");$("#type").val(0);$("#form").val(0);$("#min_temperature").val(18);$("#max_temperature").val(22);$("#flocculation").val(0);$("#attenuation").val(77);$("#notes").val("");$("#best_for").val("");$("#max_reuse").val(10);$("#inventory").val(0);$("#cost").val(0);$("#production_date").val("");$("#tht_date").val("");$("#cells").val(1);$("#tolerance").val(0);$("#sta1").val(0);$("#bacteria").val(0);$("#harvest_top").val(0);$("#harvest_time").val(0);$("pitch_temperature#").val(0);$("#pofpos").val(0);$("#zymocide").val(0);$("#popupWindow").jqxWindow("open")});j.click(function(k){window.location.href="import_ingredients.php?select=yeasts"})},filterable:true,filtermode:"excel",columns:[{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(h,g,k,j,i,l){return"<div style='margin: 4px;' class='jqx-center-align'>"+YeastTypeData[k].nl+"</div>"}},{text:"Vorm",datafield:"form",align:"center",cellsalign:"center",menu:false,width:110,cellsrenderer:function(h,g,k,j,i,l){return"<div style='margin: 4px;' class='jqx-center-align'>"+YeastFormData[k].nl+"</div>"}},{text:"SVG",datafield:"attenuation",width:70,align:"right",cellsalign:"right",menu:false,cellsformat:"p1"},{text:"Tol%",datafield:"tolerance",width:60,align:"right",cellsalign:"right",menu:false,cellsrenderer:function(h,g,l,k,j,m){var i="";if(l>0){i=f.formatNumber(l,"p0")}return'<span style="margin: 4px; margin-top: 6px; float: right;">'+i+"</span>"}},{text:"Voorraad",datafield:"inventory",width:100,align:"right",menu:false,cellsrenderer:function(h,g,l,k,j,m){var i="";if(l>0){if((m.form==0)&&(l>1)){i=f.formatNumber(l,"f0")+" pakken"}else{if(m.form==0){i=f.formatNumber(l,"f0")+" pak"}else{if(m.form==1){i=f.formatNumber(l*1000,"f1")+" gram"}else{i=f.formatNumber(l*1000,"f1")+" ml"}}}}return"<span style='margin: 3px; margin-top: 6px; float: right;'>"+i+"</span>"}},{text:"",datafield:"Edit",columntype:"button",width:100,align:"center",menu:false,cellsrenderer:function(){return"Wijzig"},buttonclick:function(g){c=g;$("#popupWindow").jqxWindow({position:{x:110,y:15}});b=$("#jqxgrid").jqxGrid("getrowdata",c);$("#name").val(b.name);$("#laboratory").val(b.laboratory);$("#product_id").val(b.product_id);$("#type").val(b.type);$("#form").val(b.form);$("#min_temperature").val(parseFloat(b.min_temperature));$("#max_temperature").val(parseFloat(b.max_temperature));$("#flocculation").val(b.flocculation);$("#attenuation").val(b.attenuation);$("#notes").val(b.notes);$("#best_for").val(b.best_for);$("#max_reuse").val(b.max_reuse);if(b.form==0){$("#inventory").val(b.inventory)}else{$("#inventory").val(b.inventory*1000)}$("#cost").val(b.cost);$("#production_date").val(b.production_date);$("#tht_date").val(b.tht_date);$("#cells").val(b.cells);$("#tolerance").val(b.tolerance);$("#sta1").val(b.sta1);$("#bacteria").val(b.bacteria);$("#harvest_top").val(b.harvest_top);$("#harvest_time").val(b.harvest_time);$("#pitch_temperature").val(parseFloat(b.pitch_temperature));$("#pofpos").val(b.pofpos);$("#zymocide").val(b.zymocide);d();$("#popupWindow").jqxWindow("open")}}]});$("#popupWindow").on("open",function(g){d()});$("#cost").on("change",function(g){b.cost=parseFloat(g.args.value);d()});$("#inventory").on("change",function(g){if(b.form==0){b.inventory=parseFloat(g.args.value)}else{b.inventory=parseFloat(g.args.value)/1000}d()});$("#form").on("select",function(g){if(g.args){b.form=g.args.index;d()}});$("#popupWindow").jqxWindow({width:1050,height:625,resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#Cancel"),modalOpacity:0.4});$("#popupWindow").on("open",function(){$("#name").jqxInput("selectAll")});$("#Delete").jqxButton({template:"danger",width:"90px",theme:theme});$("#Delete").click(function(){if(c>=0){$("#eventWindow").jqxWindow("open");$("#delOk").click(function(){var g=$("#jqxgrid").jqxGrid("getrowid",c);$("#jqxgrid").jqxGrid("deleterow",g)})}$("#popupWindow").jqxWindow("hide")});$("#Cancel").jqxButton({template:"primary",width:"90px",theme:theme});$("#Clone").jqxButton({template:"warning",width:"90px",theme:theme});$("#Clone").click(function(){var g={record:-1,name:$("#name").val()+" kopie",type:$("#type").val(),form:$("#form").val(),laboratory:$("#laboratory").val(),product_id:$("#product_id").val(),min_temperature:parseFloat($("#min_temperature").jqxNumberInput("decimal")),max_temperature:parseFloat($("#max_temperature").jqxNumberInput("decimal")),flocculation:$("#flocculation").val(),attenuation:parseFloat($("#attenuation").jqxNumberInput("decimal")),notes:$("#notes").val(),best_for:$("#best_for").val(),max_reuse:parseInt($("#max_reuse").jqxNumberInput("decimal")),inventory:0,cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:"",tht_date:"",cells:parseFloat($("#cells").jqxNumberInput("decimal")),tolerance:parseFloat($("#tolerance").jqxNumberInput("decimal")),sta1:$("#sta1").val(),bacteria:$("#bacteria").val(),harvest_top:$("#harvest_top").val(),harvest_time:$("#harvest_time").val(),pitch_temperature:parseFloat($("#pitch_temperature").jqxNumberInput("decimal")),pofpos:$("#pofpos").val(),zymocide:$("#zymocide").val()};$("#jqxgrid").jqxGrid("addrow",null,g);$("#popupWindow").jqxWindow("hide")});$("#Save").jqxButton({template:"success",width:"90px",theme:theme});$("#Save").click(function(){var g,i,h=-1;if(c>=0){h=$("#jqxgrid").jqxGrid("getrowid",c)}if(b.form==0){g=parseFloat($("#inventory").jqxNumberInput("decimal"))}else{g=parseFloat($("#inventory").jqxNumberInput("decimal"))/1000}i={record:h,name:$("#name").val(),type:$("#type").val(),form:$("#form").val(),laboratory:$("#laboratory").val(),product_id:$("#product_id").val(),min_temperature:parseFloat($("#min_temperature").jqxNumberInput("decimal")),max_temperature:parseFloat($("#max_temperature").jqxNumberInput("decimal")),flocculation:$("#flocculation").val(),attenuation:parseFloat($("#attenuation").jqxNumberInput("decimal")),notes:$("#notes").val(),best_for:$("#best_for").val(),max_reuse:parseInt($("#max_reuse").jqxNumberInput("decimal")),inventory:g,cost:parseFloat($("#cost").jqxNumberInput("decimal")),production_date:$("#production_date").val(),tht_date:$("#tht_date").val(),cells:parseFloat($("#cells").jqxNumberInput("decimal")),tolerance:parseFloat($("#tolerance").jqxNumberInput("decimal")),sta1:$("#sta1").val(),bacteria:$("#bacteria").val(),harvest_top:$("#harvest_top").val(),harvest_time:$("#harvest_time").val(),pitch_temperature:parseFloat($("#pitch_temperature").jqxNumberInput("decimal")),pofpos:$("#pofpos").val(),zymocide:$("#zymocide").val()};if(c>=0){$("#jqxgrid").jqxGrid("updaterow",h,i)}else{$("#jqxgrid").jqxGrid("addrow",null,i)}$("#popupWindow").jqxWindow("hide")});createDelElements()});
\ No newline at end of file
--- a/www/js/inv_yeasts.js	Sat Oct 12 14:00:33 2019 +0200
+++ b/www/js/inv_yeasts.js	Sun Oct 13 22:02:49 2019 +0200
@@ -89,7 +89,14 @@
 			{ name: 'production_date', type: 'string' },
 			{ name: 'tht_date', type: 'string' },
 			{ name: 'cells', type: 'float' },
-			{ name: 'tolerance', type: 'float' }
+			{ name: 'tolerance', type: 'float' },
+			{ name: 'sta1', type: 'int' },
+			{ name: 'bacteria', type: 'int' },
+			{ name: 'harvest_top', type: 'int' },
+			{ name: 'harvest_time', type: 'int' },
+			{ name: 'pitch_temperature', type: 'float' },
+			{ name: 'pofpos', type: 'int' },
+			{ name: 'zymocide', type: 'int' }
 		],
 		id: 'record',
 		url: url,
@@ -196,6 +203,29 @@
 	$("#cells").jqxNumberInput( Spin1dec );
 	$("#tolerance").jqxNumberInput( Perc1dec );
 	$("#tolerance").jqxNumberInput({ max: 25 });
+	$('#sta1').jqxCheckBox({ theme: theme, width: 120, height: 23 });
+	$('#sta1').on('checked', function(event) { dataRecord.sta1 = 1; });
+	$('#sta1').on('unchecked', function(event) { dataRecord.sta1 = 0; });
+        $('#bacteria').jqxCheckBox({ theme: theme, width: 120, height: 23 });
+        $('#bacteria').on('checked', function(event) { dataRecord.bacteria = 1; });
+        $('#bacteria').on('unchecked', function(event) { dataRecord.bacteria = 0; });
+        $('#harvest_top').jqxCheckBox({ theme: theme, width: 120, height: 23 });
+        $('#harvest_top').on('checked', function(event) { dataRecord.harvest_top = 1; });
+        $('#harvest_top').on('unchecked', function(event) { dataRecord.harvest_top = 0; });
+	$('#harvest_time').jqxNumberInput( PosInt );
+	$("#pitch_temperature").jqxNumberInput( YeastT );
+        $('#pofpos').jqxCheckBox({ theme: theme, width: 120, height: 23 });
+        $('#pofpos').on('checked', function(event) { dataRecord.pofpos = 1; });
+        $('#pofpos').on('unchecked', function(event) { dataRecord.pofpos = 0; });
+	$("#zymocide").jqxDropDownList({
+                theme: theme,
+                source: ZymocideAdapter,
+                valueMember: 'id',
+                displayMember: 'nl',
+                width: 80,
+                height: 23,
+                autoDropDownHeight: true
+        });
 
 	// initialize jqxGrid
 	$("#jqxgrid").jqxGrid({
@@ -236,6 +266,13 @@
 				$("#tht_date").val('');
 				$("#cells").val(1);
 				$("#tolerance").val(0);
+				$("#sta1").val(0);
+				$("#bacteria").val(0);
+				$("#harvest_top").val(0);
+				$("#harvest_time").val(0);
+				$("pitch_temperature#").val(0);
+				$("#pofpos").val(0);
+				$("#zymocide").val(0);
 				$("#popupWindow").jqxWindow('open');
 			});
 			impButton.click(function (event) {
@@ -288,7 +325,7 @@
 				}, buttonclick: function (row) {
 					// open the popup window when the user clicks a button.
 					editrow = row;
-					$("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } });
+					$("#popupWindow").jqxWindow({ position: { x: 110, y: 15 } });
 					// get the clicked row's data and initialize the input fields.
 					dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow);
 					$("#name").val(dataRecord.name);
@@ -296,8 +333,8 @@
 					$("#product_id").val(dataRecord.product_id);
 					$("#type").val(dataRecord.type);
 					$("#form").val(dataRecord.form);
-					$("#min_temperature").val(dataRecord.min_temperature);
-					$("#max_temperature").val(dataRecord.max_temperature);
+					$("#min_temperature").val(parseFloat(dataRecord.min_temperature));
+					$("#max_temperature").val(parseFloat(dataRecord.max_temperature));
 					$("#flocculation").val(dataRecord.flocculation);
 					$("#attenuation").val(dataRecord.attenuation);
 					$("#notes").val(dataRecord.notes);
@@ -312,6 +349,13 @@
 					$("#tht_date").val(dataRecord.tht_date);
 					$("#cells").val(dataRecord.cells);
 					$("#tolerance").val(dataRecord.tolerance);
+					$("#sta1").val(dataRecord.sta1);
+					$("#bacteria").val(dataRecord.bacteria);
+					$("#harvest_top").val(dataRecord.harvest_top);
+					$("#harvest_time").val(dataRecord.harvest_time);
+					$("#pitch_temperature").val(parseFloat(dataRecord.pitch_temperature));
+					$("#pofpos").val(dataRecord.pofpos);
+					$("#zymocide").val(dataRecord.zymocide);
 					calcTotal();
 					// show the popup window.
 					$("#popupWindow").jqxWindow('open');
@@ -342,7 +386,7 @@
 	// initialize the popup window and buttons.
 	$("#popupWindow").jqxWindow({
 		width: 1050,
-		height: 575,
+		height: 625,
 		resizable: false,
 		theme: theme,
 		isModal: true,
@@ -375,8 +419,8 @@
 			form: $("#form").val(),
 			laboratory: $("#laboratory").val(),
 			product_id: $("#product_id").val(),
-			min_temperature: parseInt($("#min_temperature").jqxNumberInput('decimal')),
-			max_temperature: parseInt($("#max_temperature").jqxNumberInput('decimal')),
+			min_temperature: parseFloat($("#min_temperature").jqxNumberInput('decimal')),
+			max_temperature: parseFloat($("#max_temperature").jqxNumberInput('decimal')),
 			flocculation: $("#flocculation").val(),
 			attenuation: parseFloat($("#attenuation").jqxNumberInput('decimal')),
 			notes: $("#notes").val(),
@@ -387,7 +431,14 @@
 			production_date: '',
 			tht_date: '',
 			cells: parseFloat($("#cells").jqxNumberInput('decimal')),
-			tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal'))
+			tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal')),
+			sta1: $("#sta1").val(),
+			bacteria: $("#bacteria").val(),
+			harvest_top: $("#harvest_top").val(),
+			harvest_time: $("#harvest_time").val(),
+			pitch_temperature: parseFloat($("#pitch_temperature").jqxNumberInput('decimal')),
+			pofpos: $("#pofpos").val(),
+			zymocide: $("#zymocide").val()
 		};
 		$('#jqxgrid').jqxGrid('addrow', null, row);
 		$("#popupWindow").jqxWindow('hide');
@@ -410,8 +461,8 @@
 			form: $("#form").val(),
 			laboratory: $("#laboratory").val(),
 			product_id: $("#product_id").val(),
-			min_temperature: parseInt($("#min_temperature").jqxNumberInput('decimal')),
-			max_temperature: parseInt($("#max_temperature").jqxNumberInput('decimal')),
+			min_temperature: parseFloat($("#min_temperature").jqxNumberInput('decimal')),
+			max_temperature: parseFloat($("#max_temperature").jqxNumberInput('decimal')),
 			flocculation: $("#flocculation").val(),
 			attenuation: parseFloat($("#attenuation").jqxNumberInput('decimal')),
 			notes: $("#notes").val(),
@@ -422,7 +473,14 @@
 			production_date: $("#production_date").val(),
 			tht_date: $("#tht_date").val(),
 			cells: parseFloat($("#cells").jqxNumberInput('decimal')),
-			tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal'))
+			tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal')),
+			sta1: $("#sta1").val(),
+                        bacteria: $("#bacteria").val(),
+                        harvest_top: $("#harvest_top").val(),
+                        harvest_time: $("#harvest_time").val(),
+                        pitch_temperature: parseFloat($("#pitch_temperature").jqxNumberInput('decimal')),
+                        pofpos: $("#pofpos").val(),
+                        zymocide: $("#zymocide").val()
 		};
 		if (editrow >= 0) {
 			$('#jqxgrid').jqxGrid('updaterow', rowID, row);

mercurial