Ir para conteúdo
  • Cadastre-se

José Justino

Membros
  • Total de ítens

    28
  • Registro em

  • Última visita

Tudo que José Justino postou

  1. Consegui resolver, em algum ponto do código, estava mudando o modelo do documento, corrigi e funcionou. Obrigado a todos pela atenção, bom final de semana a todos e Deus abençoe.
  2. Estou com um problema, ao assinar um CT'e-OS, aparece a mensagem de "Nenhum Elemento Encontrado", já revisei o código e não consegui achar o que está faltando, vi em um tópico aqui no grupo um erro igual, mas no meu código está informando o modelo 67 para CT'e-OS, peço para gerar um PDF com as informações carregadas, e as informações aparecem, já comparei com a versão de exemplo da pasta do componente e está seguindo todos os passos. Vou colocar o código para ver se alguém me ajuda. Desde já agradeço. dmCTe.ConfiguraCTe; dmCTe.ACBrCTe.Conhecimentos.Clear; CTE_OS; dmCTe.ACBrCTe.Conhecimentos.Items[0].ImprimirPDF; dmCTe.ACBrCTe.Conhecimentos.Items[0].Assinar; dmCTe.ACBrCTe.Conhecimentos.Items[0].Validar; procedure TdmCTe.ConfiguraCTe; var Ok: boolean; PathMensal: String; begin ACBrCTe.Configuracoes.Geral.SSLLib := TSSLLib(dados.qryConfigTIPO_EMISSAO.Value); ACBrCTe.Configuracoes.Geral.SSLCryptLib := TSSLCryptLib(dados.qryConfigCRYPTLIB.AsInteger); ACBrCTe.Configuracoes.Geral.SSLHttpLib := TSSLHttpLib(dados.qryConfigHTTPLIB.AsInteger); ACBrCTe.Configuracoes.Geral.SSLXmlSignLib := TSSLXmlSignLib(dados.qryConfigXMLSIGN.AsInteger); ACBrCTe.SSL.SSLType := TSSLType(dados.qryconfigSSL_TIPO.AsInteger); ACBrCTe.Configuracoes.Certificados.NumeroSerie := dados.qryConfigNUMEROSERIECERTFICADO.Value; ACBrCTe.Configuracoes.Certificados.Senha := dados.qryConfigSENHACERTIFICADO.Value; ACBrCTe.Configuracoes.Certificados.ArquivoPFX := dados.qryConfigCAMINHO_CERTIFICADO.Value; ACBrCTe.Configuracoes.Arquivos.AdicionarLiteral := true; ACBrCTe.Configuracoes.Arquivos.EmissaoPathCTe := true; ACBrCTe.Configuracoes.Arquivos.SepararPorMes := true; ACBrCTe.Configuracoes.Arquivos.SepararPorCNPJ := true; ACBrCTe.Configuracoes.Arquivos.PathEvento := trim(dados.qryConfigPATH_EVENTO_CTE.Value); ACBrCTe.Configuracoes.Arquivos.PathSalvar := trim(dados.qryConfigPATH_SALVAR_CTE.Value); ACBrCTe.Configuracoes.Arquivos.PathCTe := trim(dados.qryConfigPATH_ENVIADAS_CTE.Value); ACBrCTe.Configuracoes.Arquivos.PathSchemas := dados.qryConfigPATH_SCHEMA_CTE.Value; ACBrCTe.Configuracoes.Arquivos.PathInu := dados.qryConfigPATH_INU_CTE.Value; PathMensal := ACBrCTe.Configuracoes.Arquivos.GetPathCTe(0); case dados.qryConfigVERSAO_CTE.Value of 0: ACBrCTe.Configuracoes.Geral.VersaoDF := TVersaoCTe(0); 1: ACBrCTe.Configuracoes.Geral.VersaoDF := TVersaoCTe(1); end; // ACBrCTe.SSL.DescarregarCertificado; // Configurações -> Geral ACBrCTe.Configuracoes.Arquivos.PathSalvar := PathMensal; ACBrCTe.DACTE.PathPDF := dados.qryConfigPATH_PDF_CTE.Value; // Configurações -> WebServices ACBrCTe.Configuracoes.WebServices.AguardarConsultaRet := 15; ACBrCTe.Configuracoes.WebServices.AjustaAguardaConsultaRet := true; ACBrCTe.Configuracoes.WebServices.IntervaloTentativas := 5; ACBrCTe.Configuracoes.WebServices.Tentativas := 15; ACBrCTe.Configuracoes.WebServices.UF := dados.qryConfigUF.Text; ACBrCTe.Configuracoes.WebServices.Visualizar := false; if dados.qryConfigVISUALIZAR.Value = 'S' then ACBrCTe.Configuracoes.WebServices.Visualizar := true; ACBrCTe.Configuracoes.WebServices.Salvar := false; // DAMDFe if ACBrCTe.DACTE <> nil then begin ACBrCTe.DACTE.PathPDF := dados.qryConfigPATH_PDF_CTE.Value; ACBrCTe.DACTE.ExpandeLogoMarca := false; ACBrCTe.DACTE.Logo := dados.qryConfigLOGOMARCA.Value; ACBrCTe.DACTE.TipoDACTE := StrToTpImp(Ok, IntToStr(1)); end; // ACBrCTe.Configuracoes.Arquivos.Salvar := true; ACBrCTe.Configuracoes.WebServices.Ambiente := taProducao; if dados.qryConfigAMBIENTE.Value = 1 then ACBrCTe.Configuracoes.WebServices.Ambiente := taHomologacao; ACBrCTeDACTeRL1.Sistema := dados.qryParametroEMPRESA.Value + ' | ' + dados.qryParametroFONE1.Value + ' ' + dados.qryparametroFONE2.Value; ACBrCTeDACTeRL1.Site := dados.qryparametroSITE.Value; end; procedure TfrmConsCTe.CTE_OS; begin // dmCTe.ACBrCTe.Conhecimentos.Clear; with dmCTe.ACBrCTe.Conhecimentos.Add.CTe do begin infCTe.versao := 3.0; Ide.cUF := UFtoCUF(dados.qryEmpresaUF.Value); Ide.nCT := qryCteNUMERO.Value; Ide.cCT := GerarCodigoDFe(qryCteNUMERO.Value); Ide.CFOP := qryCteCFOP.Value; Ide.natOp := 'PRESTACAO SERVICO TRANSPORTE'; Ide.modelo := 67; Ide.serie := dados.qryConfigCTE_SERIE.AsInteger; Ide.dhEmi := now; Ide.tpImp := tiRetrato; Ide.tpEmis := teNormal; if dados.qryConfigAMBIENTE.Value = 0 then Ide.tpAmb := taProducao else Ide.tpAmb := taHomologacao; Ide.tpCTe := tcNormal; case qryCteTIPOSERVICO.Value of 0: Ide.tpServ := tsNormal; 1: Ide.tpServ := tsSubcontratacao; 2: Ide.tpServ := tsRedespacho; 3: Ide.tpServ := tsIntermediario; 4: Ide.tpServ := tsMultimodal; 5: Ide.tpServ := tsTranspPessoas; 6: Ide.tpServ := tsTranspValores; 7: Ide.tpServ := tsExcessoBagagem; end; Ide.procEmi := peAplicativoContribuinte; Ide.verProc := '3.0'; Ide.cMunEnv := dados.qryEmpresaID_CIDADE.Value; Ide.xMunEnv := dados.qryEmpresaCIDADE.Value; Ide.UFEnv := dados.qryEmpresaUF.Value; Ide.modal := mdRodoviario; Ide.indIEToma := TpcnindIEDest(dados.qryConfigTIPO_CONTRIBUINTE_CTE.Value); Ide.cMunIni := qryCteCODMUNINI.Value; Ide.xMunIni := qryCteMUNICIPIOINI.Value; Ide.UFIni := qryCteUFINI.Value; Ide.cMunFim := qryCteCODMUNFIM.Value; Ide.xMunFim := qryCteMINICIPIOFIM.Value; Ide.UFFim := qryCteUFFIM.Value; Emit.CNPJ := TiraPontos(dados.qryEmpresaCNPJ.Value); Emit.IE := TiraPontos(dados.qryEmpresaIE.Value); Emit.xNome := dados.qryEmpresaRAZAO.Value; Emit.xFant := dados.qryEmpresaFANTASIA.Value; Emit.enderEmit.xLgr := dados.qryEmpresaENDERECO.Value; Emit.enderEmit.nro := dados.qryEmpresaNUMERO.Value; Emit.enderEmit.xCpl := ''; Emit.enderEmit.xBairro := dados.qryEmpresaBAIRRO.Value; Emit.enderEmit.cMun := dados.qryEmpresaID_CIDADE.Value; Emit.enderEmit.xMun := dados.qryEmpresaCIDADE.Value; Emit.enderEmit.CEP := dados.qryEmpresaCEP.AsInteger; Emit.enderEmit.UF := dados.qryEmpresaUF.Value; Emit.enderEmit.fone := dados.qryEmpresaFONE.Value; // Adiciona dados do tomador do serviço qryTomador.Close; qryTomador.Params[0].Value := qryCteFKTOMADOR.Value; qryTomador.Open; toma.CNPJCPF := TiraPontos(qryTomadorCNPJ.Value); if trim(qryTomadorIE.AsString) <> '' then toma.IE := TiraPontos(qryTomadorIE.Value); toma.xNome := qryTomadorRAZAO.Value; toma.xFant := qryTomadorFANTASIA.Value; toma.fone := ''; toma.enderToma.xLgr := qryTomadorENDERECO.Value; toma.enderToma.nro := qryTomadorNUMERO.Value; toma.enderToma.xCpl := ''; toma.enderToma.xBairro := qryTomadorBAIRRO.Value; toma.enderToma.cMun := qryTomadorCODMUN.Value; toma.enderToma.xMun := qryTomadorMUNICIPIO.Value; toma.enderToma.CEP := qryTomadorCEP.AsInteger; toma.enderToma.UF := qryTomadorUF.Value; toma.enderToma.cPais := 1058; toma.enderToma.xPais := 'BRASIL'; toma.email := ''; { Carrega valores da prestacao de servico } vPrest.vTPrest := qryCteTOTAL.AsFloat; vPrest.vRec := qryCteRECEBIDO.AsFloat; with vPrest.comp.Add do begin xNome := 'Componente 1'; vComp := qryCteRECEBIDO.AsFloat; end; // 90 - ICMS Outros if Emit.enderEmit.UF = Rem.enderReme.UF then begin Imp.ICMS.SituTrib := cst90; Imp.ICMS.ICMS90.CST := cst90; Imp.ICMS.ICMS90.pRedBC := 0.00; Imp.ICMS.ICMS90.vBC := 0.00; Imp.ICMS.ICMS90.pICMS := 0.00; Imp.ICMS.ICMS90.vICMS := 0; Imp.ICMS.ICMS90.vCred := 0.00; end else begin Imp.ICMS.SituTrib := cstICMSOutraUF; Imp.ICMS.ICMSOutraUF.CST := cstICMSOutraUF; // ICMS Outros Imp.ICMS.ICMSOutraUF.pRedBCOutraUF := 0; Imp.ICMS.ICMSOutraUF.vBCOutraUF := 0; Imp.ICMS.ICMSOutraUF.pICMSOutraUF := 0; Imp.ICMS.ICMSOutraUF.vICMSOutraUF := 0; end; Imp.infAdFisco := 'Lei da Transparencia: O valor aproximado de tributos incidentes sobre o preço deste servico é de R$' + FormatFloat(',0.00', qryCteVTOTTIRB.AsFloat) + ' Fonte: IBPT'; Imp.vTotTrib := qryCteVTOTTIRB.AsFloat; // Impostos federais Imp.infTribFed.vPIS := qryCteVPIS.AsFloat; Imp.infTribFed.vCOFINS := qryCteVCOFINS.AsFloat; Imp.infTribFed.vIR := qryCteVIR.AsFloat; Imp.infTribFed.vINSS := qryCteVINSS.AsFloat; Imp.infTribFed.vCSLL := qryCteVCLSS.AsFloat; { Carrega as informacoes CTe Normal } infCTeNorm.infServico.xDescServ := qryCteDESCRICAOSERVICO.Value;;; infCTeNorm.infServico.qCarga := qryCteQTD.AsFloat;; { Carrega informacoes do seguro } with infCTeNorm.Seg.Add do begin respSeg := rsTomadorServico; xSeg := qryCteXSEG.Value; nApol := qryCteNAPOLICE.Value; end; { Carrega Informacoes do Modal } { Rodoviario } infCTeNorm.rodoOS.TAF := qryCteTAF.AsString; infCTeNorm.rodoOS.NroRegEstadual := qryCteNROREGESTADUAL.AsString; infCTeNorm.rodoOS.infFretamento.tpFretamento := TtpFretamento(1); infCTeNorm.rodoOS.infFretamento.dhViagem := now; // responsavel tecnico 22-03-2019 if dados.qryEmpresaRESPONSAVEL_TECNICO.Value = 'S' then begin dados.qryRespTecnico.Close; dados.qryRespTecnico.Open; infRespTec.CNPJ := TiraPontos(dados.qryRespTecnicoCNPJ.Value); infRespTec.xContato := dados.qryRespTecnicoNOME.Value; infRespTec.email := dados.qryRespTecnicoEMAIL.Value; infRespTec.fone := TiraPontos(dados.qryRespTecnicoTELEFONE.Value); infRespTec.hashCSRT := dados.qryRespTecnicoCSRT.Value; end; { Carega inf veiculos do modal rodo 0-1 } qryTransp.Close; qryTransp.Params[0].Value := qryCteFKTRANSPORTADOR.Value; qryTransp.Open; with infCTeNorm.rodoOS.veic do begin placa := qryTranspPLACA.Value; RENAVAM := qryTranspRENAVAM.Value; UF := qryTranspUFPLACA.Value; end; end; end;
  3. Estou com um problema, ao assinar um CT'e-OS, aparece a mensagem de "Nenhum Elemento Encontrado", já revisei o código e não consegui achar o que está faltando, vi em um tópico aqui no grupo um erro igual, mas no meu código está informando o modelo 67 para CT'e-OS, peço para gerar um PDF com as informações carregadas, e as informações aparecem. Vou colocar o código para ver se alguém me ajuda. Desde já agradeço.
  4. Estou com um problema não não sei como resolver, está dando esse erro do título, mas já verifiquei o XML e todos os itens estão preenchidos e o total bate. Vou anexar o XML. Desde já agradeço muito. xml_analise.xml
  5. Por incrível que pareça, estão sim. Abaixo estou anexando as consultas dos dois cnpj's.
  6. Estou tendo um problema estranho, atualizei os fontes do ACBr Trunk 2 para implementar a NF-e 4.0 e com o meu certificado que é A3 funciona normal, quando uso o certificado A1 dá o seguinte erro da imagem em anexo. Já consultei a empresa ela é do simples, lembrando que de uma nota para outra só mudei o CNPJ, cliente e produtos são iguais.
  7. Estou usando o método assinar antes de validar e ocorre o mesmo problema.
  8. Erro ao compilar o ACBr_PCNComum, apresenta o seguinte erro: [DCC Error] pcnGerador.pas(367): E2003 Undeclared identifier: 'RetornarConteudoEntre' O que posso fazer?
  9. Estou com o mesmo problema, dando a mesma mensagem de erro: Segue abaixo um trecho do XML <NFe xmlns="http://www.portalfiscal.inf.br/nfe"> <infNFe versao="3.10" Id="NFe26161110170637000180550010000006941000006943"> <ide> <cUF>26</cUF> <cNF>00000694</cNF> <natOp>5102-VENDA</natOp> <indPag>0</indPag> <mod>55</mod> <serie>1</serie> <nNF>694</nNF> <dhEmi>2016-11-01T00:00:00-02:00</dhEmi> <dhSaiEnt>2016-11-01T00:00:00-02:00</dhSaiEnt> <tpNF>1</tpNF> <idDest>1</idDest> <cMunFG>2611101</cMunFG> <tpImp>1</tpImp> <tpEmis>1</tpEmis> <cDV>3</cDV> <tpAmb>1</tpAmb> <finNFe>1</finNFe> <indFinal>1</indFinal> <indPres>0</indPres> <procEmi>0</procEmi> <verProc>1.0.0.0</verProc> </ide> <emit> <CNPJ>10170637000180</CNPJ>
  10. José Justino

    Epec

    Cesar, como você resolveu o problema da IE?
  11. Já fiz isso, antes de emitir, eu seto para ve310, mas quando vou olhar o XML está como 2.00
  12. Estou com um problema referente a essa mensagem de erro: "rejeicao: Versao do Arquivo Xml não suportada", até semana passada estava tudo funcionando, hoje parou em todos os meus clientes, já removi o ACBr e reinstalei, já mudei a versão para a 3.10, compilo o sistema normalmente, mas quando mando validar e assinar, no XML só grava a versão 2.00. O que posso fazer?
  13. Entendi sim meu amigo, muito obrigado e desculpe pelo tamanho do código hehehe, não se repetirá, Grato pela dica.
  14. Olá gente, boa tarde, estou implementando o cancelamento por evento e está aparecendo um erro informando que o campo CORGAO não informado. Abaixo segue um trecho do código, se puderem me dar uma luz agradeço. // Carrega o XML da nota fiscal eletrônica ACBrNFe.NotasFiscais.Clear; ACBrNFe.NotasFiscais.LoadFromFile('c:\jrrnfe\xml.txt'); ACBrNFe.EventoNFe.Evento.Clear; ACBrNFe.EventoNFe.idLote := NumeroLote; // Preenche os parâmetros da NF'e ACBrNFe.EventoNFe.Evento.Add.InfEvento.tpAmb := ACBrNFe.NotasFiscais.Items[0].NFe.Ide.tpAmb; ACBrNFe.EventoNFe.Evento.Add.InfEvento.CNPJ := ACBrNFe.NotasFiscais.Items[0].NFe.Emit.CNPJCPF; ACBrNFe.EventoNFe.Evento.Add.InfEvento.cOrgao := ACBrNFe.NotasFiscais.Items[0].NFe.Ide.cUF; ACBrNFe.EventoNFe.Evento.Add.InfEvento.nSeqEvento := 1; ACBrNFe.EventoNFe.Evento.Add.InfEvento.chNFe := Copy(ACBrNFe.NotasFiscais.Items[0].NFe.infNFe.ID, 4, 44); ACBrNFe.EventoNFe.Evento.Add.InfEvento.dhEvento := NOW; ACBrNFe.EventoNFe.Evento.Add.InfEvento.tpEvento := teCancelamento; ACBrNFe.EventoNFe.Evento.Add.InfEvento.detEvento.nProt := Qry1PROTOCOLO_1.AsString; ACBrNFe.EventoNFe.Evento.Add.InfEvento.detEvento.xJust := 'ERRO NA EMISSÃO DA NOTA FISCAL'; // Enviar o evento de cancelamento if ACBrNFe.EnviarEventoNFe(NumeroLote) then begin with ACBrNFe.WebServices.EnvEvento do begin if EventoRetorno.retEvento.Items[0].RetInfEvento.cStat <> 13 then begin raise Exception.CreateFmt('Ocorreu o seguinte erro ao cancelar a nota fiscal eletrônica: ' + sLineBreak + 'Código: %d' + sLineBreak + 'Motivo: %s', [ EventoRetorno.retEvento.Items[0].RetInfEvento.cStat, EventoRetorno.retEvento.Items[0].RetInfEvento.xMotivo]); end; // retornos DataHoraEvento := EventoRetorno.retEvento.Items[0].RetInfEvento.dhRegEvento; numeroProtocolo := EventoRetorno.retEvento.Items[0].RetInfEvento.nProt; xmlCancelamento := EventoRetorno.retEvento.Items[0].RetInfEvento.XML; CodigoStatus := EventoRetorno.retEvento.Items[0].RetInfEvento.cStat; MotivoStatus := EventoRetorno.retEvento.Items[0].RetInfEvento.xMotivo; end; IBSQL1.Close; IBSQL1.SQL.Clear; IBSQL1.SQL.Add('update NFE set STATUS = :xStatus,'); IBSQL1.SQL.Add(' CANC_DATAHORA = :xDataHora,'); IBSQL1.SQL.Add(' CANC_PROTOCOLO = :xProtocolo,'); IBSQL1.SQL.Add(' CANC_XML = :xXml.'); IBSQL1.SQL.Add(' CANC_CODIGOSTATUS = :xCodigoStatus,'); IBSQL1.SQL.ADd(' CANC_MOTIVOSTATUS = :xMotivoStatus'); IBSQL1.SQL.Add('where CODIGO = :xCodigo'); IBSQL1.ParamByName('xStatus').AsString := 'CANCELADA'; IBSQL1.ParamByName('xDataHora').AsDateTime := DataHoraEvento; IBSQL1.ParamByName('xProtocolo').AsString := numeroProtocolo; IBSQL1.ParamByName('xXml').AsString := xmlCancelamento; IBSQL1.ParamByName('xCodigoStatus').AsInteger := CodigoStatus; IBSQL1.ParamByName('xMotivoStatus').AsString := MotivoStatus; IBSQL1.ExecQuery; IBSQL1.Transaction.CommitRetaining; end else begin with ACBrNFe.WebServices.EnvEvento do begin raise Exception.Create ( 'Ocorreram erros ao tentar efetuar o cancelamento:' + sLineBReak + 'Lote: ' + IntToStr(EventoRetorno.idLote) + sLineBreak + 'Ambiente: ' + TpAmbToStr(EventoRetorno.tpAmb) + sLineBreak + 'Orgao: ' + IntToStr(EventoRetorno.cOrgao) + sLineBreak + 'Status: ' + IntToStr(EventoRetorno.cStat) + sLineBreak + 'Motivo: ' + EventoRetorno.xMotivo); end; end;
  15. As variáveis estão preenchidas incorretamente? Voei.
  16. Também estou tentando enviar um evento de cancelamento e tá dando um erro dizendo que o campo cOrgao não informado, abaixo segue o código, desde já agradeço a ajuda. // Carrega o XML da nota fiscal eletrônica ACBrNFe.NotasFiscais.Clear; ACBrNFe.NotasFiscais.LoadFromFile('c:\jrrnfe\xml.txt'); ACBrNFe.EventoNFe.Evento.Clear; ACBrNFe.EventoNFe.idLote := NumeroLote; // Preenche os parâmetros da NF'e ACBrNFe.EventoNFe.Evento.Add.InfEvento.tpAmb := ACBrNFe.NotasFiscais.Items[0].NFe.Ide.tpAmb; ACBrNFe.EventoNFe.Evento.Add.InfEvento.CNPJ := ACBrNFe.NotasFiscais.Items[0].NFe.Emit.CNPJCPF; ACBrNFe.EventoNFe.Evento.Add.InfEvento.cOrgao := ACBrNFe.NotasFiscais.Items[0].NFe.Ide.cUF; ACBrNFe.EventoNFe.Evento.Add.InfEvento.nSeqEvento := 1; ACBrNFe.EventoNFe.Evento.Add.InfEvento.chNFe := Copy(ACBrNFe.NotasFiscais.Items[0].NFe.infNFe.ID, 4, 44); ACBrNFe.EventoNFe.Evento.Add.InfEvento.dhEvento := NOW; ACBrNFe.EventoNFe.Evento.Add.InfEvento.tpEvento := teCancelamento; ACBrNFe.EventoNFe.Evento.Add.InfEvento.detEvento.nProt := Qry1PROTOCOLO_1.AsString; ACBrNFe.EventoNFe.Evento.Add.InfEvento.detEvento.xJust := 'ERRO NA EMISSÃO DA NOTA FISCAL'; // Enviar o evento de cancelamento if ACBrNFe.EnviarEventoNFe(NumeroLote) then begin with ACBrNFe.WebServices.EnvEvento do begin if EventoRetorno.retEvento.Items[0].RetInfEvento.cStat <> 13 then begin raise Exception.CreateFmt('Ocorreu o seguinte erro ao cancelar a nota fiscal eletrônica: ' + sLineBreak + 'Código: %d' + sLineBreak + 'Motivo: %s', [ EventoRetorno.retEvento.Items[0].RetInfEvento.cStat, EventoRetorno.retEvento.Items[0].RetInfEvento.xMotivo]); end; // retornos DataHoraEvento := EventoRetorno.retEvento.Items[0].RetInfEvento.dhRegEvento; numeroProtocolo := EventoRetorno.retEvento.Items[0].RetInfEvento.nProt; xmlCancelamento := EventoRetorno.retEvento.Items[0].RetInfEvento.XML; CodigoStatus := EventoRetorno.retEvento.Items[0].RetInfEvento.cStat; MotivoStatus := EventoRetorno.retEvento.Items[0].RetInfEvento.xMotivo; end; IBSQL1.Close; IBSQL1.SQL.Clear; IBSQL1.SQL.Add('update NFE set STATUS = :xStatus,'); IBSQL1.SQL.Add(' CANC_DATAHORA = :xDataHora,'); IBSQL1.SQL.Add(' CANC_PROTOCOLO = :xProtocolo,'); IBSQL1.SQL.Add(' CANC_XML = :xXml.'); IBSQL1.SQL.Add(' CANC_CODIGOSTATUS = :xCodigoStatus,'); IBSQL1.SQL.ADd(' CANC_MOTIVOSTATUS = :xMotivoStatus'); IBSQL1.SQL.Add('where CODIGO = :xCodigo'); IBSQL1.ParamByName('xStatus').AsString := 'CANCELADA'; IBSQL1.ParamByName('xDataHora').AsDateTime := DataHoraEvento; IBSQL1.ParamByName('xProtocolo').AsString := numeroProtocolo; IBSQL1.ParamByName('xXml').AsString := xmlCancelamento; IBSQL1.ParamByName('xCodigoStatus').AsInteger := CodigoStatus; IBSQL1.ParamByName('xMotivoStatus').AsString := MotivoStatus; IBSQL1.ExecQuery; IBSQL1.Transaction.CommitRetaining; end else begin with ACBrNFe.WebServices.EnvEvento do begin raise Exception.Create ( 'Ocorreram erros ao tentar efetuar o cancelamento:' + sLineBReak + 'Lote: ' + IntToStr(EventoRetorno.idLote) + sLineBreak + 'Ambiente: ' + TpAmbToStr(EventoRetorno.tpAmb) + sLineBreak + 'Orgao: ' + IntToStr(EventoRetorno.cOrgao) + sLineBreak + 'Status: ' + IntToStr(EventoRetorno.cStat) + sLineBreak + 'Motivo: ' + EventoRetorno.xMotivo); end; end;
  17. Quando vou compilar o componente está dando o erro: F2084 Internal Error: U2095
×
×
  • Criar Novo...

Informação Importante

Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.