# HG changeset patch # User Michiel Broek # Date 1568839844 -7200 # Node ID 10c6eeee60ce3f74ed1a98ef9371f0fece65b91e # Parent 0fe366d953aba7980c05c3cac241617aac1e4e50 Initial design of the divide batch screen. diff -r 0fe366d953ab -r 10c6eeee60ce www/Makefile --- a/www/Makefile Wed Sep 18 14:40:34 2019 +0200 +++ b/www/Makefile Wed Sep 18 22:50:44 2019 +0200 @@ -12,7 +12,7 @@ log_brew.php log_fermentation.php \ mon_brewer.php mon_fermenter.php mon_node.php \ prod_archive_code.php prod_archive_date.php prod_archive_name.php prod_beerxml.php \ - prod_checklist.php prod_duplicate.php prod_edit.php prod_export.php prod_forum.php \ + prod_checklist.php prod_divide.php prod_duplicate.php prod_edit.php prod_export.php prod_forum.php \ prod_impbrew.php prod_inprod.php prod_new.php prod_print.php prod_torecipe.php \ prod_r_efficiency.php prod_r_yeast.php prod_r_totals.php \ profile_fermentation.php profile_mash.php profile_setup.php profile_styles.php \ diff -r 0fe366d953ab -r 10c6eeee60ce www/includes/global.inc.php --- a/www/includes/global.inc.php Wed Sep 18 14:40:34 2019 +0200 +++ b/www/includes/global.inc.php Wed Sep 18 22:50:44 2019 +0200 @@ -58,6 +58,10 @@ $my_split = $_GET['split']; else $my_split = 0; +if (isset($_GET['stage'])) + $my_stage = $_GET['stage']; +else + $my_stage = 0; $escapers = array("\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c"); $replacements = array("\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b"); @@ -103,6 +107,7 @@ global $my_name; global $my_code; global $my_select; + global $my_stage; global $my_split; global $my_brewery_name; global $my_factor_mashhop; @@ -128,7 +133,7 @@ '.PHP_EOL; + echo ' '.PHP_EOL; ?> diff -r 0fe366d953ab -r 10c6eeee60ce www/js/global-min.js --- a/www/js/global-min.js Wed Sep 18 14:40:34 2019 +0200 +++ b/www/js/global-min.js Wed Sep 18 22:50:44 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),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:40,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;b299){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 primary",nl:"Na hoofdgisting",ok:3},{id:4,en:"After secondary",nl:"Na nagisting",ok:4},{id:5,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:40,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;b299){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 diff -r 0fe366d953ab -r 10c6eeee60ce www/js/global.js --- a/www/js/global.js Wed Sep 18 14:40:34 2019 +0200 +++ b/www/js/global.js Wed Sep 18 22:50:44 2019 +0200 @@ -35,7 +35,7 @@ { id: 8, en: 'Mature', nl: 'Rijpen' }, { id: 9, en: 'Taste', nl: 'Proeven' }, { id: 10, en: 'Ready', nl: 'Gereed' }, - { id: 11, en: 'Closed', nl: 'Afgesloten' } + { id: 11, en: 'Closed', nl: 'Afgesloten' } ], StageSource = { localdata: StageData, @@ -44,6 +44,21 @@ }, 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 primary', nl: 'Na hoofdgisting', ok: 3 }, + { id: 4, en: 'After secondary', nl: 'Na nagisting', ok: 4 }, + { id: 5, 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 }, diff -r 0fe366d953ab -r 10c6eeee60ce www/js/prod_divide-min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/js/prod_divide-min.js Wed Sep 18 22:50:44 2019 +0200 @@ -0,0 +1,1 @@ +$(document).ready(function(){$("#divide_type").jqxDropDownList({theme:theme,source:SplitAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});var b={},c,a="includes/db_product.php",d={datatype:"json",cache:false,datafields:[{name:"record",type:"number"},{name:"uuid",type:"string"},{name:"name",type:"string"},{name:"code",type:"string"},{name:"birth",type:"string"},{name:"stage",type:"int"},{name:"notes",type:"string"},{name:"log_brew",type:"int"},{name:"log_fermentation",type:"int"},{name:"inventory_reduced",type:"int"},{name:"locked",type:"int"},{name:"eq_name",type:"string"},{name:"eq_boil_size",type:"float"},{name:"eq_batch_size",type:"float"},{name:"eq_tun_volume",type:"float"},{name:"eq_tun_weight",type:"float"},{name:"eq_tun_specific_heat",type:"float"},{name:"eq_tun_material",type:"int"},{name:"eq_tun_height",type:"float"},{name:"eq_top_up_water",type:"float"},{name:"eq_trub_chiller_loss",type:"float"},{name:"eq_evap_rate",type:"float"},{name:"eq_boil_time",type:"float"},{name:"eq_calc_boil_volume",type:"int"},{name:"eq_top_up_kettle",type:"float"},{name:"eq_hop_utilization",type:"float"},{name:"eq_notes",type:"string"},{name:"eq_lauter_volume",type:"float"},{name:"eq_lauter_height",type:"float"},{name:"eq_lauter_deadspace",type:"float"},{name:"eq_kettle_volume",type:"float"},{name:"eq_kettle_height",type:"float"},{name:"eq_mash_volume",type:"float"},{name:"eq_mash_max",type:"float"},{name:"eq_efficiency",type:"float"},{name:"brew_date_start",type:"string"},{name:"brew_mash_ph",type:"float"},{name:"brew_mash_sg",type:"float"},{name:"brew_mash_efficiency",type:"float"},{name:"brew_sparge_est",type:"float"},{name:"brew_sparge_ph",type:"float"},{name:"brew_preboil_volume",type:"float"},{name:"brew_preboil_sg",type:"float"},{name:"brew_preboil_ph",type:"float"},{name:"brew_preboil_efficiency",type:"float"},{name:"brew_aboil_volume",type:"float"},{name:"brew_aboil_sg",type:"float"},{name:"brew_aboil_ph",type:"float"},{name:"brew_aboil_efficiency",type:"float"},{name:"brew_cooling_method",type:"int"},{name:"brew_cooling_time",type:"float"},{name:"brew_cooling_to",type:"float"},{name:"brew_whirlpool9",type:"float"},{name:"brew_whirlpool7",type:"float"},{name:"brew_whirlpool6",type:"float"},{name:"brew_whirlpool2",type:"float"},{name:"brew_fermenter_volume",type:"float"},{name:"brew_fermenter_extrawater",type:"float"},{name:"brew_fermenter_tcloss",type:"float"},{name:"brew_aeration_time",type:"float"},{name:"brew_aeration_speed",type:"float"},{name:"brew_aeration_type",type:"int"},{name:"brew_fermenter_sg",type:"float"},{name:"brew_fermenter_ibu",type:"float"},{name:"brew_fermenter_color",type:"float"},{name:"brew_date_end",type:"string"},{name:"og",type:"float"},{name:"fg",type:"float"},{name:"primary_start_temp",type:"float"},{name:"primary_max_temp",type:"float"},{name:"primary_end_temp",type:"float"},{name:"primary_end_sg",type:"float"},{name:"primary_end_date",type:"string"},{name:"secondary_temp",type:"float"},{name:"secondary_end_sg",type:"float"},{name:"secondary_end_date",type:"string"},{name:"tertiary_temp",type:"float"},{name:"package_date",type:"string"},{name:"package_volume",type:"float"},{name:"package_infuse_amount",type:"float"},{name:"package_infuse_abv",type:"float"},{name:"package_infuse_notes",type:"string"},{name:"package_abv",type:"float"},{name:"package_ph",type:"float"},{name:"bottle_amount",type:"float"},{name:"bottle_carbonation",type:"float"},{name:"bottle_priming_water",type:"float"},{name:"bottle_priming_amount",type:"float"},{name:"bottle_carbonation_temp",type:"float"},{name:"keg_amount",type:"float"},{name:"keg_carbonation",type:"float"},{name:"keg_priming_water",type:"float"},{name:"keg_priming_amount",type:"float"},{name:"keg_carbonation_temp",type:"float"},{name:"keg_forced_carb",type:"int"},{name:"keg_pressure",type:"float"},{name:"taste_notes",type:"string"},{name:"taste_rate",type:"float"},{name:"taste_date",type:"string"},{name:"taste_color",type:"string"},{name:"taste_transparency",type:"string"},{name:"taste_head",type:"string"},{name:"taste_aroma",type:"string"},{name:"taste_taste",type:"string"},{name:"taste_mouthfeel",type:"string"},{name:"taste_aftertaste",type:"string"},{name:"st_name",type:"string"},{name:"st_letter",type:"string"},{name:"st_guide",type:"string"},{name:"st_category",type:"string"},{name:"st_category_number",type:"float"},{name:"st_type",type:"int"},{name:"st_og_min",type:"float"},{name:"st_og_max",type:"float"},{name:"st_fg_min",type:"float"},{name:"st_fg_max",type:"float"},{name:"st_ibu_min",type:"float"},{name:"st_ibu_max",type:"float"},{name:"st_color_min",type:"float"},{name:"st_color_max",type:"float"},{name:"st_carb_min",type:"float"},{name:"st_carb_max",type:"float"},{name:"st_abv_min",type:"float"},{name:"st_abv_max",type:"float"},{name:"type",type:"int"},{name:"batch_size",type:"float"},{name:"boil_size",type:"float"},{name:"boil_time",type:"float"},{name:"efficiency",type:"float"},{name:"est_og",type:"float"},{name:"est_fg",type:"float"},{name:"est_abv",type:"float"},{name:"est_color",type:"float"},{name:"color_method",type:"int"},{name:"est_ibu",type:"float"},{name:"ibu_method",type:"int"},{name:"est_carb",type:"float"},{name:"sparge_temp",type:"float"},{name:"sparge_ph",type:"float"},{name:"sparge_volume",type:"float"},{name:"sparge_source",type:"int"},{name:"sparge_acid_type",type:"int"},{name:"sparge_acid_perc",type:"float"},{name:"sparge_acid_amount",type:"float"},{name:"mash_ph",type:"float"},{name:"mash_name",type:"string"},{name:"calc_acid",type:"int"},{name:"w1_name",type:"string"},{name:"w1_amount",type:"float"},{name:"w1_calcium",type:"float"},{name:"w1_sulfate",type:"float"},{name:"w1_chloride",type:"float"},{name:"w1_sodium",type:"float"},{name:"w1_magnesium",type:"float"},{name:"w1_total_alkalinity",type:"float"},{name:"w1_ph",type:"float"},{name:"w1_cost",type:"float"},{name:"w2_name",type:"string"},{name:"w2_amount",type:"float"},{name:"w2_calcium",type:"float"},{name:"w2_sulfate",type:"float"},{name:"w2_chloride",type:"float"},{name:"w2_sodium",type:"float"},{name:"w2_magnesium",type:"float"},{name:"w2_total_alkalinity",type:"float"},{name:"w2_ph",type:"float"},{name:"w2_cost",type:"float"},{name:"wg_amount",type:"float"},{name:"wg_calcium",type:"float"},{name:"wg_sulfate",type:"float"},{name:"wg_chloride",type:"float"},{name:"wg_sodium",type:"float"},{name:"wg_magnesium",type:"float"},{name:"wg_total_alkalinity",type:"float"},{name:"wg_ph",type:"float"},{name:"wb_calcium",type:"float"},{name:"wb_sulfate",type:"float"},{name:"wb_chloride",type:"float"},{name:"wb_sodium",type:"float"},{name:"wb_magnesium",type:"float"},{name:"wb_total_alkalinity",type:"float"},{name:"wb_ph",type:"float"},{name:"wa_acid_name",type:"int"},{name:"wa_acid_perc",type:"int"},{name:"wa_base_name",type:"int"},{name:"starter_enable",type:"int"},{name:"starter_type",type:"int"},{name:"starter_sg",type:"float"},{name:"starter_viability",type:"int"},{name:"starter_viability",type:"int"},{name:"prop1_type",type:"int"},{name:"prop1_volume",type:"float"},{name:"prop2_type",type:"int"},{name:"prop2_volume",type:"float"},{name:"prop3_type",type:"int"},{name:"prop3_volume",type:"float"},{name:"prop4_type",type:"int"},{name:"prop4_volume",type:"float"},{name:"divide_type",type:"int"},{name:"divide_size",type:"float"},{name:"divide_parts",type:"int"},{name:"divide_from",type:"string"},{name:"fermentables",type:"array"},{name:"hops",type:"array"},{name:"miscs",type:"array"},{name:"yeasts",type:"array"},{name:"mashs",type:"array"}],id:"record",url:a+"?record="+my_record},e=new $.jqx.dataAdapter(d,{loadComplete:function(){var g=e.records;b=g[0];$("#name").val(b.name);$("#code").val(b.code);$("#stage").val(StageData[b.stage].nl);for(c=0;c');k.append(j);j.append('');j.append('');$("#saddrowbutton").jqxButton({template:"primary",theme:theme,height:27,width:150});$("#saddrowbutton").on("click",function(){var l={},m=$("#splitGrid").jqxGrid("getdatainformation").rowscount;l.split_name=b.name+" "+(m+1);l.split_size=0;$("#splitGrid").jqxGrid("addrow",null,l)});$("#sdeleterowbutton").jqxButton({template:"danger",theme:theme,height:27,width:150});$("#sdeleterowbutton").on("click",function(){var n,m,l=$("#splitGrid").jqxGrid("getselectedrowindex");n=$("#splitGrid").jqxGrid("getdatainformation").rowscount;if(l>=0&&l + * + * This file is part of BMS + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * BrewCloud is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ThermFerm; see the file COPYING. If not, write to the Free + * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + *****************************************************************************/ + + +$(document).ready(function () { + + $('#divide_type').jqxDropDownList({ + theme: theme, + source: SplitAdapter, + valueMember: 'id', + displayMember: 'nl', + width: 180, + height: 23, + autoDropDownHeight: true + }); + + var dataRecord = {}, + i, + url = 'includes/db_product.php', + + // Prepare the data + source = { + datatype: 'json', + cache: false, + datafields: [ + // From prod_main + { name: 'record', type: 'number' }, + { name: 'uuid', type: 'string' }, + { name: 'name', type: 'string' }, + { name: 'code', type: 'string' }, + { name: 'birth', type: 'string' }, + { name: 'stage', type: 'int' }, + { name: 'notes', type: 'string' }, + { name: 'log_brew', type: 'int' }, + { name: 'log_fermentation', type: 'int' }, + { name: 'inventory_reduced', type: 'int' }, + { name: 'locked', type: 'int' }, + { name: 'eq_name', type: 'string' }, + { name: 'eq_boil_size', type: 'float' }, + { name: 'eq_batch_size', type: 'float' }, + { name: 'eq_tun_volume', type: 'float' }, + { name: 'eq_tun_weight', type: 'float' }, + { name: 'eq_tun_specific_heat', type: 'float' }, + { name: 'eq_tun_material', type: 'int' }, + { name: 'eq_tun_height', type: 'float' }, + { name: 'eq_top_up_water', type: 'float' }, + { name: 'eq_trub_chiller_loss', type: 'float' }, + { name: 'eq_evap_rate', type: 'float' }, + { name: 'eq_boil_time', type: 'float' }, + { name: 'eq_calc_boil_volume', type: 'int' }, + { name: 'eq_top_up_kettle', type: 'float' }, + { name: 'eq_hop_utilization', type: 'float' }, + { name: 'eq_notes', type: 'string' }, + { name: 'eq_lauter_volume', type: 'float' }, + { name: 'eq_lauter_height', type: 'float' }, + { name: 'eq_lauter_deadspace', type: 'float' }, + { name: 'eq_kettle_volume', type: 'float' }, + { name: 'eq_kettle_height', type: 'float' }, + { name: 'eq_mash_volume', type: 'float' }, + { name: 'eq_mash_max', type: 'float' }, + { name: 'eq_efficiency', type: 'float' }, + { name: 'brew_date_start', type: 'string' }, + { name: 'brew_mash_ph', type: 'float' }, + { name: 'brew_mash_sg', type: 'float' }, + { name: 'brew_mash_efficiency', type: 'float' }, + { name: 'brew_sparge_est', type: 'float' }, + { name: 'brew_sparge_ph', type: 'float' }, + { name: 'brew_preboil_volume', type: 'float' }, + { name: 'brew_preboil_sg', type: 'float' }, + { name: 'brew_preboil_ph', type: 'float' }, + { name: 'brew_preboil_efficiency', type: 'float' }, + { name: 'brew_aboil_volume', type: 'float' }, + { name: 'brew_aboil_sg', type: 'float' }, + { name: 'brew_aboil_ph', type: 'float' }, + { name: 'brew_aboil_efficiency', type: 'float' }, + { name: 'brew_cooling_method', type: 'int' }, + { name: 'brew_cooling_time', type: 'float' }, + { name: 'brew_cooling_to', type: 'float' }, + { name: 'brew_whirlpool9', type: 'float' }, + { name: 'brew_whirlpool7', type: 'float' }, + { name: 'brew_whirlpool6', type: 'float' }, + { name: 'brew_whirlpool2', type: 'float' }, + { name: 'brew_fermenter_volume', type: 'float' }, + { name: 'brew_fermenter_extrawater', type: 'float' }, + { name: 'brew_fermenter_tcloss', type: 'float' }, + { name: 'brew_aeration_time', type: 'float' }, + { name: 'brew_aeration_speed', type: 'float' }, + { name: 'brew_aeration_type', type: 'int' }, + { name: 'brew_fermenter_sg', type: 'float' }, + { name: 'brew_fermenter_ibu', type: 'float' }, + { name: 'brew_fermenter_color', type: 'float' }, + { name: 'brew_date_end', type: 'string' }, + { name: 'og', type: 'float' }, + { name: 'fg', type: 'float' }, + { name: 'primary_start_temp', type: 'float' }, + { name: 'primary_max_temp', type: 'float' }, + { name: 'primary_end_temp', type: 'float' }, + { name: 'primary_end_sg', type: 'float' }, + { name: 'primary_end_date', type: 'string' }, + { name: 'secondary_temp', type: 'float' }, + { name: 'secondary_end_sg', type: 'float' }, + { name: 'secondary_end_date', type: 'string' }, + { name: 'tertiary_temp', type: 'float' }, + { name: 'package_date', type: 'string' }, + { name: 'package_volume', type: 'float' }, + { name: 'package_infuse_amount', type: 'float' }, + { name: 'package_infuse_abv', type: 'float' }, + { name: 'package_infuse_notes', type: 'string' }, + { name: 'package_abv', type: 'float' }, + { name: 'package_ph', type: 'float' }, + { name: 'bottle_amount', type: 'float' }, + { name: 'bottle_carbonation', type: 'float' }, + { name: 'bottle_priming_water', type: 'float' }, + { name: 'bottle_priming_amount', type: 'float' }, + { name: 'bottle_carbonation_temp', type: 'float' }, + { name: 'keg_amount', type: 'float' }, + { name: 'keg_carbonation', type: 'float' }, + { name: 'keg_priming_water', type: 'float' }, + { name: 'keg_priming_amount', type: 'float' }, + { name: 'keg_carbonation_temp', type: 'float' }, + { name: 'keg_forced_carb', type: 'int' }, + { name: 'keg_pressure', type: 'float' }, + { name: 'taste_notes', type: 'string' }, + { name: 'taste_rate', type: 'float' }, + { name: 'taste_date', type: 'string' }, + { name: 'taste_color', type: 'string' }, + { name: 'taste_transparency', type: 'string' }, + { name: 'taste_head', type: 'string' }, + { name: 'taste_aroma', type: 'string' }, + { name: 'taste_taste', type: 'string' }, + { name: 'taste_mouthfeel', type: 'string' }, + { name: 'taste_aftertaste', type: 'string' }, + { name: 'st_name', type: 'string' }, + { name: 'st_letter', type: 'string' }, + { name: 'st_guide', type: 'string' }, + { name: 'st_category', type: 'string' }, + { name: 'st_category_number', type: 'float' }, + { name: 'st_type', type: 'int' }, + { name: 'st_og_min', type: 'float' }, + { name: 'st_og_max', type: 'float' }, + { name: 'st_fg_min', type: 'float' }, + { name: 'st_fg_max', type: 'float' }, + { name: 'st_ibu_min', type: 'float' }, + { name: 'st_ibu_max', type: 'float' }, + { name: 'st_color_min', type: 'float' }, + { name: 'st_color_max', type: 'float' }, + { name: 'st_carb_min', type: 'float' }, + { name: 'st_carb_max', type: 'float' }, + { name: 'st_abv_min', type: 'float' }, + { name: 'st_abv_max', type: 'float' }, + { name: 'type', type: 'int' }, + { name: 'batch_size', type: 'float' }, + { name: 'boil_size', type: 'float' }, + { name: 'boil_time', type: 'float' }, + { name: 'efficiency', type: 'float' }, + { name: 'est_og', type: 'float' }, + { name: 'est_fg', type: 'float' }, + { name: 'est_abv', type: 'float' }, + { name: 'est_color', type: 'float' }, + { name: 'color_method', type: 'int' }, + { name: 'est_ibu', type: 'float' }, + { name: 'ibu_method', type: 'int' }, + { name: 'est_carb', type: 'float' }, + { name: 'sparge_temp', type: 'float' }, + { name: 'sparge_ph', type: 'float' }, + { name: 'sparge_volume', type: 'float' }, + { name: 'sparge_source', type: 'int' }, + { name: 'sparge_acid_type', type: 'int' }, + { name: 'sparge_acid_perc', type: 'float' }, + { name: 'sparge_acid_amount', type: 'float' }, + { name: 'mash_ph', type: 'float' }, + { name: 'mash_name', type: 'string' }, + { name: 'calc_acid', type: 'int' }, + { name: 'w1_name', type: 'string' }, + { name: 'w1_amount', type: 'float' }, + { name: 'w1_calcium', type: 'float' }, + { name: 'w1_sulfate', type: 'float' }, + { name: 'w1_chloride', type: 'float' }, + { name: 'w1_sodium', type: 'float' }, + { name: 'w1_magnesium', type: 'float' }, + { name: 'w1_total_alkalinity', type: 'float' }, + { name: 'w1_ph', type: 'float' }, + { name: 'w1_cost', type: 'float' }, + { name: 'w2_name', type: 'string' }, + { name: 'w2_amount', type: 'float' }, + { name: 'w2_calcium', type: 'float' }, + { name: 'w2_sulfate', type: 'float' }, + { name: 'w2_chloride', type: 'float' }, + { name: 'w2_sodium', type: 'float' }, + { name: 'w2_magnesium', type: 'float' }, + { name: 'w2_total_alkalinity', type: 'float' }, + { name: 'w2_ph', type: 'float' }, + { name: 'w2_cost', type: 'float' }, + { name: 'wg_amount', type: 'float' }, + { name: 'wg_calcium', type: 'float' }, + { name: 'wg_sulfate', type: 'float' }, + { name: 'wg_chloride', type: 'float' }, + { name: 'wg_sodium', type: 'float' }, + { name: 'wg_magnesium', type: 'float' }, + { name: 'wg_total_alkalinity', type: 'float' }, + { name: 'wg_ph', type: 'float' }, + { name: 'wb_calcium', type: 'float' }, + { name: 'wb_sulfate', type: 'float' }, + { name: 'wb_chloride', type: 'float' }, + { name: 'wb_sodium', type: 'float' }, + { name: 'wb_magnesium', type: 'float' }, + { name: 'wb_total_alkalinity', type: 'float' }, + { name: 'wb_ph', type: 'float' }, + { name: 'wa_acid_name', type: 'int' }, + { name: 'wa_acid_perc', type: 'int' }, + { name: 'wa_base_name', type: 'int' }, + { name: 'starter_enable', type: 'int' }, + { name: 'starter_type', type: 'int' }, + { name: 'starter_sg', type: 'float' }, + { name: 'starter_viability', type: 'int' }, + { name: 'starter_viability', type: 'int' }, + { name: 'prop1_type', type: 'int' }, + { name: 'prop1_volume', type: 'float' }, + { name: 'prop2_type', type: 'int' }, + { name: 'prop2_volume', type: 'float' }, + { name: 'prop3_type', type: 'int' }, + { name: 'prop3_volume', type: 'float' }, + { name: 'prop4_type', type: 'int' }, + { name: 'prop4_volume', type: 'float' }, + { name: 'divide_type', type: 'int' }, + { name: 'divide_size', type: 'float' }, + { name: 'divide_parts', type: 'int' }, + { name: 'divide_from', type: 'string' }, + { name: 'fermentables', type: 'array' }, + { name: 'hops', type: 'array' }, + { name: 'miscs', type: 'array' }, + { name: 'yeasts', type: 'array' }, + { name: 'mashs', type: 'array' } + ], + id: 'record', + url: url + '?record=' + my_record + }, + + // Load data and select one record. + dataAdapter = new $.jqx.dataAdapter(source, { + loadComplete: function() { + var records = dataAdapter.records; + dataRecord = records[0]; + // Hidden record uuid + $('#name').val(dataRecord.name); + $('#code').val(dataRecord.code); + $('#stage').val(StageData[dataRecord.stage].nl); + // Disable stages that are already done. + for (i = 0; i < SplitData.length; i++) { + console.log('i:' + i + ' ok:' + SplitData[i].ok + ' stage:' + dataRecord.stage); + if (SplitData[i].ok < dataRecord.stage) + $("#divide_type").jqxDropDownList('disableAt', i); + } + }, + loadError: function(jqXHR, status, error) { + }, + beforeLoadComplete: function(records) { + $('#jqxLoader').jqxLoader('open'); + } + }); + + var editSplit = function(data) { + var splitSource = { + datatype: 'local', + cache: false, + async: false, + datafields: [ + { name: 'split_name', type: 'string' }, + { name: 'split_size', type: 'float' } + ], + addrow: function(rowid, rowdata, position, commit) { + console.log('split addrow ' + rowid); + commit(true); + }, + deleterow: function(rowid, commit) { + console.log('split deleterow ' + rowid); + commit(true); + } + }, + splitAdapter = new $.jqx.dataAdapter(splitSource, {}); + $('#splitGrid').jqxGrid({ + width: 1240, + height: 400, + source: splitAdapter, + theme: theme, + selectionmode: 'singlerow', + showtoolbar: true, + rendertoolbar: function(toolbar) { + var container = $('
'); + toolbar.append(container); + container.append(''); + container.append(''); + $('#saddrowbutton').jqxButton({ template: 'primary', theme: theme, height: 27, width: 150 }); + $('#saddrowbutton').on('click', function() { + var row = {}, rowscount = $('#splitGrid').jqxGrid('getdatainformation').rowscount; + row['split_name'] = dataRecord.name + ' ' + (rowscount + 1); + row['split_size'] = 0; + $('#splitGrid').jqxGrid('addrow', null, row); + }); + // delete selected split + $('#sdeleterowbutton').jqxButton({ template: 'danger', theme: theme, height: 27, width: 150 }); + $('#sdeleterowbutton').on('click', function() { + var rowscount, id, selectedrowindex = $('#splitGrid').jqxGrid('getselectedrowindex'); + rowscount = $('#splitGrid').jqxGrid('getdatainformation').rowscount; + if (selectedrowindex >= 0 && selectedrowindex < rowscount) { + id = $('#splitGrid').jqxGrid('getrowid', selectedrowindex); + $('#splitGrid').jqxGrid('deleterow', id); + } + }); + }, + columns: [ + { text: 'Splits naam', datafield: 'split_name' }, + { text: 'Splits volume', datafield: 'split_size', width: 90, align: 'right', cellsalign: 'right', cellsformat: 'f2' } + ] + }); + }; + + dataAdapter.dataBind(); + editSplit(dataRecord); + + // initialize the input fields. + $('#name').jqxTooltip({ content: 'De naam voor dit product.' }); + $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); + $('#code').jqxTooltip({ content: 'Product code nummer.' }); + $('#code').jqxInput({ theme: theme, width: 100, height: 23 }); + $('#stage').jqxTooltip({ content: 'De productie fase van dit product.' }); + $('#stage').jqxInput({ theme: theme, width: 100, height: 23 }); + $('#divide_type').val(0); + $('#divide_type').on('change', function(event) { + dataRecord.divide_type = event.args.index; + }); + + $('#Cancel').jqxButton({ template: 'primary', width: '80px', theme: theme }); + $('#Cancel').bind('click', function() { + window.location.href = my_return; + }); + + $('#Save').jqxButton({ template: 'success', width: '80px', theme: theme }); + $('#Save').bind('click', function() { +// saveRecord(1); + }); + +}); diff -r 0fe366d953ab -r 10c6eeee60ce www/js/prod_export-min.js --- a/www/js/prod_export-min.js Wed Sep 18 14:40:34 2019 +0200 +++ b/www/js/prod_export-min.js Wed Sep 18 22:50:44 2019 +0200 @@ -1,1 +1,1 @@ -$(document).ready(function(){var a=0;$("#name").html(my_name);$("#code").html(my_code);$("#jqxRadioButton1").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton2").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton3").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton4").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton5").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton6").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton7").jqxRadioButton({theme:theme,width:250,height:23});if(my_split!=0){$("#jqxRadioButton3").jqxRadioButton({disabled:true})}$("#jqxRadioButton1").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=1});$("#jqxRadioButton2").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=2});$("#jqxRadioButton3").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=3});$("#jqxRadioButton4").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=4});$("#jqxRadioButton5").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=5});$("#jqxRadioButton6").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=6});$("#jqxRadioButton7").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=7});$("#Start").jqxButton({template:"success",width:"100px",theme:theme,disabled:true});$("#Start").click(function(){if(a==1){window.open("prod_beerxml.php?record="+my_record)}else{if(a==2){window.open("prod_duplicate.php?record="+my_record)}else{if(a==3){window.open("prod_divide.php?record="+my_record)}else{if(a==4){window.open("prod_torecipe.php?record="+my_record)}else{if(a==5){window.open("prod_print.php?record="+my_record)}else{if(a==6){window.open("prod_checklist.php?record="+my_record)}else{if(a==7){window.open("prod_forum.php?record="+my_record)}}}}}}}window.location.href="prod_edit.php?record="+my_record+"&return="+my_return})}); \ No newline at end of file +$(document).ready(function(){var a=0;$("#name").html(my_name);$("#code").html(my_code);$("#jqxRadioButton1").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton2").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton3").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton4").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton5").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton6").jqxRadioButton({theme:theme,width:250,height:23});$("#jqxRadioButton7").jqxRadioButton({theme:theme,width:250,height:23});if((my_split!=0)||(my_stage>=6)){$("#jqxRadioButton3").jqxRadioButton({disabled:true});document.getElementById("pmpt3").style.color="red"}$("#jqxRadioButton1").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=1});$("#jqxRadioButton2").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=2});$("#jqxRadioButton3").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=3});$("#jqxRadioButton4").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=4});$("#jqxRadioButton5").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=5});$("#jqxRadioButton6").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=6});$("#jqxRadioButton7").on("checked",function(b){$("#Start").jqxButton({disabled:false});a=7});$("#Start").jqxButton({template:"success",width:"100px",theme:theme,disabled:true});$("#Start").click(function(){if(a==1){window.open("prod_beerxml.php?record="+my_record)}else{if(a==2){window.open("prod_duplicate.php?record="+my_record)}else{if(a==3){window.location.href="prod_divide.php?record="+my_record+"&return="+my_return}else{if(a==4){window.open("prod_torecipe.php?record="+my_record)}else{if(a==5){window.open("prod_print.php?record="+my_record)}else{if(a==6){window.open("prod_checklist.php?record="+my_record)}else{if(a==7){window.open("prod_forum.php?record="+my_record)}}}}}}}if(a!=3){window.location.href="prod_edit.php?record="+my_record+"&return="+my_return}})}); \ No newline at end of file diff -r 0fe366d953ab -r 10c6eeee60ce www/js/prod_export.js --- a/www/js/prod_export.js Wed Sep 18 14:40:34 2019 +0200 +++ b/www/js/prod_export.js Wed Sep 18 22:50:44 2019 +0200 @@ -34,8 +34,9 @@ $("#jqxRadioButton5").jqxRadioButton({ theme: theme, width: 250, height: 23 }); $("#jqxRadioButton6").jqxRadioButton({ theme: theme, width: 250, height: 23 }); $("#jqxRadioButton7").jqxRadioButton({ theme: theme, width: 250, height: 23 }); - if (my_split != 0) { + if ((my_split != 0) || (my_stage >= 6)) { $("#jqxRadioButton3").jqxRadioButton({ disabled: true }); + document.getElementById("pmpt3").style.color = "red"; } $('#jqxRadioButton1').on('checked', function (event) { @@ -74,7 +75,7 @@ } else if (choice == 2) { window.open('prod_duplicate.php?record=' + my_record); } else if (choice == 3) { - window.open('prod_divide.php?record=' + my_record); + window.location.href = 'prod_divide.php?record=' + my_record + '&return=' + my_return; } else if (choice == 4) { window.open('prod_torecipe.php?record=' + my_record); } else if (choice == 5) { @@ -85,7 +86,8 @@ window.open('prod_forum.php?record=' + my_record); } // Return to the original product - window.location.href = "prod_edit.php?record=" + my_record + "&return=" + my_return; + if (choice != 3) + window.location.href = "prod_edit.php?record=" + my_record + "&return=" + my_return; }); }); diff -r 0fe366d953ab -r 10c6eeee60ce www/prod_divide.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/prod_divide.php Wed Sep 18 22:50:44 2019 +0200 @@ -0,0 +1,37 @@ + + +
+
+ + + + + + + + + + + + + + + + + + + +
Splits product
 
Brouw naam:Brouw fase:
Brouw code:Splits moment:
 
+
+ + +
+
+
+ + diff -r 0fe366d953ab -r 10c6eeee60ce www/prod_export.php --- a/www/prod_export.php Wed Sep 18 14:40:34 2019 +0200 +++ b/www/prod_export.php Wed Sep 18 22:50:44 2019 +0200 @@ -25,10 +25,7 @@
- >Splits dit product: +
Splits dit product: