Boa tarde pessoal,
abaixo, meu código fonte:
ACBrNFe1.EventoNFe.Evento.Clear;
with ACBrNFe1.EventoNFe.Evento.Add do
begin
infEvento.chNFe := Chave;
infEvento.CNPJ := CNPJ;
infEvento.dhEvento := now;
infEvento.tpEvento := teCancSubst;
infEvento.detEvento.xJust := Justificativa;
infEvento.detEvento.nProt := Protocolo;
infEvento.detEvento.cOrgaoAutor := 41;
infEvento.detEvento.verAplic := '1.0';
infEvento.detEvento.chNFeRef := ChaveAcessoNFCeSubstituta;
end;
ACBrNFe1.EnviarEvento(StrToInt(idLote));
---
Verificando no fonte do Acbr, não encontrei condicional para o teCancSubst, no trecho de código abaixo:
TACBrNFe.EnviarEvento(idLote: integer): Boolean;
...
if EventoNFe.Evento.Items.infEvento.tpEvento = teCancelamento then
begin
EventoNFe.Evento.Items.infEvento.detEvento.nProt := NotasFiscais.Items[j].NFe.procNFe.nProt;
Podem me ajudar?
Observação: Atualizei o Acbr hoje.
Marcel