gx.evt.autoSkip=false;function tnpt002(){this.ServerClass="TNpt002";this.PackageName="GeneXus.Programs";this.setObjectType("trn");this.hasEnterEvent=true;this.SetStandaloneVars=function(){this.Gx_mode=gx.fn.getControlValue("vMODE")};this.Valid_Assnro=function(){gx.ajax.validSrvEvt("dyncall","Valid_Assnro",["gx.O.A57AssNro"],[]);return true};this.Valid_Aexnroexer=function(){gx.ajax.validSrvEvt("dyncall","Valid_Aexnroexer",["gx.O.A57AssNro","gx.O.A11AexNroExer","gx.num.urlDecimal(gx.O.A14AexValTota,'.',',')"],["A14AexValTota","Gx_mode","Z57AssNro","Z11AexNroExer","Z14AexValTota","Grid1",["BTN_GET","Enabled"],["BTN_ENTER","Enabled"],["BTN_CHECK","Enabled"]]);
return true};this.Valid_Aexvaltota=function(){try{var a=gx.util.balloon.getNew("AEXVALTOTA");this.AnyError=0}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Cctcod=function(){this.sMode114=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(114,35);this.standaloneModal50114();this.standaloneNotModal50114();if(gx.fn.currentGridRowImpl(35)===0){return true}var a=gx.util.balloon.getNew("CCTCOD",gx.fn.currentGridRowImpl(35));if(gx.fn.gridDuplicateKey(37)){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.sMode114;return true};this.Valid_Ascpctadeb=function(){try{if(gx.fn.currentGridRowImpl(35)===0){return true}var a=gx.util.balloon.getNew("ASCPCTADEB",gx.fn.currentGridRowImpl(35));this.AnyError=0;this.sMode114=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(114,35);try{this.A19AscValADeb=gx.num.round((this.A14AexValTota*this.A18AscPctADeb)/100,2)
}catch(b){}}catch(b){}try{this.Gx_mode=this.sMode114;if(a==null){return true}return a.show()}catch(b){}return true};this.standaloneModal50114=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.standaloneNotModal50114=function(){return true};this.e1150113_client=function(){this.executeServerEvent("ENTER",true)};this.e1250113_client=function(){this.executeServerEvent("CANCEL",true)};this.GXValidFnc=[];
this.GXCtrlIds=[2,15,18,20,23,25,29,31,36,37,38,39,40,41,49];this.GXLastCtrlId=49;this.Grid1Container=new gx.grid.grid(this,114,"Level1",35,"Grid1","Grid1","Grid1Container",this.CmpContext,this.IsMasterPage,"tnpt002",[97],false,1,false,true,5,false,false,false,"",0,"px","Novo registro",true,false,false,null,null,false,"");this.Grid1Container.addSingleLineEdit("nRcdDeleted_114",36,"vNRCDDELETED_114","","","nRcdDeleted_114","int",0,"px",4,4,"right",null,[],"nRcdDeleted_114","nRcdDeleted_114",true,0,false,false);
this.Grid1Container.addSingleLineEdit(97,37,"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",50,0,"",0,"",null,"","");this.Grid1Container.addSingleLineEdit(98,38,"CCTNOMCENT","Nome","","CctNomCent","char",0,"px",35,35,"left",null,[],98,"CctNomCent",true,0,false,false);this.Grid1Container.addSingleLineEdit(18,39,"ASCPCTADEB","Pct a debitar","","AscPctADeb","decimal",0,"px",5,5,"right",null,[],18,"AscPctADeb",true,1,false,false);
this.Grid1Container.addSingleLineEdit(19,40,"ASCVALADEB","Valor a debitar","","AscValADeb","decimal",0,"px",10,10,"right",null,[],19,"AscValADeb",true,2,false,false);this.Grid1Container.addSingleLineEdit(17,41,"ASCCAMPO1L","Campo livre 1","","AscCampo1L","char",0,"px",30,30,"left",null,[],17,"AscCampo1L",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:5,dec:0,sign:false,pic:"ZZZZ9",ro:0,grid:0,gxgrid:null,fnc:this.Valid_Assnro,isvalid:null,rgrid:[this.Grid1Container],fld:"ASSNRO",gxz:"Z57AssNro",gxold:"O57AssNro",gxvar:"A57AssNro",ucs:[],op:[],ip:[20],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A57AssNro=gx.num.intval(a)
},v2z:function(a){gx.O.Z57AssNro=gx.num.intval(a)},v2c:function(){gx.fn.setControlValue("ASSNRO",gx.O.A57AssNro,0)},c2v:function(){gx.O.A57AssNro=this.val()},val:function(){return gx.fn.getIntegerValue("ASSNRO",".")},nac:function(){return false}};this.GXValidFnc[23]={fld:"TEXTBLOCK2",format:0,grid:0};this.GXValidFnc[25]={lvl:0,type:"char",len:4,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:this.Valid_Aexnroexer,isvalid:null,fld:"AEXNROEXER",gxz:"Z11AexNroExer",gxold:"O11AexNroExer",gxvar:"A11AexNroExer",ucs:[],op:[31],ip:[31,25,20],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A11AexNroExer=a
},v2z:function(a){gx.O.Z11AexNroExer=a},v2c:function(){gx.fn.setControlValue("AEXNROEXER",gx.O.A11AexNroExer,0)},c2v:function(){gx.O.A11AexNroExer=this.val()},val:function(){return gx.fn.getControlValue("AEXNROEXER")},nac:function(){return false}};this.GXValidFnc[29]={fld:"TEXTBLOCK3",format:0,grid:0};this.GXValidFnc[31]={lvl:0,type:"decimal",len:10,dec:2,sign:false,pic:"ZZZZ,ZZ9.99",ro:0,grid:0,gxgrid:null,fnc:this.Valid_Aexvaltota,isvalid:null,rgrid:[],fld:"AEXVALTOTA",gxz:"Z14AexValTota",gxold:"O14AexValTota",gxvar:"A14AexValTota",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A14AexValTota=gx.fn.toDecimalValue(a,",",".")
},v2z:function(a){gx.O.Z14AexValTota=gx.fn.toDecimalValue(a,".",",")},v2c:function(){gx.fn.setDecimalValue("AEXVALTOTA",gx.O.A14AexValTota,2,",")},c2v:function(){gx.O.A14AexValTota=this.val()},val:function(){return gx.fn.getDecimalValue("AEXVALTOTA",".",",")},nac:function(){return false}};this.GXValidFnc[36]={lvl:114,type:"int",len:4,dec:0,sign:false,pic:"9999",ro:0,grid:35,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"vNRCDDELETED_114",gxz:"ZnRcdDeleted_114",gxold:"OnRcdDeleted_114",gxvar:"nRcdDeleted_114",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.nRcdDeleted_114=gx.num.intval(a)
},v2z:function(a){gx.O.ZnRcdDeleted_114=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("vNRCDDELETED_114",gx.fn.currentGridRowImpl(35),gx.O.nRcdDeleted_114,0)},c2v:function(){gx.O.nRcdDeleted_114=this.val()},val:function(){return gx.fn.getGridIntegerValue("vNRCDDELETED_114",gx.fn.currentGridRowImpl(35),".")},nac:function(){return false}};this.GXValidFnc[37]={lvl:114,type:"char",len:8,dec:0,sign:false,ro:0,grid:35,gxgrid:this.Grid1Container,fnc:this.Valid_Cctcod,isvalid:null,fld:"CCTCOD",gxz:"Z97CctCod",gxold:"O97CctCod",gxvar:"A97CctCod",ucs:[],op:[38],ip:[38,37],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(35),gx.O.A97CctCod,0)},c2v:function(){gx.O.A97CctCod=this.val()},val:function(){return gx.fn.getGridControlValue("CCTCOD",gx.fn.currentGridRowImpl(35))},nac:function(){return false}};this.GXValidFnc[38]={lvl:114,type:"char",len:35,dec:0,sign:false,ro:1,grid:35,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(35),gx.O.A98CctNomCent,0)},c2v:function(){gx.O.A98CctNomCent=this.val()},val:function(){return gx.fn.getGridControlValue("CCTNOMCENT",gx.fn.currentGridRowImpl(35))},nac:function(){return false}};this.GXValidFnc[39]={lvl:114,type:"decimal",len:5,dec:1,sign:false,pic:"ZZ9.9",ro:0,grid:35,gxgrid:this.Grid1Container,fnc:this.Valid_Ascpctadeb,isvalid:null,rgrid:[],fld:"ASCPCTADEB",gxz:"Z18AscPctADeb",gxold:"O18AscPctADeb",gxvar:"A18AscPctADeb",ucs:[],op:[40],ip:[40,39,31],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A18AscPctADeb=gx.fn.toDecimalValue(a,",",".")
},v2z:function(a){gx.O.Z18AscPctADeb=gx.fn.toDecimalValue(a,".",",")},v2c:function(){gx.fn.setGridDecimalValue("ASCPCTADEB",gx.fn.currentGridRowImpl(35),gx.O.A18AscPctADeb,1,",")},c2v:function(){gx.O.A18AscPctADeb=this.val()},val:function(){return gx.fn.getGridDecimalValue("ASCPCTADEB",gx.fn.currentGridRowImpl(35),".",",")},nac:function(){return false}};this.GXValidFnc[40]={lvl:114,type:"decimal",len:10,dec:2,sign:false,pic:"ZZZZZZ9.99",ro:1,grid:35,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"ASCVALADEB",gxz:"Z19AscValADeb",gxold:"O19AscValADeb",gxvar:"A19AscValADeb",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A19AscValADeb=gx.fn.toDecimalValue(a,",",".")
},v2z:function(a){gx.O.Z19AscValADeb=gx.fn.toDecimalValue(a,".",",")},v2c:function(){gx.fn.setGridDecimalValue("ASCVALADEB",gx.fn.currentGridRowImpl(35),gx.O.A19AscValADeb,2,",")},c2v:function(){gx.O.A19AscValADeb=this.val()},val:function(){return gx.fn.getGridDecimalValue("ASCVALADEB",gx.fn.currentGridRowImpl(35),".",",")},nac:function(){return false}};this.GXValidFnc[41]={lvl:114,type:"char",len:30,dec:0,sign:false,ro:0,grid:35,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"ASCCAMPO1L",gxz:"Z17AscCampo1L",gxold:"O17AscCampo1L",gxvar:"A17AscCampo1L",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A17AscCampo1L=a
},v2z:function(a){gx.O.Z17AscCampo1L=a},v2c:function(){gx.fn.setGridControlValue("ASCCAMPO1L",gx.fn.currentGridRowImpl(35),gx.O.A17AscCampo1L,0)},c2v:function(){gx.O.A17AscCampo1L=this.val()},val:function(){return gx.fn.getGridControlValue("ASCCAMPO1L",gx.fn.currentGridRowImpl(35))},nac:function(){return false}};this.GXValidFnc[49]={fld:"PROMPT_57",grid:113};this.A57AssNro=0;this.Z57AssNro=0;this.O57AssNro=0;this.A11AexNroExer="";this.Z11AexNroExer="";this.O11AexNroExer="";this.A14AexValTota=0;this.Z14AexValTota=0;
this.O14AexValTota=0;this.ZnRcdDeleted_114=0;this.OnRcdDeleted_114=0;this.Z97CctCod="";this.O97CctCod="";this.Z98CctNomCent="";this.O98CctNomCent="";this.Z18AscPctADeb=0;this.O18AscPctADeb=0;this.Z19AscValADeb=0;this.O19AscValADeb=0;this.Z17AscCampo1L="";this.O17AscCampo1L="";this.A97CctCod="";this.A19AscValADeb=0;this.A98CctNomCent="";this.A18AscPctADeb=0;this.A17AscCampo1L="";this.ServerEvents=["e1150113_client","e1250113_client"];this.setPrompt("PROMPT_57",[20]);this.setPrompt("PROMPT_97",[37]);
this.EnterCtrl=["BTN_ENTER"];this.CheckCtrl=["BTN_CHECK"];this.VarControlMap.Gx_mode={id:"vMODE",grid:0,type:"char"};this.SetStandaloneVars()}tnpt002.prototype=new gx.GxObject;gx.setParentObj(new tnpt002());