gx.evt.autoSkip=false;function himh095(){this.ServerClass="HImh095";this.PackageName="";this.setObjectType("web");this.hasEnterEvent=true;this.SetStandaloneVars=function(){this.A778SctValDesc=gx.fn.getDecimalValue("SCTVALDESC",".",",");this.A775SctPctDesc=gx.fn.getDecimalValue("SCTPCTDESC",".",",");this.AV9SlcNro=gx.fn.getIntegerValue("vSLCNRO",".")};this.Valid_Sctcodforn=function(){try{if(gx.fn.currentGridRowImpl(19)===0){return true}var a=gx.util.balloon.getNew("SCTCODFORN",gx.fn.currentGridRowImpl(19));
this.AnyError=0}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Sctprebrut=function(){try{if(gx.fn.currentGridRowImpl(19)===0){return true}var a=gx.util.balloon.getNew("SCTPREBRUT",gx.fn.currentGridRowImpl(19));this.AnyError=0}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Cdpcod=function(){try{if(gx.fn.currentGridRowImpl(19)===0){return true}var a=gx.util.balloon.getNew("CDPCOD",gx.fn.currentGridRowImpl(19));this.AnyError=0
}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.e161l1_client=function(){this.clearMessages();gx.popup.openUrl(gx.http.formatLink("timt035",[this.AV9SlcNro,0]),["AV9SlcNro",""]);this.refreshOutputs([])};this.e171l2_client=function(){this.clearMessages();gx.popup.openUrl(gx.http.formatLink("timt035",[this.A819SlcNro,this.A774SctNro]),["A819SlcNro","A774SctNro"]);this.refreshOutputs([])};this.e111l2_client=function(){this.executeServerEvent("ENTER",true)};this.e121l2_client=function(){this.executeServerEvent("'SELECIONAR'",false)
};this.e131l2_client=function(){this.executeServerEvent("'VOLTAR'",false)};this.e181l2_client=function(){this.executeServerEvent("CANCEL",true,arguments[0])};this.GXValidFnc=[];this.GXCtrlIds=[3,16,20,21,22,23,24,25,26,27,28,29,30];this.GXLastCtrlId=30;this.Grid1Container=new gx.grid.grid(this,2,"WbpLvl2",19,"Grid1","Grid1","Grid1Container",this.CmpContext,this.IsMasterPage,"himh095",[],false,1,true,true,0,false,false,false,"",0,"px","Novo registro",false,false,true,null,null,false,"");this.Grid1Container.addBitmap("&Imgeditar","vIMGEDITAR",20,0,"px",17,"px","e171l2_client","","");
this.Grid1Container.addCheckBox("Op",21,"vOP","Selecionada","","Op","char","S","N",null,true,false,0,"px");this.Grid1Container.addSingleLineEdit(774,22,"SCTNRO","Cotação","","SctNro","int",0,"px",2,2,"right",null,[],774,"SctNro",true,0,false,false);this.Grid1Container.addSingleLineEdit(771,23,"SCTDATCOTA","Data","","SctDatCota","date",0,"px",10,10,"right",null,[],771,"SctDatCota",true,0,false,false);this.Grid1Container.addSingleLineEdit(770,24,"SCTCODFORN","Código","","SctCodForn","int",0,"px",6,6,"right",null,[],770,"SctCodForn",true,0,false,false);
this.Grid1Container.addSingleLineEdit(773,25,"SCTNOMFORN","Fornecedor","","SctNomForn","char",0,"px",40,40,"left",null,[],773,"SctNomForn",true,0,false,false);this.Grid1Container.addSingleLineEdit(776,26,"SCTPREBRUT","Preço bruto","","SctPreBrut","decimal",0,"px",13,11,"right",null,[],776,"SctPreBrut",true,2,false,false);this.Grid1Container.addSingleLineEdit(777,27,"SCTPRELIQU","Preço líquido","","SctPreLiqu","decimal",0,"px",13,11,"right",null,[],777,"SctPreLiqu",true,2,false,false);this.Grid1Container.addSingleLineEdit(100,28,"CDPCOD","Cond. pgto","","CdpCod","int",0,"px",3,3,"right",null,[],100,"CdpCod",true,0,false,false);
this.Grid1Container.addSingleLineEdit(101,29,"CDPDES","Descrição","","CdpDes","char",0,"px",40,40,"left",null,[],101,"CdpDes",true,0,false,false);this.Grid1Container.addSingleLineEdit(819,30,"SLCNRO","SC","","SlcNro","int",0,"px",6,6,"right",null,[],819,"SlcNro",true,0,false,false);this.setGrid(this.Grid1Container);this.GXValidFnc[3]={fld:"TABLE1",grid:0};this.GXValidFnc[16]={fld:"TEXTBLOCK2",format:0,grid:0};this.GXValidFnc[20]={lvl:2,type:"bits",len:5,dec:0,sign:false,ro:1,grid:19,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"vIMGEDITAR",gxz:"ZV14ImgEditar",gxold:"OV14ImgEditar",gxvar:"AV14ImgEditar",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.AV14ImgEditar=a
},v2z:function(a){gx.O.ZV14ImgEditar=a},v2c:function(){},c2v:function(){gx.O.AV14ImgEditar=this.val()},val:function(){return gx.fn.getGridControlValue("vIMGEDITAR",gx.fn.currentGridRowImpl(19))},nac:function(){return false}};this.GXValidFnc[21]={lvl:2,type:"char",len:1,dec:0,sign:true,ro:0,grid:19,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"vOP",gxz:"ZV17Op",gxold:"OV17Op",gxvar:"AV17Op",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"checkbox",v2v:function(a){gx.O.AV17Op=a},v2z:function(a){gx.O.ZV17Op=a
},v2c:function(){gx.fn.setGridCheckBoxValue("vOP",gx.fn.currentGridRowImpl(19),gx.O.AV17Op,"S")},c2v:function(){gx.O.AV17Op=this.val()},val:function(){return gx.fn.getGridCheckBoxValue("vOP",gx.fn.currentGridRowImpl(19),"S","N")},nac:function(){return false}};this.GXValidFnc[22]={lvl:2,type:"int",len:2,dec:0,sign:false,pic:"Z9",ro:1,grid:19,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"SCTNRO",gxz:"Z774SctNro",gxold:"O774SctNro",gxvar:"A774SctNro",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A774SctNro=gx.num.intval(a)
},v2z:function(a){gx.O.Z774SctNro=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("SCTNRO",gx.fn.currentGridRowImpl(19),gx.O.A774SctNro,0)},c2v:function(){gx.O.A774SctNro=this.val()},val:function(){return gx.fn.getGridIntegerValue("SCTNRO",gx.fn.currentGridRowImpl(19),".")},nac:function(){return false}};this.GXValidFnc[23]={lvl:2,type:"date",len:10,dec:0,sign:false,ro:1,grid:19,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"SCTDATCOTA",gxz:"Z771SctDatCota",gxold:"O771SctDatCota",gxvar:"A771SctDatCota",dp:{f:0,st:false,wn:false,mf:false,pic:"99/99/9999",dec:0},ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A771SctDatCota=gx.fn.toDatetimeValue(a)
},v2z:function(a){gx.O.Z771SctDatCota=gx.fn.toDatetimeValue(a)},v2c:function(){gx.fn.setGridControlValue("SCTDATCOTA",gx.fn.currentGridRowImpl(19),gx.O.A771SctDatCota,0)},c2v:function(){gx.O.A771SctDatCota=this.val()},val:function(){return gx.fn.getGridControlValue("SCTDATCOTA",gx.fn.currentGridRowImpl(19))},nac:function(){return false}};this.GXValidFnc[24]={lvl:2,type:"int",len:6,dec:0,sign:false,pic:"ZZZZZ9",ro:1,grid:19,gxgrid:this.Grid1Container,fnc:this.Valid_Sctcodforn,isvalid:null,rgrid:[],fld:"SCTCODFORN",gxz:"Z770SctCodForn",gxold:"O770SctCodForn",gxvar:"A770SctCodForn",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A770SctCodForn=gx.num.intval(a)
},v2z:function(a){gx.O.Z770SctCodForn=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("SCTCODFORN",gx.fn.currentGridRowImpl(19),gx.O.A770SctCodForn,0)},c2v:function(){gx.O.A770SctCodForn=this.val()},val:function(){return gx.fn.getGridIntegerValue("SCTCODFORN",gx.fn.currentGridRowImpl(19),".")},nac:function(){return false}};this.GXValidFnc[25]={lvl:2,type:"char",len:40,dec:0,sign:false,ro:1,grid:19,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"SCTNOMFORN",gxz:"Z773SctNomForn",gxold:"O773SctNomForn",gxvar:"A773SctNomForn",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A773SctNomForn=a
},v2z:function(a){gx.O.Z773SctNomForn=a},v2c:function(){gx.fn.setGridControlValue("SCTNOMFORN",gx.fn.currentGridRowImpl(19),gx.O.A773SctNomForn,0)},c2v:function(){gx.O.A773SctNomForn=this.val()},val:function(){return gx.fn.getGridControlValue("SCTNOMFORN",gx.fn.currentGridRowImpl(19))},nac:function(){return false}};this.GXValidFnc[26]={lvl:2,type:"decimal",len:11,dec:2,sign:false,pic:"ZZ,ZZZ,ZZ9.99",ro:1,grid:19,gxgrid:this.Grid1Container,fnc:this.Valid_Sctprebrut,isvalid:null,fld:"SCTPREBRUT",gxz:"Z776SctPreBrut",gxold:"O776SctPreBrut",gxvar:"A776SctPreBrut",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A776SctPreBrut=gx.fn.toDecimalValue(a,",",".")
},v2z:function(a){gx.O.Z776SctPreBrut=gx.fn.toDecimalValue(a,".",",")},v2c:function(){gx.fn.setGridDecimalValue("SCTPREBRUT",gx.fn.currentGridRowImpl(19),gx.O.A776SctPreBrut,2,",")},c2v:function(){gx.O.A776SctPreBrut=this.val()},val:function(){return gx.fn.getGridDecimalValue("SCTPREBRUT",gx.fn.currentGridRowImpl(19),".",",")},nac:function(){return false}};this.GXValidFnc[27]={lvl:2,type:"decimal",len:11,dec:2,sign:false,pic:"ZZ,ZZZ,ZZ9.99",ro:1,grid:19,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"SCTPRELIQU",gxz:"Z777SctPreLiqu",gxold:"O777SctPreLiqu",gxvar:"A777SctPreLiqu",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A777SctPreLiqu=gx.fn.toDecimalValue(a,",",".")
},v2z:function(a){gx.O.Z777SctPreLiqu=gx.fn.toDecimalValue(a,".",",")},v2c:function(){gx.fn.setGridDecimalValue("SCTPRELIQU",gx.fn.currentGridRowImpl(19),gx.O.A777SctPreLiqu,2,",")},c2v:function(){gx.O.A777SctPreLiqu=this.val()},val:function(){return gx.fn.getGridDecimalValue("SCTPRELIQU",gx.fn.currentGridRowImpl(19),".",",")},nac:function(){return false}};this.GXValidFnc[28]={lvl:2,type:"int",len:3,dec:0,sign:false,pic:"ZZ9",ro:1,grid:19,gxgrid:this.Grid1Container,fnc:this.Valid_Cdpcod,isvalid:null,rgrid:[],fld:"CDPCOD",gxz:"Z100CdpCod",gxold:"O100CdpCod",gxvar:"A100CdpCod",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A100CdpCod=gx.num.intval(a)
},v2z:function(a){gx.O.Z100CdpCod=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("CDPCOD",gx.fn.currentGridRowImpl(19),gx.O.A100CdpCod,0)},c2v:function(){gx.O.A100CdpCod=this.val()},val:function(){return gx.fn.getGridIntegerValue("CDPCOD",gx.fn.currentGridRowImpl(19),".")},nac:function(){return false}};this.GXValidFnc[29]={lvl:2,type:"char",len:40,dec:0,sign:false,ro:1,grid:19,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"CDPDES",gxz:"Z101CdpDes",gxold:"O101CdpDes",gxvar:"A101CdpDes",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A101CdpDes=a
},v2z:function(a){gx.O.Z101CdpDes=a},v2c:function(){gx.fn.setGridControlValue("CDPDES",gx.fn.currentGridRowImpl(19),gx.O.A101CdpDes,0)},c2v:function(){gx.O.A101CdpDes=this.val()},val:function(){return gx.fn.getGridControlValue("CDPDES",gx.fn.currentGridRowImpl(19))},nac:function(){return false}};this.GXValidFnc[30]={lvl:2,type:"int",len:6,dec:0,sign:false,pic:"ZZZZZ9",ro:1,grid:19,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"SLCNRO",gxz:"Z819SlcNro",gxold:"O819SlcNro",gxvar:"A819SlcNro",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A819SlcNro=gx.num.intval(a)
},v2z:function(a){gx.O.Z819SlcNro=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("SLCNRO",gx.fn.currentGridRowImpl(19),gx.O.A819SlcNro,0)},c2v:function(){gx.O.A819SlcNro=this.val()},val:function(){return gx.fn.getGridIntegerValue("SLCNRO",gx.fn.currentGridRowImpl(19),".")},nac:function(){return false}};this.ZV14ImgEditar="";this.OV14ImgEditar="";this.ZV17Op="";this.OV17Op="";this.Z774SctNro=0;this.O774SctNro=0;this.Z771SctDatCota=gx.date.nullDate();this.O771SctDatCota=gx.date.nullDate();
this.Z770SctCodForn=0;this.O770SctCodForn=0;this.Z773SctNomForn="";this.O773SctNomForn="";this.Z776SctPreBrut=0;this.O776SctPreBrut=0;this.Z777SctPreLiqu=0;this.O777SctPreLiqu=0;this.Z100CdpCod=0;this.O100CdpCod=0;this.Z101CdpDes="";this.O101CdpDes="";this.Z819SlcNro=0;this.O819SlcNro=0;this.AV9SlcNro=0;this.A772SctIndSele="";this.A775SctPctDesc=0;this.A778SctValDesc=0;this.AV14ImgEditar="";this.AV17Op="";this.A774SctNro=0;this.A771SctDatCota=gx.date.nullDate();this.A770SctCodForn=0;this.A773SctNomForn="";
this.A776SctPreBrut=0;this.A777SctPreLiqu=0;this.A100CdpCod=0;this.A101CdpDes="";this.A819SlcNro=0;this.A812SlcNroDocu=0;this.ServerEvents=["e111l2_client","e121l2_client","e131l2_client","e181l2_client"];this.EnterCtrl=["BUTTON1"];this.VarControlMap.A778SctValDesc={id:"SCTVALDESC",grid:0,type:"decimal"};this.VarControlMap.A775SctPctDesc={id:"SCTPCTDESC",grid:0,type:"decimal"};this.VarControlMap.AV9SlcNro={id:"vSLCNRO",grid:0,type:"int"};this.VarControlMap.AV9SlcNro={id:"vSLCNRO",grid:0,type:"int"};
this.VarControlMap.A772SctIndSele={id:"SCTINDSELE",grid:0,type:"char"};this.Grid1Container.addRefreshingVar({rfrVar:"AV9SlcNro"});this.Grid1Container.addRefreshingVar({rfrVar:"A772SctIndSele"});this.SetStandaloneVars()}himh095.prototype=new gx.GxObject;gx.setParentObj(new himh095());