gx.evt.autoSkip=false;function tabt083(){this.ServerClass="TAbt083";this.PackageName="GeneXus.Programs";this.setObjectType("trn");this.hasEnterEvent=true;this.SetStandaloneVars=function(){this.Gx_mode=gx.fn.getControlValue("vMODE")};this.Valid_Docnro=function(){try{var a=gx.util.balloon.getNew("DOCNRO");this.AnyError=0}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Undcod=function(){try{var a=gx.util.balloon.getNew("UNDCOD");this.AnyError=0}catch(b){}try{if(a==null){return true
}return a.show()}catch(b){}return true};this.Valid_Doenrosequ=function(){gx.ajax.validSrvEvt("dyncall","Valid_Doenrosequ",["gx.O.A258DocNro","gx.O.A922UndCod","gx.O.A281DoeNroSequ","gx.num.urlDecimal(gx.O.A96DoeValor,'.',',')"],["A96DoeValor","Gx_mode","Z258DocNro","Z922UndCod","Z281DoeNroSequ","Z96DoeValor","Grid1",["BTN_GET","Enabled"],["BTN_ENTER","Enabled"],["BTN_CHECK","Enabled"]]);return true};this.Valid_Doevalor=function(){try{var a=gx.util.balloon.getNew("DOEVALOR");this.AnyError=0}catch(b){}try{if(a==null){return true
}return a.show()}catch(b){}return true};this.Valid_Cctcod=function(){this.sMode66=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(66,40);this.standaloneModal1M66();this.standaloneNotModal1M66();if(gx.fn.currentGridRowImpl(40)===0){return true}var a=gx.util.balloon.getNew("CCTCOD",gx.fn.currentGridRowImpl(40));if(gx.fn.gridDuplicateKey(42)){a.setError(gx.text.format(gx.getMessage("GXM_1004"),"Level1"));this.AnyError=1;return a.show()}gx.ajax.validSrvEvt("dyncall","Valid_Cctcod",["gx.O.A97CctCod","gx.O.A98CctNomCent"],["A98CctNomCent"]);
this.Gx_mode=this.sMode66;return true};this.Valid_Ccepctadeb=function(){try{if(gx.fn.currentGridRowImpl(40)===0){return true}var a=gx.util.balloon.getNew("CCEPCTADEB",gx.fn.currentGridRowImpl(40));this.AnyError=0;this.sMode66=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(66,40);try{this.A95CceValADeb=gx.num.round((this.A96DoeValor*this.A94CcePctADeb)/100,2)}catch(b){}if(this.A94CcePctADeb<=0){try{a.setError("Informe um percentual maior do que zero");this.AnyError=1}catch(b){}}}catch(b){}try{this.Gx_mode=this.sMode66;
if(a==null){return true}return a.show()}catch(b){}return true};this.standaloneModal1M66=function(){try{if(this.Gx_mode!="INS"){gx.fn.setCtrlProperty("CCTCOD","Enabled",0)}else{gx.fn.setCtrlProperty("CCTCOD","Enabled",1)}}catch(a){}return true};this.standaloneNotModal1M66=function(){return true};this.e111m45_client=function(){this.executeServerEvent("ENTER",true)};this.e121m45_client=function(){this.executeServerEvent("CANCEL",true)};this.GXValidFnc=[];this.GXCtrlIds=[2,15,18,20,23,25,28,30,34,36,41,42,43,44,45,46];
this.GXLastCtrlId=46;this.Grid1Container=new gx.grid.grid(this,66,"Level1",40,"Grid1","Grid1","Grid1Container",this.CmpContext,this.IsMasterPage,"tabt083",[97],false,1,false,true,5,false,false,false,"",0,"px","Novo registro",true,false,false,null,null,false,"");this.Grid1Container.addSingleLineEdit("nRcdDeleted_66",41,"vNRCDDELETED_66","","","nRcdDeleted_66","int",0,"px",4,4,"right",null,[],"nRcdDeleted_66","nRcdDeleted_66",true,0,false,false);this.Grid1Container.addSingleLineEdit(97,42,"CCTCOD","Centro de custo","","CctCod","char",0,"px",8,8,"left",null,[],97,"CctCod",true,0,false,false);
this.Grid1Container.addBitmap("prompt_97","PROMPT_97",54,0,"",0,"",null,"","");this.Grid1Container.addSingleLineEdit(98,43,"CCTNOMCENT","Nome","","CctNomCent","char",0,"px",35,35,"left",null,[],98,"CctNomCent",true,0,false,false);this.Grid1Container.addSingleLineEdit(94,44,"CCEPCTADEB","Percentual a debitar","","CcePctADeb","decimal",0,"px",5,5,"right",null,[],94,"CcePctADeb",true,1,false,false);this.Grid1Container.addSingleLineEdit(95,45,"CCEVALADEB","Valor a debitar","","CceValADeb","decimal",0,"px",13,10,"right",null,[],95,"CceValADeb",true,2,false,false);
this.Grid1Container.addSingleLineEdit(93,46,"CCECAMPO1L","Campo livre","","CceCampo1L","char",0,"px",10,10,"left",null,[],93,"CceCampo1L",true,0,false,false);this.setGrid(this.Grid1Container);this.GXValidFnc[2]={fld:"TABLE1",grid:0};this.GXValidFnc[15]={fld:"TABLE2",grid:0};this.GXValidFnc[18]={fld:"TEXTBLOCK1",format:0,grid:0};this.GXValidFnc[20]={lvl:0,type:"int",len:6,dec:0,sign:false,pic:"ZZZZZ9",ro:1,grid:0,gxgrid:null,fnc:this.Valid_Docnro,isvalid:null,rgrid:[this.Grid1Container],fld:"DOCNRO",gxz:"Z258DocNro",gxold:"O258DocNro",gxvar:"A258DocNro",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A258DocNro=gx.num.intval(a)
},v2z:function(a){gx.O.Z258DocNro=gx.num.intval(a)},v2c:function(){gx.fn.setControlValue("DOCNRO",gx.O.A258DocNro,0)},c2v:function(){gx.O.A258DocNro=this.val()},val:function(){return gx.fn.getIntegerValue("DOCNRO",".")},nac:function(){return false}};this.GXValidFnc[23]={fld:"TEXTBLOCK2",format:0,grid:0};this.GXValidFnc[25]={lvl:0,type:"int",len:3,dec:0,sign:false,pic:"ZZ9",ro:1,grid:0,gxgrid:null,fnc:this.Valid_Undcod,isvalid:null,rgrid:[this.Grid1Container],fld:"UNDCOD",gxz:"Z922UndCod",gxold:"O922UndCod",gxvar:"A922UndCod",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A922UndCod=gx.num.intval(a)
},v2z:function(a){gx.O.Z922UndCod=gx.num.intval(a)},v2c:function(){gx.fn.setControlValue("UNDCOD",gx.O.A922UndCod,0)},c2v:function(){gx.O.A922UndCod=this.val()},val:function(){return gx.fn.getIntegerValue("UNDCOD",".")},nac:function(){return false}};this.GXValidFnc[28]={fld:"TEXTBLOCK3",format:0,grid:0};this.GXValidFnc[30]={lvl:0,type:"int",len:4,dec:0,sign:false,pic:"ZZZ9",ro:1,grid:0,gxgrid:null,fnc:this.Valid_Doenrosequ,isvalid:null,rgrid:[this.Grid1Container],fld:"DOENROSEQU",gxz:"Z281DoeNroSequ",gxold:"O281DoeNroSequ",gxvar:"A281DoeNroSequ",ucs:[],op:[36],ip:[36,30,25,20],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A281DoeNroSequ=gx.num.intval(a)
},v2z:function(a){gx.O.Z281DoeNroSequ=gx.num.intval(a)},v2c:function(){gx.fn.setControlValue("DOENROSEQU",gx.O.A281DoeNroSequ,0)},c2v:function(){gx.O.A281DoeNroSequ=this.val()},val:function(){return gx.fn.getIntegerValue("DOENROSEQU",".")},nac:function(){return false}};this.GXValidFnc[34]={fld:"TEXTBLOCK4",format:0,grid:0};this.GXValidFnc[36]={lvl:0,type:"decimal",len:12,dec:2,sign:false,pic:"ZZZ,ZZZ,ZZ9.99",ro:0,grid:0,gxgrid:null,fnc:this.Valid_Doevalor,isvalid:null,rgrid:[],fld:"DOEVALOR",gxz:"Z96DoeValor",gxold:"O96DoeValor",gxvar:"A96DoeValor",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A96DoeValor=gx.fn.toDecimalValue(a,",",".")
},v2z:function(a){gx.O.Z96DoeValor=gx.fn.toDecimalValue(a,".",",")},v2c:function(){gx.fn.setDecimalValue("DOEVALOR",gx.O.A96DoeValor,2,",")},c2v:function(){gx.O.A96DoeValor=this.val()},val:function(){return gx.fn.getDecimalValue("DOEVALOR",".",",")},nac:function(){return false}};this.GXValidFnc[41]={lvl:66,type:"int",len:4,dec:0,sign:false,pic:"9999",ro:0,grid:40,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"vNRCDDELETED_66",gxz:"ZnRcdDeleted_66",gxold:"OnRcdDeleted_66",gxvar:"nRcdDeleted_66",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.nRcdDeleted_66=gx.num.intval(a)
},v2z:function(a){gx.O.ZnRcdDeleted_66=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("vNRCDDELETED_66",gx.fn.currentGridRowImpl(40),gx.O.nRcdDeleted_66,0)},c2v:function(){gx.O.nRcdDeleted_66=this.val()},val:function(){return gx.fn.getGridIntegerValue("vNRCDDELETED_66",gx.fn.currentGridRowImpl(40),".")},nac:function(){return false}};this.GXValidFnc[42]={lvl:66,type:"char",len:8,dec:0,sign:false,ro:0,grid:40,gxgrid:this.Grid1Container,fnc:this.Valid_Cctcod,isvalid:null,fld:"CCTCOD",gxz:"Z97CctCod",gxold:"O97CctCod",gxvar:"A97CctCod",ucs:[],op:[43],ip:[43,42],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A97CctCod=a
},v2z:function(a){gx.O.Z97CctCod=a},v2c:function(){gx.fn.setGridControlValue("CCTCOD",gx.fn.currentGridRowImpl(40),gx.O.A97CctCod,0)},c2v:function(){gx.O.A97CctCod=this.val()},val:function(){return gx.fn.getGridControlValue("CCTCOD",gx.fn.currentGridRowImpl(40))},nac:function(){return false}};this.GXValidFnc[43]={lvl:66,type:"char",len:35,dec:0,sign:false,ro:1,grid:40,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"CCTNOMCENT",gxz:"Z98CctNomCent",gxold:"O98CctNomCent",gxvar:"A98CctNomCent",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A98CctNomCent=a
},v2z:function(a){gx.O.Z98CctNomCent=a},v2c:function(){gx.fn.setGridControlValue("CCTNOMCENT",gx.fn.currentGridRowImpl(40),gx.O.A98CctNomCent,0)},c2v:function(){gx.O.A98CctNomCent=this.val()},val:function(){return gx.fn.getGridControlValue("CCTNOMCENT",gx.fn.currentGridRowImpl(40))},nac:function(){return false}};this.GXValidFnc[44]={lvl:66,type:"decimal",len:5,dec:1,sign:false,pic:"ZZ9.9",ro:0,grid:40,gxgrid:this.Grid1Container,fnc:this.Valid_Ccepctadeb,isvalid:null,rgrid:[],fld:"CCEPCTADEB",gxz:"Z94CcePctADeb",gxold:"O94CcePctADeb",gxvar:"A94CcePctADeb",ucs:[],op:[44,45],ip:[45,44,36],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A94CcePctADeb=gx.fn.toDecimalValue(a,",",".")
},v2z:function(a){gx.O.Z94CcePctADeb=gx.fn.toDecimalValue(a,".",",")},v2c:function(){gx.fn.setGridDecimalValue("CCEPCTADEB",gx.fn.currentGridRowImpl(40),gx.O.A94CcePctADeb,1,",")},c2v:function(){gx.O.A94CcePctADeb=this.val()},val:function(){return gx.fn.getGridDecimalValue("CCEPCTADEB",gx.fn.currentGridRowImpl(40),".",",")},nac:function(){return false}};this.GXValidFnc[45]={lvl:66,type:"decimal",len:10,dec:2,sign:false,pic:"ZZ,ZZZ,ZZ9.99",ro:1,grid:40,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"CCEVALADEB",gxz:"Z95CceValADeb",gxold:"O95CceValADeb",gxvar:"A95CceValADeb",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A95CceValADeb=gx.fn.toDecimalValue(a,",",".")
},v2z:function(a){gx.O.Z95CceValADeb=gx.fn.toDecimalValue(a,".",",")},v2c:function(){gx.fn.setGridDecimalValue("CCEVALADEB",gx.fn.currentGridRowImpl(40),gx.O.A95CceValADeb,2,",")},c2v:function(){gx.O.A95CceValADeb=this.val()},val:function(){return gx.fn.getGridDecimalValue("CCEVALADEB",gx.fn.currentGridRowImpl(40),".",",")},nac:function(){return false}};this.GXValidFnc[46]={lvl:66,type:"char",len:10,dec:0,sign:false,ro:0,grid:40,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"CCECAMPO1L",gxz:"Z93CceCampo1L",gxold:"O93CceCampo1L",gxvar:"A93CceCampo1L",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A93CceCampo1L=a
},v2z:function(a){gx.O.Z93CceCampo1L=a},v2c:function(){gx.fn.setGridControlValue("CCECAMPO1L",gx.fn.currentGridRowImpl(40),gx.O.A93CceCampo1L,0)},c2v:function(){gx.O.A93CceCampo1L=this.val()},val:function(){return gx.fn.getGridControlValue("CCECAMPO1L",gx.fn.currentGridRowImpl(40))},nac:function(){return false}};this.A258DocNro=0;this.Z258DocNro=0;this.O258DocNro=0;this.A922UndCod=0;this.Z922UndCod=0;this.O922UndCod=0;this.A281DoeNroSequ=0;this.Z281DoeNroSequ=0;this.O281DoeNroSequ=0;this.A96DoeValor=0;
this.Z96DoeValor=0;this.O96DoeValor=0;this.ZnRcdDeleted_66=0;this.OnRcdDeleted_66=0;this.Z97CctCod="";this.O97CctCod="";this.Z98CctNomCent="";this.O98CctNomCent="";this.Z94CcePctADeb=0;this.O94CcePctADeb=0;this.Z95CceValADeb=0;this.O95CceValADeb=0;this.Z93CceCampo1L="";this.O93CceCampo1L="";this.A97CctCod="";this.A95CceValADeb=0;this.A98CctNomCent="";this.A94CcePctADeb=0;this.A93CceCampo1L="";this.ServerEvents=["e111m45_client","e121m45_client"];this.setPrompt("PROMPT_97",[42]);this.EnterCtrl=["BTN_ENTER"];
this.CheckCtrl=["BTN_CHECK"];this.VarControlMap.Gx_mode={id:"vMODE",grid:0,type:"char"};this.SetStandaloneVars()}tabt083.prototype=new gx.GxObject;gx.setParentObj(new tabt083());