text: /**@preserve  GeneXus Java 10_3_12-110051 on January 4, 2021 10:34:47.1
  *
  gx.evt.autoSkip=!1;gx.define("hfaturarpedidocpcadc",!1,function(){var n,t;this.ServerClass="hfaturarpedidocpcadc";this.PackageName="";this.setObjectType("web");this.setOnAjaxSessionTimeout("Warn");this.refreshAndEnter=!0;this.hasEnterEvent=!0;this.skipOnEnter=!1;this.addKeyListener("12","'FECHAR'");this.addKeyListener("5","REFRESH");this.addKeyListener("12","CANCEL");this.addKeyListener("1","HELP");this.SetStandaloneVars=function(){this.AV20TipoChamada=gx.fn.getIntegerValue("vTIPOCHAMADA",".");this.AV11NotaServicoSeq=gx.fn.getIntegerValue("vNOTASERVICOSEQ",".")};this.e112fn2_client=function(){this.executeServerEvent("'FECHAR'",!1,null,!1,!1)};this.e122fn2_client=function(){this.executeServerEvent("ENTER",!0,null,!1,!1)};this.e132fn2_client=function(){this.executeServerEvent("'TOTALIZAR'",!1,null,!1,!1)};this.e162fn2_client=function(){this.executeServerEvent("CANCEL",!0,arguments[0],!1,!1)};this.GXValidFnc=[];n=this.GXValidFnc;this.GXCtrlIds=[2,5,8,11,14,16,20,23,25,28,30,33,35,37,40,42,47,49,54,56,61,63,68,70,72,74,79,81,82,83,86];this.GXLastCtrlId=86;this.GridContainer=new gx.grid.grid(this,2,"WbpLvl2",80,"Grid","Grid","GridContainer",this.CmpContext,this.IsMasterPage,"hfaturarpedidocpcadc",[],!1,1,!1,!0,0,!0,!1,!1,"CollSdtAcrDesCPC.SdtAcrDesCPCItem",0,"px","Novo registro",!0,!1,!1,null,null,!1,"AV28SdtAcrDesCPC",!1,[1,1,1,1]);t=this.GridContainer;t.addSingleLineEdit("GXV129",81,"CTLDESCRICAO","Acréscimo/Desconto","","Descricao","svchar",0,"px",50,50,"left",null,[],"GXV129","GXV129",!0,0,!1,!1,"Attribute",1,"");t.addSingleLineEdit("GXV12A",82,"CTLVALOR","Valor","","Valor","decimal",0,"px",22,22,"right",null,[],"GXV12A","GXV12A",!0,2,!1,!1,"Attribute",1,"");this.setGrid(t);n[2]={fld:"TABLE1",grid:0};n[5]={fld:"TABLE2",grid:0};n[8]={fld:"TABLE5",grid:0};n[11]={fld:"TABLE3",grid:0};n[14]={fld:"TEXTBLOCK1",format:0,grid:0};n[16]={lvl:0,type:"svchar",len:70,dec:0,sign:!1,ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vOBRACODIGONOME",gxz:"ZV12ObraCodigoNome",gxold:"OV12ObraCodigoNome",gxvar:"AV12ObraCodigoNome",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV12ObraCodigoNome=n},v2z:function(n){gx.O.ZV12ObraCodigoNome=n},v2c:function(){gx.fn.setControlValue("vOBRACODIGONOME",gx.O.AV12ObraCodigoNome,0)},c2v:function(){gx.O.AV12ObraCodigoNome=this.val()},val:function(){return gx.fn.getControlValue("vOBRACODIGONOME")},nac:gx.falseFn};n[20]={lvl:0,type:"svchar",len:70,dec:0,sign:!1,ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vPESSOACODIGONOME",gxz:"ZV14PessoaCodigoNome",gxold:"OV14PessoaCodigoNome",gxvar:"AV14PessoaCodigoNome",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV14PessoaCodigoNome=n},v2z:function(n){gx.O.ZV14PessoaCodigoNome=n},v2c:function(){gx.fn.setControlValue("vPESSOACODIGONOME",gx.O.AV14PessoaCodigoNome,0)},c2v:function(){gx.O.AV14PessoaCodigoNome=this.val()},val:function(){return gx.fn.getControlValue("vPESSOACODIGONOME")},nac:gx.falseFn};n[23]={fld:"TEXTBLOCK3",format:0,grid:0};n[25]={lvl:0,type:"char",len:5,dec:0,sign:!1,ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vSERIE",gxz:"ZV18Serie",gxold:"OV18Serie",gxvar:"AV18Serie",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV18Serie=n},v2z:function(n){gx.O.ZV18Serie=n},v2c:function(){gx.fn.setControlValue("vSERIE",gx.O.AV18Serie,0)},c2v:function(){gx.O.AV18Serie=this.val()},val:function(){return gx.fn.getControlValue("vSERIE")},nac:gx.falseFn};n[28]={fld:"TEXTBLOCK5",format:0,grid:0};n[30]={lvl:0,type:"int",len:18,dec:0,sign:!1,pic:"ZZZZZZZZZZZZZZZZZ9",ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vULTIMANOTA",gxz:"ZV21UltimaNota",gxold:"OV21UltimaNota",gxvar:"AV21UltimaNota",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV21UltimaNota=gx.num.intval(n)},v2z:function(n){gx.O.ZV21UltimaNota=gx.num.intval(n)},v2c:function(){gx.fn.setControlValue("vULTIMANOTA",gx.O.AV21UltimaNota,0)},c2v:function(){gx.O.AV21UltimaNota=gx.num.intval(this.val())},val:function(){return gx.fn.getIntegerValue("vULTIMANOTA",".")},nac:gx.falseFn};n[33]={fld:"TEXTBLOCK2",format:0,grid:0};n[35]={lvl:0,type:"date",len:10,dec:0,sign:!1,ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vDTEMISSAO",gxz:"ZV5DtEmissao",gxold:"OV5DtEmissao",gxvar:"AV5DtEmissao",dp:{f:0,st:!1,wn:!1,mf:!1,pic:"99/99/9999",dec:0},ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV5DtEmissao=gx.fn.toDatetimeValue(n)},v2z:function(n){gx.O.ZV5DtEmissao=gx.fn.toDatetimeValue(n)},v2c:function(){gx.fn.setControlValue("vDTEMISSAO",gx.O.AV5DtEmissao,0);typeof this.dom_hdl=="function"&&this.dom_hdl.call(gx.O)},c2v:function(){gx.O.AV5DtEmissao=gx.fn.toDatetimeValue(this.val())},val:function(){return gx.fn.getControlValue("vDTEMISSAO")},nac:gx.falseFn};this.declareDomainHdlr(35,function(){});n[37]={fld:"TABLE4",grid:0};n[40]={fld:"TEXTBLOCK4",format:0,grid:0};n[42]={lvl:0,type:"decimal",len:9,dec:3,sign:!1,pic:"ZZZZ9.999",ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vQTDETOTCONCRETO",gxz:"ZV16QtdeTotConcreto",gxold:"OV16QtdeTotConcreto",gxvar:"AV16QtdeTotConcreto",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV16QtdeTotConcreto=gx.fn.toDecimalValue(n,",",".")},v2z:function(n){gx.O.ZV16QtdeTotConcreto=gx.fn.toDecimalValue(n,".",",")},v2c:function(){gx.fn.setDecimalValue("vQTDETOTCONCRETO",gx.O.AV16QtdeTotConcreto,3,",")},c2v:function(){gx.O.AV16QtdeTotConcreto=this.val()},val:function(){return gx.fn.getDecimalValue("vQTDETOTCONCRETO",".",",")},nac:gx.falseFn};n[47]={fld:"TEXTBLOCK7",format:0,grid:0};n[49]={lvl:0,type:"decimal",len:18,dec:2,sign:!1,pic:"ZZZ,ZZZ,ZZZ,ZZZ,ZZ9.99",ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vVLRTOTCONCRETO",gxz:"ZV26VlrTotConcreto",gxold:"OV26VlrTotConcreto",gxvar:"AV26VlrTotConcreto",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV26VlrTotConcreto=gx.fn.toDecimalValue(n,",",".")},v2z:function(n){gx.O.ZV26VlrTotConcreto=gx.fn.toDecimalValue(n,".",",")},v2c:function(){gx.fn.setDecimalValue("vVLRTOTCONCRETO",gx.O.AV26VlrTotConcreto,2,",");typeof this.dom_hdl=="function"&&this.dom_hdl.call(gx.O)},c2v:function(){gx.O.AV26VlrTotConcreto=this.val()},val:function(){return gx.fn.getDecimalValue("vVLRTOTCONCRETO",".",",")},nac:gx.falseFn};this.declareDomainHdlr(49,function(){});n[54]={fld:"TEXTBLOCK13",format:0,grid:0};n[56]={lvl:0,type:"decimal",len:18,dec:2,sign:!1,pic:"ZZZ,ZZZ,ZZZ,ZZZ,ZZ9.99",ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vVLRTAXABOMBA",gxz:"ZV25VlrTaxaBomba",gxold:"OV25VlrTaxaBomba",gxvar:"AV25VlrTaxaBomba",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV25VlrTaxaBomba=gx.fn.toDecimalValue(n,",",".")},v2z:function(n){gx.O.ZV25VlrTaxaBomba=gx.fn.toDecimalValue(n,".",",")},v2c:function(){gx.fn.setDecimalValue("vVLRTAXABOMBA",gx.O.AV25VlrTaxaBomba,2,",");typeof this.dom_hdl=="function"&&this.dom_hdl.call(gx.O)},c2v:function(){gx.O.AV25VlrTaxaBomba=this.val()},val:function(){return gx.fn.getDecimalValue("vVLRTAXABOMBA",".",",")},nac:gx.falseFn};this.declareDomainHdlr(56,function(){});n[61]={fld:"TEXTBLOCK8",format:0,grid:0};n[63]={lvl:0,type:"decimal",len:11,dec:2,sign:!1,pic:"ZZZZZZZ9.99",ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vVLRM3FALTANTE",gxz:"ZV24VlrM3Faltante",gxold:"OV24VlrM3Faltante",gxvar:"AV24VlrM3Faltante",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV24VlrM3Faltante=gx.fn.toDecimalValue(n,",",".")},v2z:function(n){gx.O.ZV24VlrM3Faltante=gx.fn.toDecimalValue(n,".",",")},v2c:function(){gx.fn.setDecimalValue("vVLRM3FALTANTE",gx.O.AV24VlrM3Faltante,2,",")},c2v:function(){gx.O.AV24VlrM3Faltante=this.val()},val:function(){return gx.fn.getDecimalValue("vVLRM3FALTANTE",".",",")},nac:gx.falseFn};n[68]={fld:"TEXTBLOCK11",format:0,grid:0};n[70]={lvl:0,type:"decimal",len:18,dec:2,sign:!1,pic:"ZZZ,ZZZ,ZZZ,ZZZ,ZZ9.99",ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vVLRADICIONAL",gxz:"ZV23VlrAdicional",gxold:"OV23VlrAdicional",gxvar:"AV23VlrAdicional",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV23VlrAdicional=gx.fn.toDecimalValue(n,",",".")},v2z:function(n){gx.O.ZV23VlrAdicional=gx.fn.toDecimalValue(n,".",",")},v2c:function(){gx.fn.setDecimalValue("vVLRADICIONAL",gx.O.AV23VlrAdicional,2,",");typeof this.dom_hdl=="function"&&this.dom_hdl.call(gx.O)},c2v:function(){gx.O.AV23VlrAdicional=this.val()},val:function(){return gx.fn.getDecimalValue("vVLRADICIONAL",".",",")},nac:gx.falseFn};this.declareDomainHdlr(70,function(){});n[72]={fld:"TEXTBLOCK14",format:0,grid:0};n[74]={lvl:0,type:"decimal",len:18,dec:2,sign:!1,pic:"ZZZ,ZZZ,ZZZ,ZZZ,ZZ9.99",ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,rgrid:[],fld:"vVLRTOTFATURA",gxz:"ZV27VlrTotFatura",gxold:"OV27VlrTotFatura",gxvar:"AV27VlrTotFatura",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(n){gx.O.AV27VlrTotFatura=gx.fn.toDecimalValue(n,",",".")},v2z:function(n){gx.O.ZV27VlrTotFatura=gx.fn.toDecimalValue(n,".",",")},v2c:function(){gx.fn.setDecimalValue("vVLRTOTFATURA",gx.O.AV27VlrTotFatura,2,",");typeof this.dom_hdl=="function"&&this.dom_hdl.call(gx.O)},c2v:function(){gx.O.AV27VlrTotFatura=this.val()},val:function(){return gx.fn.getDecimalValue("vVLRTOTFATURA",".",",")},nac:gx.falseFn};this.declareDomainHdlr(74,function(){});n[79]={fld:"DIV1",format:2,grid:0};n[81]={lvl:2,type:"svchar",len:50,dec:0,sign:!1,ro:1,isacc:0,grid:80,gxgrid:this.GridContainer,fnc:null,isvalid:null,rgrid:[],fld:"CTLDESCRICAO",gxz:"ZV37GXV129",gxold:"OV37GXV129",gxvar:"GXV129",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",inputType:"text",autoCorrect:"1",v2v:function(n){gx.O.GXV129=n},v2z:function(n){gx.O.ZV37GXV129=n},v2c:function(n){gx.fn.setGridControlValue("CTLDESCRICAO",n||gx.fn.currentGridRowImpl(80),gx.O.GXV129,0)},c2v:function(){gx.O.GXV129=this.val()},val:function(n){return gx.fn.getGridControlValue("CTLDESCRICAO",n||gx.fn.currentGridRowImpl(80))},nac:gx.falseFn};n[82]={lvl:2,type:"decimal",len:18,dec:2,sign:!0,pic:"ZZZ,ZZZ,ZZZ,ZZZ,ZZ9.99",ro:1,isacc:0,grid:80,gxgrid:this.GridContainer,fnc:null,isvalid:null,rgrid:[],fld:"CTLVALOR",gxz:"ZV38GXV12A",gxold:"OV38GXV12A",gxvar:"GXV12A",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",inputType:"text",v2v:function(n){gx.O.GXV12A=gx.fn.toDecimalValue(n,",",".")},v2z:function(n){gx.O.ZV38GXV12A=gx.fn.toDecimalValue(n,".",",")},v2c:function(n){gx.fn.setGridDecimalValue("CTLVALOR",n||gx.fn.currentGridRowImpl(80),gx.O.GXV12A,2,",")},c2v:function(){gx.O.GXV12A=this.val()},val:function(n){return gx.fn.getGridDecimalValue("CTLVALOR",n||gx.fn.currentGridRowImpl(80),".",",")},nac:gx.falseFn};n[83]={fld:"DIV2",format:2,grid:0};n[86]={fld:"TXTTOTAL",format:0,grid:0};this.AV12ObraCodigoNome="";this.ZV12ObraCodigoNome="";this.OV12ObraCodigoNome="";this.AV14PessoaCodigoNome="";this.ZV14PessoaCodigoNome="";this.OV14PessoaCodigoNome="";this.AV18Serie="";this.ZV18Serie="";this.OV18Serie="";this.AV21UltimaNota=0;this.ZV21UltimaNota=0;this.OV21UltimaNota=0;this.AV5DtEmissao=gx.date.nullDate();this.ZV5DtEmissao=gx.date.nullDate();this.OV5DtEmissao=gx.date.nullDate();this.AV16QtdeTotConcreto=0;this.ZV16QtdeTotConcreto=0;this.OV16QtdeTotConcreto=0;this.AV26VlrTotConcreto=0;this.ZV26VlrTotConcreto=0;this.OV26VlrTotConcreto=0;this.AV25VlrTaxaBomba=0;this.ZV25VlrTaxaBomba=0;this.OV25VlrTaxaBomba=0;this.AV24VlrM3Faltante=0;this.ZV24VlrM3Faltante=0;this.OV24VlrM3Faltante=0;this.AV23VlrAdicional=0;this.ZV23VlrAdicional=0;this.OV23VlrAdicional=0;this.AV27VlrTotFatura=0;this.ZV27VlrTotFatura=0;this.OV27VlrTotFatura=0;this.ZV37GXV129="";this.OV37GXV129="";this.ZV38GXV12A=0;this.OV38GXV12A=0;this.AV12ObraCodigoNome="";this.AV14PessoaCodigoNome="";this.AV18Serie="";this.AV21UltimaNota=0;this.AV5DtEmissao=gx.date.nullDate();this.AV16QtdeTotConcreto=0;this.AV26VlrTotConcreto=0;this.AV25VlrTaxaBomba=0;this.AV24VlrM3Faltante=0;this.AV23VlrAdicional=0;this.AV27VlrTotFatura=0;this.AV20TipoChamada=0;this.AV11NotaServicoSeq=0;this.GXV129="";this.GXV12A=0;this.A9348NotaServicoSeq=0;this.A11598NotaServicoAdicionaisDescricao="";this.A11599NotaServicoAdicionaisValor=0;this.A11589NotaServicoAdicionaisSeq=0;this.A11134NotaServicoNumeroDocumento="";this.A9369NotaServicoOSEmpId="";this.A11585NotaServicoObraNome="";this.A11574NotaServicoObraCodigo=0;this.A11584NotaServicoPessoaFantasia="";this.A11576NotaServicoPessoaId=0;this.A9314NotaServicoSerie="";this.A9315NotaServicoDtEmissao=gx.date.nullDate();this.A11588NotaServicoQtdTotConcreto=0;this.A11579NotaServicoVlrTotConcreto=0;this.A11582NotaServicoVlrTaxaBomba=0;this.A11580NotaServicoVlrM3Faltante=0;this.A11581NotaServicoVlrAdicionalHorario=0;this.A11583NotaServicoVlrAcrDesc=0;this.A11575NotaServicoPessoaEmpId="";this.A11573NotaServicoObraEmpId="";this.Events={e112fn2_client:["'FECHAR'",!0],e122fn2_client:["ENTER",!0],e132fn2_client:["'TOTALIZAR'",!0],e162fn2_client:["CANCEL",!0]};this.EvtParms.REFRESH=[[{av:"GRID_nFirstRecordOnPage"},{av:"GRID_nEOF"},{av:"AV28SdtAcrDesCPC",fld:"vSDTACRDESCPC",grid:80},{av:"subGrid_Rows"}],[]];this.EvtParms["'FECHAR'"]=[[],[]];this.EvtParms.ENTER=[[{av:"AV20TipoChamada",fld:"vTIPOCHAMADA",hsh:!0},{av:"AV28SdtAcrDesCPC",fld:"vSDTACRDESCPC",grid:80}],[{av:"AV33TpErro",fld:"vTPERRO"}]];this.EvtParms["'TOTALIZAR'"]=[[{av:"AV28SdtAcrDesCPC",fld:"vSDTACRDESCPC",grid:80},{av:"AV26VlrTotConcreto",fld:"vVLRTOTCONCRETO"},{av:"AV25VlrTaxaBomba",fld:"vVLRTAXABOMBA"},{av:"AV24VlrM3Faltante",fld:"vVLRM3FALTANTE"},{av:"AV23VlrAdicional",fld:"vVLRADICIONAL"}],[{av:"AV31VlrTotal",fld:"vVLRTOTAL"},{av:"AV41GXV2",fld:"vGXV2"},{av:"AV29SdtAcrDesCPCItem",fld:"vSDTACRDESCPCITEM"},{av:"AV27VlrTotFatura",fld:"vVLRTOTFATURA"},{av:'gx.fn.getCtrlProperty("TXTTOTAL","Caption")',ctrl:"TXTTOTAL",prop:"Caption"}]];this.EvtParms.GRID_FIRSTPAGE=[[{av:"GRID_nFirstRecordOnPage"},{av:"GRID_nEOF"},{av:"subGrid_Rows"},{av:"AV28SdtAcrDesCPC",fld:"vSDTACRDESCPC",grid:80}],[]];this.EvtParms.GRID_PREVPAGE=[[{av:"GRID_nFirstRecordOnPage"},{av:"GRID_nEOF"},{av:"subGrid_Rows"},{av:"AV28SdtAcrDesCPC",fld:"vSDTACRDESCPC",grid:80}],[]];this.EvtParms.GRID_NEXTPAGE=[[{av:"GRID_nFirstRecordOnPage"},{av:"GRID_nEOF"},{av:"subGrid_Rows"},{av:"AV28SdtAcrDesCPC",fld:"vSDTACRDESCPC",grid:80}],[]];this.EvtParms.GRID_LASTPAGE=[[{av:"GRID_nFirstRecordOnPage"},{av:"GRID_nEOF"},{av:"subGrid_Rows"},{av:"AV28SdtAcrDesCPC",fld:"vSDTACRDESCPC",grid:80}],[]];this.EnterCtrl=["BTNCONFIRMAR"];this.setVCMap("AV20TipoChamada","vTIPOCHAMADA",0,"int");this.setVCMap("AV11NotaServicoSeq","vNOTASERVICOSEQ",0,"int");this.addGridBCProperty("Sdtacrdescpc",["Descricao"],this.GXValidFnc[81],"AV28SdtAcrDesCPC");this.addGridBCProperty("Sdtacrdescpc",["Valor"],this.GXValidFnc[82],"AV28SdtAcrDesCPC");this.InitStandaloneVars()});gx.setParentObj(new hfaturarpedidocpcadc)