');a6.append('');a6.append('');$("#maddrowbutton").jqxDropDownList({placeHolder:"Kies ingrediënt:",theme:theme,template:"primary",source:misclist,disabled:(d.stage>3),displayMember:"name",width:150,height:27,dropDownWidth:500,dropDownHeight:500});$("#maddrowbutton").on("select",function(bb){if(bb.args){var a9=bb.args.index;var ba=misclist.records[a9];var bd={};bd.m_name=ba.name;bd.m_amount=0;bd.m_cost=ba.cost;bd.m_type=ba.type;bd.m_use_use=ba.use_use;bd.m_time=0;bd.m_amount_is_weight=ba.amount_is_weight;bd.m_inventory=ba.inventory;var bc=$("#miscGrid").jqxGrid("addrow",null,bd)}});$("#minstockbutton").jqxCheckBox({theme:theme,height:27,disabled:(d.stage>3)});$("#minstockbutton").on("change",function(a9){miscinstock=a9.args.checked;misclist.dataBind()});$("#mdeleterowbutton").jqxButton({template:"danger",theme:theme,height:27,width:150,disabled:(d.stage>3)});$("#mdeleterowbutton").on("click",function(){var a9=$("#miscGrid").jqxGrid("getselectedrowindex");var bd=$("#miscGrid").jqxGrid("getdatainformation").rowscount;var ba=$("#miscGrid").jqxGrid("getcellvalue",a9,"m_type");if(a9>=0&&a9"+MiscTypeData[ba].nl+""}},{text:"Gebruik",width:140,datafield:"m_use_use",cellsrenderer:function(a7,a6,ba,a9,a8,bb){return""+MiscUseData[ba].nl+""}},{text:"Tijd",datafield:"m_time",width:90,align:"right",cellsrenderer:function(a7,a6,ba,a9,a8,bc){var bb="";if(bc.m_use_use==2){bb=ai.formatNumber(ba,"f0")+" min."}else{if((bc.m_use_use==3)||(bc.m_use_use==4)){bb=ai.formatNumber(ba/1440,"f0")+" dagen"}}return''+bb+""},},{text:"Hoeveel",datafield:"m_amount",width:110,align:"right",cellsrenderer:function(a7,a6,bb,a9,a8,bc){var ba=bc.m_amount_is_weight?"gr":"ml";return''+ai.formatNumber(bb*1000,"f2")+" "+ba+""}},{text:"Voorraad",datafield:"m_inventory",width:110,align:"right",cellsrenderer:function(ba,a6,bb,bd,a7,be){if(((d.inventory_reduced<=2)&&(be.m_use_use<=2))||((d.inventory_reduced<=3)&&(be.m_use_use==3))||((d.inventory_reduced<=5)&&(be.m_use_use==4))||((d.inventory_reduced<=6)&&(be.m_use_use==5))){var bc=be.m_amount_is_weight?"gr":"ml";var a8="#ffffff";if(bb'+a9+""}else{return""}}},{text:"",datafield:"Edit",columntype:"button",width:100,align:"center",cellsrenderer:function(){return"Wijzig"},buttonclick:function(a6){ax=a6;aI=$("#miscGrid").jqxGrid("getrowdata",ax);if(d.stage>3){alert("Ingredieënt is al verwerkt.")}else{if(aI.m_type==4){alert("Brouwzouten wijzigen in de water tab.")}else{console.log("edit button row "+a6);if(aI.m_amount_is_weight){$("#wm_pmpt_amount").html("Gewicht gram:")}else{$("#wm_pmpt_amount").html("Volume ml:")}$("#wm_name").val(aI.m_name);$("#wm_amount").val(aI.m_amount*1000);if((aI.m_use_use==3)||(aI.m_use_use==4)){$("#wm_time").val(aI.m_time/1440)}else{$("#wm_time").val(aI.m_time)}$("#wm_use_use").val(aI.m_use_use);$("#popupMisc").jqxWindow("open")}}}}]})};var aN=function(a4){var i={localdata:a4.yeasts,datatype:"local",cache:false,async:false,datafields:[{name:"y_name",type:"string"},{name:"y_laboratory",type:"string"},{name:"y_product_id",type:"string"},{name:"y_amount",type:"float"},{name:"y_cost",type:"float"},{name:"y_type",type:"int"},{name:"y_form",type:"int"},{name:"y_flocculation",type:"int"},{name:"y_min_temperature",type:"float"},{name:"y_max_temperature",type:"float"},{name:"y_attenuation",type:"float"},{name:"y_use",type:"int"},{name:"y_cells",type:"float"},{name:"y_tolerance",type:"float"},{name:"y_inventory",type:"float"},{name:"y_avail",type:"int"}],addrow:function(a7,a9,a6,a8){console.log("yeast addrow "+a7);a8(true)},deleterow:function(a6,a7){console.log("yeast deleterow "+a6);a7(true)},updaterow:function(a6,a8,a7){console.log("yeast updaterow "+a6);a7(true)}};var a5=new $.jqx.dataAdapter(i);$("#yeastGrid").jqxGrid({width:1240,height:350,source:a5,theme:theme,selectionmode:"singlerow",showtoolbar:true,rendertoolbar:function(a8){var a7=this;var a6=$("");a8.append(a6);a6.append('');a6.append('
In voorraad:
');a6.append('');a6.append('');$("#yaddrowbutton").jqxDropDownList({placeHolder:"Kies gist:",theme:theme,source:yeastlist,disabled:(d.stage>3),template:"primary",displayMember:"name",width:150,height:27,dropDownWidth:500,dropDownHeight:500,renderer:function(ba,a9,bc){var bb=yeastlist.records[ba];return bb.laboratory+" "+bb.product_id+" "+bb.name}});$("#yaddrowbutton").on("select",function(bb){if(bb.args){var a9=bb.args.index;var ba=yeastlist.records[a9];var bd={};bd.y_name=ba.name;bd.y_laboratory=ba.laboratory;bd.y_product_id=ba.product_id;bd.y_type=ba.type;bd.y_form=ba.form;bd.y_amount=0;bd.y_cost=ba.cost;bd.y_use=0;bd.y_min_temperature=ba.min_temperature;bd.y_max_temperature=ba.max_temperature;bd.y_attenuation=ba.attenuation;bd.y_flocculation=ba.flocculation;bd.y_cells=ba.cells;bd.y_tolerance=ba.tolerance;bd.y_inventory=ba.inventory;var bc=$("#yeastGrid").jqxGrid("addrow",null,bd)}Z();$("#yaddrowbutton").jqxDropDownList("clearSelection")});$("#yinstockbutton").jqxCheckBox({theme:theme,height:27,disabled:(d.stage>3)});$("#yinstockbutton").on("change",function(a9){yeastinstock=a9.args.checked;yeastlist.dataBind()});$("#ydeleterowbutton").jqxButton({template:"danger",theme:theme,height:27,width:150,disabled:(d.stage>3)});$("#ydeleterowbutton").on("click",function(){var a9=$("#yeastGrid").jqxGrid("getselectedrowindex");var bc=$("#yeastGrid").jqxGrid("getdatainformation").rowscount;if(a9>=0&&a9'+YeastFormData[ba].nl+""}},{text:"Min. °C",width:70,align:"right",cellsalign:"right",datafield:"y_min_temperature"},{text:"Max. °C",width:70,align:"right",cellsalign:"right",datafield:"y_max_temperature"},{text:"Tol. %",width:60,align:"right",cellsalign:"right",datafield:"y_tolerance",cellsrenderer:function(a8,a7,bc,bb,ba,bd){var a6="#ffffff";var a9="";if(bc>0){a9=ai.formatNumber(bc,"f1");if(d.est_abv>bc){a6="#ff4040"}}return''+a9+""}},{text:"Attn. %",width:70,align:"right",cellsalign:"right",datafield:"y_attenuation",cellsformat:"f1"},{text:"Voor",width:120,datafield:"y_use",cellsrenderer:function(a7,a6,ba,a9,a8,bb){return''+YeastUseData[ba].nl+""}},{text:"Hoeveel",datafield:"y_amount",width:90,align:"right",cellsrenderer:function(a7,a6,bb,ba,a9,bc){var a8=ai.formatNumber(bb*1000,"f0")+" ml";if(bc.y_form==0){a8=ai.formatNumber(bb,"f0")+" pk"}else{if(bc.y_form==1){a8=ai.formatNumber(bb*1000,"f1")+" gr"}}return''+a8+""}},{text:"Voorraad",datafield:"y_inventory",width:90,align:"right",cellsrenderer:function(a8,a7,bc,bb,ba,bd){if(((d.inventory_reduced<=3)&&(bd.y_use==0))||((d.inventory_reduced<=4)&&(bd.y_use==1))||((d.inventory_reduced<=5)&&(bd.y_use==2))||((d.inventory_reduced<=6)&&(bd.y_use==3))){var a6="#ffffff";if(bc'+a9+""}else{return""}}},{text:"",datafield:"Edit",columntype:"button",width:90,align:"center",cellsrenderer:function(){return"Wijzig"},buttonclick:function(a6){if(d.stage>3){alert("Ingredieënt is al verwerkt.")}else{aF=a6;f=$("#yeastGrid").jqxGrid("getrowdata",aF);if(f.y_form==0){$("#wy_pmpt_amount").html("Pak(ken):");$("#wy_amount").val(f.y_amount);$("#wy_amount").jqxNumberInput({decimalDigits:0})}else{if(f.y_form==1){$("#wy_pmpt_amount").html("Gewicht gram:");$("#wy_amount").val(f.y_amount*1000);$("#wy_amount").jqxNumberInput({decimalDigits:1})}else{$("#wy_pmpt_amount").html("Volume ml:");$("#wy_amount").val(f.y_amount*1000);$("#wy_amount").jqxNumberInput({decimalDigits:0})}}$("#wy_name").val(f.y_name);$("#wy_laboratory").val(f.y_laboratory);$("#wy_product_id").val(f.y_product_id);$("#wy_use").val(f.y_use);$("#popupYeast").jqxWindow("open")}}}]})};var av=function(a5){var a4={localdata:a5.mashs,datatype:"local",cache:false,async:false,datafields:[{name:"step_name",type:"string"},{name:"step_type",type:"int"},{name:"step_infuse_amount",type:"float"},{name:"step_temp",type:"float"},{name:"step_time",type:"float"},{name:"step_thickness",type:"float"},{name:"ramp_time",type:"float"},{name:"end_temp",type:"float"}],addrow:function(a7,a9,a6,a8){a8(true)},deleterow:function(a6,a7){a7(true)}};var i=new $.jqx.dataAdapter(a4,{beforeLoadComplete:function(a6){D=0;var a8=new Array();for(var a7=0;a7");a8.append(a6);a6.append('');a6.append('');$("#saddrowbutton").jqxButton({template:"primary",theme:theme,height:27,width:150,disabled:(d.stage>3)});$("#saddrowbutton").on("click",function(){var bb=$("#mashGrid").jqxGrid("getdatainformation").rowscount;var ba={};ba.step_name="Stap "+(bb+1);if(bb>0){ba.step_type=1}else{ba.step_type=0;ba.step_infuse_amount=15}ba.step_temp=62;ba.step_time=20;ba.step_thickness=0;ba.ramp_time=1;ba.end_temp=62;var a9=$("#mashGrid").jqxGrid("addrow",null,ba)});$("#sdeleterowbutton").jqxButton({template:"danger",theme:theme,height:27,width:150,disabled:(d.stage>3)});$("#sdeleterowbutton").on("click",function(){var a9=$("#mashGrid").jqxGrid("getselectedrowindex");var bc=$("#mashGrid").jqxGrid("getdatainformation").rowscount;if(a9>=0&&a9'+MashStepTypeData[ba].nl+""}},{text:"Start °C",datafield:"step_temp",width:90,align:"right",cellsalign:"right",cellsformat:"f1"},{text:"Eind °C",datafield:"end_temp",width:90,align:"right",cellsalign:"right",cellsformat:"f1"},{text:"Rust min.",datafield:"step_time",width:90,align:"right",cellsalign:"right"},{text:"Stap min.",datafield:"ramp_time",width:90,align:"right",cellsalign:"right"},{text:"Infuse L.",datafield:"step_infuse_amount",width:90,align:"right",cellsalign:"right",cellsformat:"f1"},{text:"L/Kg.",datafield:"step_thickness",width:90,align:"right",cellsalign:"right",cellsformat:"f2"},{text:"",datafield:"Edit",columntype:"button",width:100,align:"center",cellsrenderer:function(){return"Wijzig"},buttonclick:function(a6){if(d.stage>3){alert("Het maichen is al gedaan.")}else{al=a6;E=$("#mashGrid").jqxGrid("getrowdata",al);$("#wstep_name").val(E.step_name);$("#wstep_type").val(E.step_type);$("#wstep_infuse_amount").val(E.step_infuse_amount);$("#wstep_temp").val(E.step_temp);$("#wend_temp").val(E.end_temp);$("#wstep_time").val(E.step_time);$("#wramp_time").val(E.ramp_time);if(E.step_type==0){$("#wstep_infuse_amount").show();$("#wstep_pmpt").show()}else{$("#wstep_infuse_amount").hide();$("#wstep_pmpt").hide()}$("#popupMash").jqxWindow("open")}}}]})};$("#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});$("#birth").jqxTooltip({content:"De ontwerp datum van dit product."});$("#birth").jqxInput({theme:theme,width:120,height:23});$("#stage").jqxTooltip({content:"De productie fase van dit product."});$("#stage").jqxInput({theme:theme,width:100,height:23});$("#locked").jqxCheckBox({theme:theme,width:120,height:23,disabled:true});$("#locked").on("checked",function(i){if(d.stage>=10){d.locked=1;d.stage=11;aW()}});$("#locked").on("unchecked",function(i){if(d.stage>=10){d.locked=0;d.stage=10;aW()}});$("#notes").jqxTooltip({content:"De uitgebreide opmerkingen over dit product."});$("#notes").jqxInput({theme:theme,width:960,height:100});$("#type").jqxTooltip({content:"Het brouw type van dit recept."});$("#type").jqxDropDownList({theme:theme,source:RecipeTypeAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#efficiency").jqxTooltip({content:"Het rendement van maischen en koken."});$("#efficiency").jqxNumberInput(Perc1dec);$("#batch_size").jqxTooltip({content:"Het volume van het gekoelde wort na het koken."});$("#batch_size").jqxNumberInput(Spin1dec);$("#batch_size").jqxNumberInput({min:4});$("#boil_time").jqxTooltip({content:"De kooktijd in minuten."});$("#boil_time").jqxNumberInput(PosInt);$("#boil_time").jqxNumberInput({min:4,max:360});$("#boil_size").jqxTooltip({content:"Het volume van het wort voor het koken."});$("#boil_size").jqxNumberInput({inputMode:"simple",theme:theme,width:90,height:23,decimalDigits:2,readOnly:true});$("#st_guide").jqxTooltip({content:"De bierstijl gids voor dit recept."});$("#st_guide").jqxInput({theme:theme,width:250,height:23});$("#st_name").jqxTooltip({content:"De bierstijl naam voor dit recept."});$("#st_name").jqxInput({theme:theme,width:250,height:23});$("#st_letter").jqxTooltip({content:"De bierstijl letter voor dit recept."});$("#st_letter").jqxInput({theme:theme,width:90,height:23});$("#st_type").jqxTooltip({content:"Het bierstijl type."});$("#st_type").jqxInput({theme:theme,width:250,height:23});$("#st_category").jqxTooltip({content:"De Amerikaanse bierstijl categorie."});$("#st_category").jqxInput({theme:theme,width:250,height:23});$("#st_category_number").jqxTooltip({content:"De Amerikaanse bierstijl categorie sub nummer."});$("#st_category_number").jqxNumberInput(Smal0dec);$("#est_og").jqxTooltip({content:"Het begin SG wat je wilt bereiken. De moutstort wordt automatisch herberekend."});$("#est_og").jqxNumberInput(SGopts);$("#st_og_min").jqxTooltip({content:"Het minimum begin SG voor deze bierstijl."});$("#st_og_min").jqxNumberInput({inputMode:"simple",theme:theme,width:50,height:23,decimalDigits:3,readOnly:true});$("#st_og_max").jqxTooltip({content:"Het maximum begin SG voor deze bierstijl."});$("#st_og_max").jqxNumberInput({inputMode:"simple",theme:theme,width:50,height:23,decimalDigits:3,readOnly:true});$("#est_fg").jqxTooltip({content:"Het verwachte eind SG. Dit wordt automatisch berekend."});$("#est_fg").jqxNumberInput(Show3dec);$("#st_fg_min").jqxTooltip({content:"Het minimum eind SG voor deze bierstijl."});$("#st_fg_min").jqxNumberInput({inputMode:"simple",theme:theme,width:50,height:23,decimalDigits:3,readOnly:true});$("#st_fg_max").jqxTooltip({content:"Het maximum eind SG voor deze bierstijl."});$("#st_fg_max").jqxNumberInput({inputMode:"simple",theme:theme,width:50,height:23,decimalDigits:3,readOnly:true});$("#est_abv").jqxTooltip({content:"Alcohol volume %. Dit wordt automatisch berekend."});$("#est_abv").jqxNumberInput(Smal1dec);$("#st_abv_min").jqxTooltip({content:"Het minimum alcohol volume % voor deze bierstijl."});$("#st_abv_min").jqxNumberInput(Smal1dec);$("#st_abv_max").jqxTooltip({content:"Het maximum alcohol volume % voor deze bierstijl."});$("#st_abv_max").jqxNumberInput(Smal1dec);$("#est_color").jqxTooltip({content:"De kleur in EBC. Dit wordt automatisch berekend."});$("#est_color").jqxNumberInput(Show0dec);$("#st_color_min").jqxTooltip({content:"De minimum kleur voor deze bierstijl."});$("#st_color_min").jqxNumberInput(Smal0dec);$("#st_color_max").jqxTooltip({content:"De maximum kleur voor deze bierstijl."});$("#st_color_max").jqxNumberInput(Smal0dec);$("#color_method").jqxDropDownList({theme:theme,source:ColorMethodAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#est_ibu").jqxTooltip({content:"De bitterheid in IBU. Dit wordt automatisch berekend."});$("#est_ibu").jqxNumberInput(Show0dec);$("#st_ibu_min").jqxTooltip({content:"De minimum bitterheid voor deze bierstijl."});$("#st_ibu_min").jqxNumberInput(Smal0dec);$("#st_ibu_max").jqxTooltip({content:"De maximum bitterheid voor deze bierstijl."});$("#st_ibu_max").jqxNumberInput(Smal0dec);$("#ibu_method").jqxDropDownList({theme:theme,source:IBUmethodAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true,dropDownVerticalAlignment:"top"});$("#kcal").jqxTooltip({content:"Energie-inhoud in kcal/liter."});$("#kcal").jqxNumberInput(Smal0dec);$("#est_carb").jqxTooltip({content:"Koolzuur volume. Dit wordt automatisch berekend."});$("#est_carb").jqxNumberInput(Smal1dec);$("#st_carb_min").jqxTooltip({content:"Het minimum koolzuur volume voor deze bierstijl."});$("#st_carb_min").jqxNumberInput(Smal1dec);$("#st_carb_max").jqxTooltip({content:"Het maximum koolzuur volume voor deze bierstijl."});$("#st_carb_max").jqxNumberInput(Smal1dec);$("#eq_name").jqxTooltip({content:"De naam van deze brouw apparatuur."});$("#eq_name").jqxInput({theme:theme,width:250,height:23});$("#eq_boil_size").jqxTooltip({content:"Normaal kook volume in liters"});$("#eq_boil_size").jqxNumberInput(Show1dec);$("#eq_batch_size").jqxTooltip({content:"Berekende batch grootte in liters aan het eind van de kook."});$("#eq_batch_size").jqxNumberInput(Show1dec);$("#eq_tun_volume").jqxTooltip({content:"Maisch ketel volume."});$("#eq_tun_volume").jqxNumberInput(Show1dec);$("#eq_top_up_water").jqxTooltip({content:"Extra water in het gistvat."});$("#eq_top_up_water").jqxNumberInput(Show1dec);$("#eq_trub_chiller_loss").jqxTooltip({content:"Standaard verlies bij het overbrengen naar het gistvat."});$("#eq_trub_chiller_loss").jqxNumberInput(Show1dec);$("#eq_evap_rate").jqxTooltip({content:"Verdamping in liters per uur."});$("#eq_evap_rate").jqxNumberInput(Show2dec);$("#eq_boil_time").jqxTooltip({content:"Normale kooktijd in minuten."});$("#eq_boil_time").jqxNumberInput(Show0dec);$("#eq_top_up_kettle").jqxTooltip({content:"Extra water toevoegen tijdens de kook."});$("#eq_top_up_kettle").jqxNumberInput(Show1dec);$("#eq_hop_utilization").jqxTooltip({content:"100% voor kleine installaties, hoger voor grote brouwerijen."});$("#eq_hop_utilization").jqxNumberInput(Show0dec);$("#eq_notes").jqxTooltip({content:"Opmerkingen over deze apparatuur."});$("#eq_notes").jqxInput({theme:theme,width:960,height:200});$("#eq_lauter_volume").jqxTooltip({content:"Filterkuip volume."});$("#eq_lauter_volume").jqxNumberInput(Show1dec);$("#eq_lauter_deadspace").jqxTooltip({content:"Filterkuip verlies in liters."});$("#eq_lauter_deadspace").jqxNumberInput(Show1dec);$("#eq_kettle_volume").jqxTooltip({content:"Kook ketel volume in liters."});$("#eq_kettle_volume").jqxNumberInput(Show1dec);$("#eq_mash_volume").jqxTooltip({content:"Maisch water voor de eerste stap."});$("#eq_mash_volume").jqxNumberInput(Show1dec);$("#eq_mash_max").jqxTooltip({content:"De maximale moutstort in Kg."});$("#eq_mash_max").jqxNumberInput(Show1dec);$("#eq_efficiency").jqxTooltip({content:"Gemiddeld brouwzaal rendement."});$("#eq_efficiency").jqxNumberInput(Show1dec);$("#est_color2").jqxTooltip({content:"De kleur in EBC. Dit wordt automatisch berekend."});$("#est_color2").jqxNumberInput(Show0dec);$("#est_og2").jqxTooltip({content:"Het geschatte begin SG van dit product."});$("#est_og2").jqxNumberInput(Show3dec);$("#mash_kg").jqxTooltip({content:"Het gewicht van alle mouten in de maisch."});$("#mash_kg").jqxNumberInput(Show3dec);$("#perc_malts").jqxProgressBar({width:300,height:23,theme:theme,showText:true,max:120,animationDuration:0,colorRanges:[{stop:90,color:"#008C00"},{stop:100,color:"#EB7331"},{stop:120,color:"#FF0000"}],renderText:function(i){return(Math.round(parseInt(i)*1.2))+"%"}});$("#perc_sugars").jqxProgressBar({width:300,height:23,theme:theme,showText:true,max:50,animationDuration:0,colorRanges:[{stop:20,color:"#008C00"},{stop:50,color:"#FF0000"}],renderText:function(i){return(Math.round(parseInt(i)*5)/10)+"%"}});$("#perc_cara").jqxProgressBar({width:300,height:23,theme:theme,showText:true,max:50,animationDuration:0,colorRanges:[{stop:25,color:"#008C00"},{stop:50,color:"#FF0000"}],renderText:function(i){return(Math.round(parseInt(i)*5)/10)+"%"}});$("#ferm_lintner").jqxProgressBar({width:300,height:23,theme:theme,showText:true,max:200,animationDuration:0,colorRanges:[{stop:30,color:"#FF0000"},{stop:40,color:"#EB7331"},{stop:200,color:"#008C00"}],renderText:function(i){return(parseInt(i)*2)+" lintner"}});$("#popupFermentable").jqxWindow({width:800,height:300,position:{x:230,y:100},resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#FermentableReady"),modalOpacity:0.4});$("#FermentableReady").jqxButton({template:"success",width:"90px",theme:theme});$("#FermentableReady").click(function(){var i=$("#fermentableGrid").jqxGrid("getrowid",u);console.log("FermentableReady row:"+u+" ID:"+i);var a4={f_name:aM.f_name,f_origin:aM.f_origin,f_supplier:aM.f_supplier,f_amount:aM.f_amount,f_cost:aM.f_cost,f_type:aM.f_type,f_yield:aM.f_yield,f_color:aM.f_color,f_coarse_fine_diff:aM.f_coarse_fine_diff,f_moisture:aM.f_moisture,f_diastatic_power:aM.f_diastatic_power,f_protein:aM.f_protein,f_max_in_batch:aM.f_max_in_batch,f_graintype:aM.f_graintype,f_added:aM.f_added,f_dissolved_protein:aM.f_dissolved_protein,f_recommend_mash:aM.f_recommend_mash,f_add_after_boil:aM.f_add_after_boil,f_adjust_to_total_100:aM.f_adjust_to_total_100,f_percentage:aM.f_percentage,f_di_ph:aM.f_di_ph,f_acid_to_ph_57:aM.f_acid_to_ph_57,f_inventory:aM.f_inventory,f_avail:aM.f_avail};$("#fermentableGrid").jqxGrid("updaterow",i,a4);aX();V();au();aP()});$("#wf_name").jqxInput({theme:theme,width:320,height:23});$("#wf_instock").jqxCheckBox({theme:theme,height:23});$("#wf_instock").on("change",function(i){fermentableinstock=i.args.checked;fermentablelist.dataBind()});$("#wf_select").jqxDropDownList({placeHolder:"Kies mout:",theme:theme,source:fermentablelist,displayMember:"name",width:150,height:23,dropDownWidth:500,dropDownHeight:500,renderer:function(a4,i,a6){var a5=fermentablelist.records[a4];return a5.supplier+" / "+a5.name+" ("+a5.color+" EBC)"}});$("#wf_select").on("select",function(a5){if(a5.args){var i=a5.args.index;var a4=fermentablelist.records[i];$("#wf_name").val(a4.name);aM.f_name=a4.name;aM.f_origin=a4.origin;aM.f_supplier=a4.supplier;aM.f_type=a4.type;aM.f_cost=a4.cost;aM.f_yield=a4.yield;aM.f_color=a4.color;aM.f_coarse_fine_diff=a4.coarse_fine_diff;aM.f_moisture=a4.moisture;aM.f_diastatic_power=a4.diastatic_power;aM.f_protein=a4.protein;aM.f_max_in_batch=a4.max_in_batch;aM.f_graintype=a4.graintype;aM.f_dissolved_protein=a4.dissolved_protein;aM.f_recommend_mash=a4.recommend_mash;aM.f_add_after_boil=a4.add_after_boil;aM.f_di_ph=a4.di_ph;aM.f_acid_to_ph_57=a4.acid_to_ph_57;aM.f_inventory=a4.inventory}});$("#wf_amount").jqxNumberInput(Spin3dec);$("#wf_amount").on("change",function(i){console.log("amount changed: "+i.args.value);$("#fermentableGrid").jqxGrid("setcellvalue",u,"f_amount",i.args.value);aM.f_amount=i.args.value;if(!k){aX();V();au();aP()}});$("#wf_percentage").jqxNumberInput(Perc1dec);$("#wf_percentage").on("change",function(a4){var a5=Math.round(aM.f_percentage*10)/10;var a6=a4.args.value;console.log("percentage changed: "+a6+" old: "+a5);aM.f_percent=a6;var ba=$("#fermentableGrid").jqxGrid("getdatainformation").rowscount;if((a5!=a6)&&(ba>1)){var bc=$("#fermentableGrid").jqxGrid("getrowdata",u);if(bc.f_adjust_to_total_100){$("#wf_percentage").val(a5)}else{var bb=a6-a5;var a7=0;for(af=0;afparseFloat($("#boil_time").jqxNumberInput("decimal"))){a4=parseFloat($("#boil_time").jqxNumberInput("decimal"));$("#wh_time").val(a4)}e.h_time=a4}else{if(e.h_useat==4){if(a4>120){a4=120;$("#wh_time").val(a4)}e.h_time=a4}else{if(e.h_useat==5){if(a4>21){a4=21;$("#wh_time").val(a4)}e.h_time=a4*1440}}}var a5=toIBU(e.h_useat,e.h_form,am,parseFloat($("#batch_size").jqxNumberInput("decimal")),parseFloat(e.h_amount),parseFloat(e.h_time),parseFloat(e.h_alpha),$("#ibu_method").val());$("#wh_ibu").val(a5)});$("#wh_useat").jqxDropDownList({theme:theme,source:HopUseAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true,dropDownVerticalAlignment:"top"});$("#wh_useat").on("select",function(a4){if(a4.args){var i=a4.args.index;e.h_useat=i;if((i==0)||(i==1)){e.h_time=parseFloat(d.boil_time);$("#wh_time").jqxNumberInput({spinButtons:false,readOnly:true,width:90});$("#wh_time").val(e.h_time)}else{if(i==3){e.h_time=0;$("#wh_time").jqxNumberInput({spinButtons:false,readOnly:true,width:90});$("#wh_time").val(0)}else{$("#wh_time").jqxNumberInput({spinButtons:true,readOnly:false,width:110})}}if(i==5){$("#wh_pmpt_time").html("Tijd in dagen")}else{$("#wh_pmpt_time").html("Tijd in minuten")}}});$("#popupMisc").jqxWindow({width:800,height:275,position:{x:230,y:100},resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#MiscReady"),modalOpacity:0.4});$("#MiscReady").jqxButton({template:"success",width:"90px",theme:theme});$("#MiscReady").click(function(){var i=$("#miscGrid").jqxGrid("getrowid",ax);console.log("MiscReady row:"+ax+" ID:"+i);var a4={m_name:aI.m_name,m_amount:aI.m_amount,m_cost:aI.m_cost,m_type:aI.m_type,m_use_use:aI.m_use_use,m_time:aI.m_time,m_amount_is_weight:aI.m_amount_is_weight,m_inventory:aI.m_inventory,m_avail:aI.m_avail};$("#miscGrid").jqxGrid("updaterow",i,a4);aH()});$("#wm_name").jqxInput({theme:theme,width:320,height:23});$("#wm_instock").jqxCheckBox({theme:theme,height:23});$("#wm_instock").on("change",function(i){miscinstock=i.args.checked;misclist.dataBind()});$("#wm_select").jqxDropDownList({placeHolder:"Kies ingrediënt:",theme:theme,source:misclist,displayMember:"name",width:150,height:23,dropDownWidth:500,dropDownHeight:500});$("#wm_select").on("select",function(a5){if(a5.args){var i=a5.args.index;var a4=misclist.records[i];$("#wm_name").val(a4.name);aI.m_name=a4.name;aI.m_cost=a4.cost;aI.m_type=a4.type;aI.m_use_use=a4.use_use;aI.m_amount_is_weight=a4.amount_is_weight;aI.m_inventory=a4.inventory}});$("#wm_amount").jqxNumberInput(Spin2dec);$("#wm_amount").on("change",function(i){console.log("amount changed: "+i.args.value);aI.m_amount=parseFloat(i.args.value)/1000});$("#wm_time").jqxNumberInput(PosInt);$("#wm_time").on("change",function(i){console.log("time changed: "+i.args.value);var a4=parseFloat(i.args.value);if(aI.m_use_use==2){if(a4>parseFloat($("#boil_time").jqxNumberInput("decimal"))){a4=parseFloat($("#boil_time").jqxNumberInput("decimal"));$("#wm_time").val(a4)}aI.m_time=a4}else{if((aI.m_use_use==3)||(aI.m_use_use==4)){if(a4>21){a4=21;$("#wm_time").val(a4)}aI.m_time=a4*1440}}});$("#wm_use_use").jqxDropDownList({theme:theme,source:MiscUseAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true,dropDownVerticalAlignment:"top"});$("#wm_use_use").on("select",function(a4){if(a4.args){var i=a4.args.index;aI.m_use_use=i;if((i==2)||(i==3)||(i==4)){$("#wm_time").jqxNumberInput({spinButtons:true,readOnly:false,width:110})}else{$("#wm_time").jqxNumberInput({spinButtons:false,readOnly:true,width:90});$("#wm_time").val(0);aI.m_time=0}}});$("#est_fg2").jqxTooltip({content:"Het verwachte eind SG. Dit wordt automatisch berekend."});$("#est_fg2").jqxNumberInput(Show3dec);$("#est_abv2").jqxTooltip({content:"Alcohol volume %. Dit wordt automatisch berekend."});$("#est_abv2").jqxNumberInput(Smal1dec);$("#yeast_cells").jqxNumberInput(Show1dec);$("#need_cells").jqxNumberInput(Show1dec);$("#plato_cells").jqxNumberInput(Show2dec);$("#popupYeast").jqxWindow({width:800,height:300,position:{x:230,y:100},resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#YeastReady"),modalOpacity:0.4});$("#YeastReady").jqxButton({template:"success",width:"90px",theme:theme});$("#YeastReady").click(function(){var i=$("#yeastGrid").jqxGrid("getrowid",aF);console.log("YeastReady row:"+aF+" ID:"+i);var a4={y_name:f.y_name,y_laboratory:f.y_laboratory,y_product_id:f.y_product_id,y_amount:f.y_amount,y_cost:f.y_cost,y_type:f.y_type,y_form:f.y_form,y_flocculation:f.y_flocculation,y_min_temperature:f.y_min_temperature,y_max_temperature:f.y_max_temperature,y_attenuation:f.y_attenuation,y_use:f.y_use,y_cells:f.y_cells,y_tolerance:f.y_tolerance,y_inventory:f.y_inventory,y_avail:f.y_avail};$("#yeastGrid").jqxGrid("updaterow",i,a4);V();Z()});$("#wy_name").jqxInput({theme:theme,width:320,height:23});$("#wy_laboratory").jqxInput({theme:theme,width:320,height:23});$("#wy_product_id").jqxInput({theme:theme,width:320,height:23});$("#wy_instock").jqxCheckBox({theme:theme,height:23});$("#wy_instock").on("change",function(i){yeastinstock=i.args.checked;yeastlist.dataBind()});$("#wy_select").jqxDropDownList({placeHolder:"Kies gist:",theme:theme,source:yeastlist,displayMember:"name",width:150,height:23,dropDownWidth:500,dropDownHeight:500,renderer:function(a4,i,a6){var a5=yeastlist.records[a4];return a5.laboratory+" "+a5.product_id+" "+a5.name}});$("#wy_select").on("select",function(a5){if(a5.args){var i=a5.args.index;var a4=yeastlist.records[i];$("#wy_name").val(a4.name);$("#wy_laboratory").val(a4.laboratory);$("#wy_product_id").val(a4.product_id);f.y_name=a4.name;f.y_cost=a4.cost;f.y_type=a4.type;f.y_form=a4.form;f.y_laboratory=a4.laboratory;f.y_product_id=a4.product_id;f.y_min_temperature=a4.min_temperature;f.y_max_temperature=a4.max_temperature;f.y_flocculation=a4.flocculation;f.y_attenuation=a4.attenuation;f.y_cells=a4.cells;f.y_inventory=a4.inventory;if(f.y_form==0){$("#wy_pmpt_amount").html("Pak(ken):")}else{if(f.y_form==1){$("#wy_pmpt_amount").html("Gewicht gram:")}else{$("#wy_pmpt_amount").html("Volume ml:")}}V();Z()}});$("#wy_amount").jqxNumberInput(Spin1dec);$("#wy_amount").on("change",function(a4){console.log("amount changed: "+a4.args.value);if(f.y_form==0){var i=parseFloat(a4.args.value)}else{var i=parseFloat(a4.args.value)/1000}f.y_amount=i;V();Z()});$("#wy_use").jqxDropDownList({theme:theme,source:YeastUseAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true,dropDownVerticalAlignment:"top"});$("#wy_use").on("select",function(a4){if(a4.args){var i=a4.args.index;f.y_use=i;V();Z()}});for(var af=1;af<5;af++){$("#prop"+af+"_type").jqxDropDownList({theme:theme,source:StarterTypeAdapter,valueMember:"id",displayMember:"nl",width:120,height:23,autoDropDownHeight:true});$("#prop"+af+"_type").hide();$("#prop"+af+"_volume").jqxNumberInput(Spin3dec);$("#prop"+af+"_volume").hide();$("#prop"+af+"_irate").jqxNumberInput(Show1dec);$("#prop"+af+"_irate").hide();$("#prop"+af+"_ncells").jqxNumberInput(Show1dec);$("#prop"+af+"_ncells").hide();$("#prop"+af+"_tcells").jqxNumberInput(Show1dec);$("#prop"+af+"_tcells").hide();$("#prop"+af+"_growf").jqxNumberInput(Show2dec);$("#prop"+af+"_growf").hide()}$("#starter_enable").jqxCheckBox({theme:theme,height:23});$("#starter_type").jqxDropDownList({theme:theme,source:StarterTypeAdapter,valueMember:"id",displayMember:"nl",width:120,height:23,autoDropDownHeight:true});$("#starter_sg").jqxNumberInput(SGopts);$("#starter_viability").jqxNumberInput(Perc0);$("#starter_try").jqxButton({template:"primary",width:"100px",height:23,theme:theme});$("#mash_name").jqxTooltip({content:"De omschrijving van dit maisch profiel."});$("#mash_name").jqxInput({theme:theme,width:320,height:23});$("#mash_select").jqxDropDownList({placeHolder:"Kies schema:",theme:theme,source:mashlist,displayMember:"name",width:250,height:23,dropDownWidth:500,dropDownHeight:500,dropDownHorizontalAlignment:"right"});$("#mash_select").on("select",function(a4){if(a4.args){var ba=a4.args.index;var a9=new Array();var bc=$("#mashGrid").jqxGrid("getdisplayrows");for(var a7=0;a70){D=d.w1_amount}if(a7==0){bb.step_infuse_amount=D}else{bb.step_infuse_amount=0}if(aq>0){bb.step_thickness=parseFloat(D/aq)}else{bb.step_thickness=0}bb.step_temp=a6.step_temp;bb.end_temp=a6.end_temp;bb.step_time=a6.step_time;bb.ramp_time=a6.ramp_time;var a5=$("#mashGrid").jqxGrid("addrow",null,bb)}}});$("#popupMash").jqxWindow({width:800,height:350,position:{x:230,y:100},resizable:false,theme:theme,isModal:true,autoOpen:false,cancelButton:$("#MashReady"),modalOpacity:0.4});$("#MashReady").jqxButton({template:"success",width:"90px",theme:theme});$("#MashReady").click(function(){aP()});$("#wstep_name").jqxInput({theme:theme,width:320,height:23});$("#wstep_name").on("change",function(i){var a4=$("#mashGrid").jqxGrid("getrowdata",al);a4.step_name=i.args.value});$("#wstep_type").jqxDropDownList({theme:theme,source:MashStepTypeAdapter,valueMember:"id",displayMember:"nl",width:180,height:23,autoDropDownHeight:true});$("#wstep_type").on("select",function(a6){if(a6.args){var a4=a6.args.index;var a9=$("#mashGrid").jqxGrid("getrowdata",al);a9.step_type=a4;if(a4==0){$("#wstep_infuse_amount").show();$("#wstep_pmpt").show()}else{a9.step_infuse_amount=0;$("#wstep_infuse_amount").hide();$("#wstep_pmpt").hide()}D=0;var a7=$("#mashGrid").jqxGrid("getrows");for(var a5=0;a5=0){var a9=$("#fermentableGrid").jqxGrid("getrowid",a7);$("#fermentableGrid").jqxGrid("updaterow",a9,bb)}else{$("#fermentableGrid").jqxGrid("addrow",null,bb)}aU()}});$("#keg_priming_sugar").jqxDropDownList({placeHolder:"Kies suiker:",theme:theme,source:fermentablesugars,displayMember:"name",width:200,height:23,dropDownWidth:300,dropDownHeight:400});$("#keg_priming_sugar").on("select",function(a8){if(a8.args){var a4=a8.args.index;var a7=-1;var a6=fermentablesugars.records[a4];var ba=$("#fermentableGrid").jqxGrid("getrows");for(var a5=0;a5=0){var a9=$("#fermentableGrid").jqxGrid("getrowid",a7);$("#fermentableGrid").jqxGrid("updaterow",a9,bb)}else{$("#fermentableGrid").jqxGrid("addrow",null,bb)}aU()}});$("#bottle_priming_amount").jqxNumberInput(Show1dec);$("#bottle_priming_water").jqxTooltip({content:"De hoeveelheid water om de suiker op te lossen."});$("#bottle_priming_water").jqxNumberInput(Spin3dec);$("#keg_priming_amount").jqxNumberInput(Show1dec);$("#keg_priming_water").jqxTooltip({content:"De hoeveelheid water om de suiker op te lossen."});$("#keg_priming_water").jqxNumberInput(Spin3dec);$("#bottle_priming_total").jqxNumberInput(Show1dec);$("#bottle_pressure").jqxTooltip({content:"De maximaal te verwachten druk tijdens het hergisten."});$("#bottle_pressure").jqxNumberInput(Show1dec);$("#keg_priming_total").jqxNumberInput(Show1dec);$("#keg_forced_carb").jqxCheckBox({theme:theme,width:120,height:23});$("#keg_pressure").jqxNumberInput(Show1dec);$("#bottle_abv").jqxNumberInput(Show2dec);$("#keg_abv").jqxNumberInput(Show2dec);$("#bottle_carbonation_temp").jqxNumberInput(YeastT);$("#keg_carbonation_temp").jqxNumberInput(YeastT);$("#taste_date").jqxTooltip({content:"De proef datum van dit bier."});$("#taste_date").jqxDateTimeInput(Dateopts);$("#taste_date").on("close",function(i){aW()});$("#taste_rate").jqxTooltip({content:"Het cijfer voor dit bier van 1 tot 10."});$("#taste_rate").jqxNumberInput(Spin1dec);$("#taste_rate").jqxNumberInput({max:10});$("#taste_color").jqxTooltip({content:"De kleur van het bier."});$("#taste_color").jqxInput({theme:theme,width:320,height:23});$("#taste_transparency").jqxTooltip({content:"De helderheid van het bier."});$("#taste_transparency").jqxInput({theme:theme,width:320,height:23});$("#taste_head").jqxTooltip({content:"Het schuim op het bier."});$("#taste_head").jqxInput({theme:theme,width:320,height:23});$("#taste_aroma").jqxTooltip({content:"Het aroma van het bier."});$("#taste_aroma").jqxInput({theme:theme,width:960,height:23});$("#taste_taste").jqxTooltip({content:"De smaak van het bier."});$("#taste_taste").jqxInput({theme:theme,width:960,height:23});$("#taste_aftertaste").jqxTooltip({content:"De nasmaak van het bier."});$("#taste_aftertaste").jqxInput({theme:theme,width:960,height:23});$("#taste_mouthfeel").jqxTooltip({content:"Het mondgevoelvan het bier."});$("#taste_mouthfeel").jqxInput({theme:theme,width:960,height:23});$("#taste_notes").jqxTooltip({content:"Het oordeel en opmerkingen over dit bier."});$("#taste_notes").jqxInput({theme:theme,width:960,height:100});$("#jqxTabs").jqxTabs({theme:theme,width:1280,height:660,autoHeight:false,position:"top"});$("#Export").jqxButton({template:"info",width:"80px",theme:theme});$("#Export").bind("click",function(){s();var i="prod_export.php?record="+my_record+"&return="+my_return+"&select="+my_select+"&code="+d.code+"&name="+d.name;window.location.href=i});$("#Delete").jqxButton({template:"danger",width:"80px",theme:theme});$("#Delete").bind("click",function(){$("#eventWindow").jqxWindow("open");$("#delOk").click(function(){var i="delete=true&"+$.param({uuid:d.uuid});$.ajax({dataType:"json",url:F,cache:false,data:i,type:"POST",success:function(a5,a4,a6){window.location.href=my_return},error:function(a4,a6,a5){}})})});$("#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(){s();window.location.href=my_return});createDelElements()});
\ No newline at end of file