Ir para conteúdo
  • Cadastre-se

dev botao

  • Este tópico foi criado há 2680 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Recommended Posts

Postado

Geste estou tentando fazer A DFe de xml de NFe! COMEÇA A FAZER NORMALMENTE E LOGO DÁ ESSE ERRO DA IMAGEM POSTADA EM ANEXO;

SEGUE O CODIGO Q ESTOU USANDO...: LEMBRANDO QUE COMEÇA A FAZER E AS VEZES ESSE ERRO APARECE NO INICIO E AS VEZES NO FINAL DO PROCESSO!

 

SEGUE O CODIGO...:

 

 NSU := 0;
          repeat
            NSU := NSU + 1;
            F_Principal.NFe.DistribuicaoDFe(UFtoCUF(DM_GERA_NFE.qry_filialuf_filial.AsString), DM_GERA_NFE.qry_filialcnpj_filial.AsString, '', IntToStr(NSU));
            MaxNSU :=strtoint(F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.maxNSU);

              if F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.cStat = 138 then
              begin

                   j := F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Count - 1;

                   with RxProgress1 do
                   begin

                        Min := 0;
                        Max := MaxNSU;
                        Visible := true;

                   end;


                   for i := 0 to j do
                   begin


                             if F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.chNFe <> '' then
                             begin


                                      case F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.cSitNFe of
                                           snAutorizado: situacao := 'A';
                                           snDenegado:   situacao := 'D';
                                           snCancelado:  situacao := 'C';
                                      end;


                                      with  Grid_nfe do
                                      begin
                                          if Addrow then
                                          RowCount := RowCount + 1;

                                          Objects[0,RowCount] := CheckBox1;

                                        //  Cells[0,RowCount-1] := NovoCheckBox; // -> checkbox
                                          Cells[1,RowCount] := Situacao; // -> situacao
                                          Cells[2,RowCount] := F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.chNFe;
                                          Cells[3,RowCount] := Copy(F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.chNFe, 26, 9);
                                          Cells[4,RowCount] := F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.CNPJCPF;
                                          Cells[5,RowCount] := F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.xNome;
                                          Cells[6,RowCount] := floattostrf(F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.vNF,ffnumber, 12,2);
                                          Cells[7,RowCount] := datetostr(F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.resNFe.dhEmi);

                                          AddRow := True;


                                          RxProgress1.Position := RxProgress1.Position + 1;
                                          RxProgress1.Update;

                                      end;


                                      ult_nsu := strtoint(F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items.NSU);


                                      Inc(vqtde_importados);


                             end;

                   end;

                  if vqtde_importados > 0 then
                  lbl_qtde_nfe.Caption := IntToStr(vqtde_importados);
                  lbl_qtde_nfe.Update;


              end;


              until (F_Principal.NFe.WebServices.DistribuicaoDFe.retDistDFeInt.ultNSU = IntToStr(MaxNSU));

              application.MessageBox('Busca Realizada com Sucesso!','Atenção',MB_OK+MB_ICONINFORMATION);
 

erro acbr.png

  • Moderadores
Postado

6.3 - Mostre respeito pelo modo de escrever. Escreva de modo claro, gramaticalmente e semanticamente correto. Não escreva TUDO EM MAIÚSCULAS. Isso é lido como se estivesse gritando e é considerado rude. Favor leia as regras do fórum.

Consultor SAC ACBr Juliomar Marchetti
 

Projeto ACBr

skype: juliomar
telegram: juliomar
e-mail: [email protected]
http://www.juliomarmarchetti.com.br
MVP_NewLogo_100x100_Transparent-02.png
 

 

  • Este tópico foi criado há 2680 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Crie uma conta ou entre para comentar

Você precisar ser um membro para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar Agora
×
×
  • 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.