Olá Italo.
A consulta funciona, contudo não sei se estou fazendo errado, mas o retorno não mostra todas as notas, por exemplo não tem as notas de Junho e Julho, neste caso, vejp apenas as notas de Abril e Maio.
Abaixo o trecho de código:
dmDados.NFe.DistribuicaoDFe(35,vCNPJ,'0','');
for I := 0 to dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Count-1 do
begin
if dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.chNFe<>'' then begin cdsNotas.Append; cdsNotas.FieldValues['data']:=dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.dhEmi; cdsNotas.FieldValues['nf']:=''; cdsNotas.FieldValues['chave']:=dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.chNFe; cdsNotas.FieldValues['emitente']:=dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.xNome; cdsNotas.FieldValues['valor']:=dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.vNF; cdsNotas.FieldValues['nf']:=copy(dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.chNFe,25,9); if dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.cSitNFe=snAutorizado then cdsNotas.FieldValues['status_nfe']:='AUTORIZADA' else if dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.cSitNFe=snDenegado then cdsNotas.FieldValues['status_nfe']:='DENEGADA' else if dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.cSitNFe=snCancelado then cdsNotas.FieldValues['status_nfe']:='CANCELADA' else if dmDados.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.cSitNFe=snEncerrado then cdsNotas.FieldValues['status_nfe']:='ENCERRADO'; cdsNotas.Post; end; end;
Está faltando alguma coisa?
Obrigado.