gx.evt.autoSkip=false;function timt012(){this.ServerClass="TImt012";this.PackageName="";this.setObjectType("trn");this.hasEnterEvent=true;this.SetStandaloneVars=function(){this.Gx_BScreen=gx.fn.getIntegerValue("vGXBSCREEN",".");this.A885TiuDesCamp=gx.fn.getControlValue("TIUDESCAMP");this.A893TiuTipPerm=gx.fn.getControlValue("TIUTIPPERM");this.Gx_mode=gx.fn.getControlValue("vMODE");this.Gx_msg=gx.fn.getControlValue("vMSG");this.AV14TemErro=gx.fn.getControlValue("vTEMERRO")};this.Valid_Tiucod=function(){gx.ajax.validSrvEvt("dyncall","valid_Tiucod",["gx.O.A883TiuCod","gx.O.A884TiuDes","gx.O.A888TiuIndPaga","gx.O.A885TiuDesCamp","gx.O.A890TiuQtdReno","gx.O.A894TiuTipReti","gx.O.A891TiuQtdRese","gx.O.A895TiuValMult","gx.O.A892TiuTipCalc","gx.O.A893TiuTipPerm","gx.O.A886TiuInd1","gx.O.A887TiuInd2","gx.O.A1014TiuTipAute"],["A884TiuDes","A888TiuIndPaga","A885TiuDesCamp","A890TiuQtdReno","A894TiuTipReti","A891TiuQtdRese","A895TiuValMult","A892TiuTipCalc","A893TiuTipPerm","A886TiuInd1","A887TiuInd2","A1014TiuTipAute","Gx_mode","Z883TiuCod","Z884TiuDes","Z888TiuIndPaga","Z885TiuDesCamp","Z890TiuQtdReno","Z894TiuTipReti","Z891TiuQtdRese","Z895TiuValMult","Z892TiuTipCalc","Z893TiuTipPerm","Z886TiuInd1","Z887TiuInd2","Z1014TiuTipAute",["BTN_ENTER2","Enabled"]]);
return true};this.Valid_Tiudes=function(){try{var a=gx.util.balloon.getNew("TIUDES");this.AnyError=0;if((""==this.A884TiuDes)){try{a.setError("Descrição do tipo de usuário não pode ser nula");this.AnyError=1}catch(b){}}}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Tiuqtdreno=function(){try{var a=gx.util.balloon.getNew("TIUQTDRENO");this.AnyError=0;if(this.A890TiuQtdReno<0){try{a.setError("Quantidade de renovações deve ser nula ou positiva");this.AnyError=1
}catch(b){}}}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Tiuqtdrese=function(){try{var a=gx.util.balloon.getNew("TIUQTDRESE");this.AnyError=0;if(this.A891TiuQtdRese<0){try{a.setError("Quantidade de reservas deve ser nula ou positiva");this.AnyError=1}catch(b){}}}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.e113811_client=function(){this.clearMessages();this.AV14TemErro="N";if(this.AV14TemErro=="N"){if((""==this.A883TiuCod)){this.AV14TemErro="S";
this.Gx_msg="Selecione um tipo de leitor"}}if(this.AV14TemErro=="N"){gx.popup.openUrl(gx.http.formatLink("himh201",[this.A883TiuCod]),[])}else{this.addMessage(this.Gx_msg)}this.refreshOutputs([{av:"Gx_msg",fld:"vMSG"},{av:"AV14TemErro",fld:"vTEMERRO"}])};this.e13382_client=function(){this.executeServerEvent("'VOLTAR'",false)};this.e14382_client=function(){this.executeServerEvent("'ELIMINAR'",false)};this.e15382_client=function(){this.executeServerEvent("'GET PENSA-B'",false)};this.e163811_client=function(){this.executeServerEvent("ENTER",true)
};this.e173811_client=function(){this.executeServerEvent("CANCEL",true)};this.GXValidFnc=[];this.GXCtrlIds=[3,18,20,23,25,28,33,35,38,40,43,45,48,50,53,55,58,60,63,65,68,70,73,75,78,80];this.GXLastCtrlId=80;this.GXValidFnc[3]={fld:"TABLE4",grid:0};this.GXValidFnc[18]={fld:"TEXTBLOCK10",format:0,grid:0};this.GXValidFnc[20]={fld:"TABLE1",grid:0};this.GXValidFnc[23]={fld:"TEXTBLOCK1",format:0,grid:0};this.GXValidFnc[25]={fld:"TABLE2",grid:0};this.GXValidFnc[28]={lvl:0,type:"char",len:3,dec:0,sign:false,ro:1,grid:0,gxgrid:null,fnc:this.Valid_Tiucod,isvalid:null,fld:"TIUCOD",gxz:"Z883TiuCod",gxold:"O883TiuCod",gxvar:"A883TiuCod",ucs:[],op:[45,50,70,55,75,65,80,60,40,35],ip:[45,50,70,55,75,65,80,60,40,35,28],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A883TiuCod=a
},v2z:function(a){gx.O.Z883TiuCod=a},v2c:function(){gx.fn.setControlValue("TIUCOD",gx.O.A883TiuCod,0)},c2v:function(){gx.O.A883TiuCod=this.val()},val:function(){return gx.fn.getControlValue("TIUCOD")},nac:function(){return false}};this.GXValidFnc[33]={fld:"TEXTBLOCK2",format:0,grid:0};this.GXValidFnc[35]={lvl:0,type:"char",len:30,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:this.Valid_Tiudes,isvalid:null,fld:"TIUDES",gxz:"Z884TiuDes",gxold:"O884TiuDes",gxvar:"A884TiuDes",ucs:[],op:[35],ip:[35],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A884TiuDes=a
},v2z:function(a){gx.O.Z884TiuDes=a},v2c:function(){gx.fn.setControlValue("TIUDES",gx.O.A884TiuDes,0)},c2v:function(){gx.O.A884TiuDes=this.val()},val:function(){return gx.fn.getControlValue("TIUDES")},nac:function(){return false}};this.GXValidFnc[38]={fld:"TEXTBLOCK4",format:0,grid:0};this.GXValidFnc[40]={lvl:0,type:"char",len:1,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,fld:"TIUINDPAGA",gxz:"Z888TiuIndPaga",gxold:"O888TiuIndPaga",gxvar:"A888TiuIndPaga",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"combo",v2v:function(a){gx.O.A888TiuIndPaga=a
},v2z:function(a){gx.O.Z888TiuIndPaga=a},v2c:function(){gx.fn.setComboBoxValue("TIUINDPAGA",gx.O.A888TiuIndPaga)},c2v:function(){gx.O.A888TiuIndPaga=this.val()},val:function(){return gx.fn.getControlValue("TIUINDPAGA")},nac:function(){return false}};this.GXValidFnc[43]={fld:"TEXTBLOCK5",format:0,grid:0};this.GXValidFnc[45]={lvl:0,type:"char",len:1,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,fld:"TIUTIPAUTE",gxz:"Z1014TiuTipAute",gxold:"O1014TiuTipAute",gxvar:"A1014TiuTipAute",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"combo",v2v:function(a){gx.O.A1014TiuTipAute=a
},v2z:function(a){gx.O.Z1014TiuTipAute=a},v2c:function(){gx.fn.setComboBoxValue("TIUTIPAUTE",gx.O.A1014TiuTipAute)},c2v:function(){gx.O.A1014TiuTipAute=this.val()},val:function(){return gx.fn.getControlValue("TIUTIPAUTE")},nac:function(){return false}};this.GXValidFnc[48]={fld:"TEXTBLOCK12",format:0,grid:0};this.GXValidFnc[50]={lvl:0,type:"char",len:1,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,fld:"TIUIND2",gxz:"Z887TiuInd2",gxold:"O887TiuInd2",gxvar:"A887TiuInd2",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"combo",v2v:function(a){gx.O.A887TiuInd2=a
},v2z:function(a){gx.O.Z887TiuInd2=a},v2c:function(){gx.fn.setComboBoxValue("TIUIND2",gx.O.A887TiuInd2)},c2v:function(){gx.O.A887TiuInd2=this.val()},val:function(){return gx.fn.getControlValue("TIUIND2")},nac:function(){return false}};this.GXValidFnc[53]={fld:"TEXTBLOCK3",format:0,grid:0};this.GXValidFnc[55]={lvl:0,type:"int",len:1,dec:0,sign:false,pic:"9",ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"TIUTIPCALC",gxz:"Z892TiuTipCalc",gxold:"O892TiuTipCalc",gxvar:"A892TiuTipCalc",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"combo",v2v:function(a){gx.O.A892TiuTipCalc=gx.num.intval(a)
},v2z:function(a){gx.O.Z892TiuTipCalc=gx.num.intval(a)},v2c:function(){gx.fn.setComboBoxValue("TIUTIPCALC",gx.O.A892TiuTipCalc)},c2v:function(){gx.O.A892TiuTipCalc=this.val()},val:function(){return gx.fn.getIntegerValue("TIUTIPCALC",".")},nac:function(){return false}};this.GXValidFnc[58]={fld:"TEXTBLOCK6",format:0,grid:0};this.GXValidFnc[60]={lvl:0,type:"int",len:2,dec:0,sign:false,pic:"Z9",ro:0,grid:0,gxgrid:null,fnc:this.Valid_Tiuqtdreno,isvalid:null,rgrid:[],fld:"TIUQTDRENO",gxz:"Z890TiuQtdReno",gxold:"O890TiuQtdReno",gxvar:"A890TiuQtdReno",ucs:[],op:[60],ip:[60],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A890TiuQtdReno=gx.num.intval(a)
},v2z:function(a){gx.O.Z890TiuQtdReno=gx.num.intval(a)},v2c:function(){gx.fn.setControlValue("TIUQTDRENO",gx.O.A890TiuQtdReno,0)},c2v:function(){gx.O.A890TiuQtdReno=this.val()},val:function(){return gx.fn.getIntegerValue("TIUQTDRENO",".")},nac:function(){return false}};this.GXValidFnc[63]={fld:"TEXTBLOCK7",format:0,grid:0};this.GXValidFnc[65]={lvl:0,type:"int",len:3,dec:0,sign:false,pic:"ZZ9",ro:0,grid:0,gxgrid:null,fnc:this.Valid_Tiuqtdrese,isvalid:null,rgrid:[],fld:"TIUQTDRESE",gxz:"Z891TiuQtdRese",gxold:"O891TiuQtdRese",gxvar:"A891TiuQtdRese",ucs:[],op:[65],ip:[65],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A891TiuQtdRese=gx.num.intval(a)
},v2z:function(a){gx.O.Z891TiuQtdRese=gx.num.intval(a)},v2c:function(){gx.fn.setControlValue("TIUQTDRESE",gx.O.A891TiuQtdRese,0)},c2v:function(){gx.O.A891TiuQtdRese=this.val()},val:function(){return gx.fn.getIntegerValue("TIUQTDRESE",".")},nac:function(){return false}};this.GXValidFnc[68]={fld:"TEXTBLOCK8",format:0,grid:0};this.GXValidFnc[70]={lvl:0,type:"char",len:1,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,fld:"TIUIND1",gxz:"Z886TiuInd1",gxold:"O886TiuInd1",gxvar:"A886TiuInd1",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"combo",v2v:function(a){gx.O.A886TiuInd1=a
},v2z:function(a){gx.O.Z886TiuInd1=a},v2c:function(){gx.fn.setComboBoxValue("TIUIND1",gx.O.A886TiuInd1)},c2v:function(){gx.O.A886TiuInd1=this.val()},val:function(){return gx.fn.getControlValue("TIUIND1")},nac:function(){return false}};this.GXValidFnc[73]={fld:"TEXTBLOCK9",format:0,grid:0};this.GXValidFnc[75]={lvl:0,type:"decimal",len:4,dec:2,sign:false,pic:"9.99",ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,fld:"TIUVALMULT",gxz:"Z895TiuValMult",gxold:"O895TiuValMult",gxvar:"A895TiuValMult",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A895TiuValMult=gx.fn.toDecimalValue(a,",",".")
},v2z:function(a){gx.O.Z895TiuValMult=gx.fn.toDecimalValue(a,".",",")},v2c:function(){gx.fn.setDecimalValue("TIUVALMULT",gx.O.A895TiuValMult,2,",")},c2v:function(){gx.O.A895TiuValMult=this.val()},val:function(){return gx.fn.getDecimalValue("TIUVALMULT",".",",")},nac:function(){return false}};this.GXValidFnc[78]={fld:"TEXTBLOCK11",format:0,grid:0};this.GXValidFnc[80]={lvl:0,type:"char",len:1,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,fld:"TIUTIPRETI",gxz:"Z894TiuTipReti",gxold:"O894TiuTipReti",gxvar:"A894TiuTipReti",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"combo",v2v:function(a){gx.O.A894TiuTipReti=a
},v2z:function(a){gx.O.Z894TiuTipReti=a},v2c:function(){gx.fn.setComboBoxValue("TIUTIPRETI",gx.O.A894TiuTipReti)},c2v:function(){gx.O.A894TiuTipReti=this.val()},val:function(){return gx.fn.getControlValue("TIUTIPRETI")},nac:function(){return false}};this.A883TiuCod="";this.Z883TiuCod="";this.O883TiuCod="";this.A884TiuDes="";this.Z884TiuDes="";this.O884TiuDes="";this.A888TiuIndPaga="";this.Z888TiuIndPaga="";this.O888TiuIndPaga="";this.A1014TiuTipAute="";this.Z1014TiuTipAute="";this.O1014TiuTipAute="";
this.A887TiuInd2="";this.Z887TiuInd2="";this.O887TiuInd2="";this.A892TiuTipCalc=0;this.Z892TiuTipCalc=0;this.O892TiuTipCalc=0;this.A890TiuQtdReno=0;this.Z890TiuQtdReno=0;this.O890TiuQtdReno=0;this.A891TiuQtdRese=0;this.Z891TiuQtdRese=0;this.O891TiuQtdRese=0;this.A886TiuInd1="";this.Z886TiuInd1="";this.O886TiuInd1="";this.A895TiuValMult=0;this.Z895TiuValMult=0;this.O895TiuValMult=0;this.A894TiuTipReti="";this.Z894TiuTipReti="";this.O894TiuTipReti="";this.AV7UsuCodCorr="";this.Gx_BScreen=0;this.A885TiuDesCamp="";
this.A893TiuTipPerm="";this.Gx_msg="";this.AV14TemErro="";this.ServerEvents=["e13382_client","e14382_client","e15382_client","e163811_client","e173811_client"];this.EnterCtrl=["BTN_ENTER2"];this.VarControlMap.Gx_BScreen={id:"vGXBSCREEN",grid:0,type:"int"};this.VarControlMap.A885TiuDesCamp={id:"TIUDESCAMP",grid:0,type:"char"};this.VarControlMap.A893TiuTipPerm={id:"TIUTIPPERM",grid:0,type:"char"};this.VarControlMap.Gx_mode={id:"vMODE",grid:0,type:"char"};this.VarControlMap.Gx_msg={id:"vMSG",grid:0,type:"char"};
this.VarControlMap.AV14TemErro={id:"vTEMERRO",grid:0,type:"char"};this.SetStandaloneVars()}timt012.prototype=new gx.GxObject;gx.setParentObj(new timt012());